Skip to content

Conversation

@ggdouglas
Copy link
Contributor

@ggdouglas ggdouglas commented Feb 4, 2025

Part of #7232

Proposed changes:

Adds a new size prop to replace the (now deprecated) small and large props on Button/AnchorButton and ButtonGroup.

@svc-palantir-github
Copy link

Add `size` prop to Button and ButtonGroup

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@svc-palantir-github
Copy link

Add new SizeSelect and use in Button/ButtonGroup interactive playgrounds

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas force-pushed the gdouglas/size-prop-buttons branch from 160037c to e5eb6e7 Compare February 4, 2025 18:28
@svc-palantir-github
Copy link

Add new SizeSelect and use in Button/ButtonGroup interactive playgrounds

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas force-pushed the gdouglas/size-prop-buttons branch from e5eb6e7 to 1ccfc06 Compare February 4, 2025 20:07
@svc-palantir-github
Copy link

Add new SizeSelect and use in Button/ButtonGroup interactive playgrounds

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas force-pushed the gdouglas/size-prop-buttons branch from 1ccfc06 to e900982 Compare February 4, 2025 22:30
@svc-palantir-github
Copy link

Add new SizeSelect and use in Button/ButtonGroup interactive playgrounds

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas force-pushed the gdouglas/size-prop-buttons branch from 06c27eb to 6e7909c Compare February 4, 2025 22:46
@svc-palantir-github
Copy link

Migrate all buttons with `small` prop

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas force-pushed the gdouglas/size-prop-buttons branch from ece77a3 to 19204b3 Compare February 5, 2025 18:21
@svc-palantir-github
Copy link

Preserve existing class resolution behavior for small/large props

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@svc-palantir-github
Copy link

Modify sizeClass to handle components without small variant

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas requested a review from jscheiny February 12, 2025 18:36
@svc-palantir-github
Copy link

Wrap prop validation warning logging logic in logDeprecatedSizeWarning

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@svc-palantir-github
Copy link

Update ESLint deprecation ignore statements

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@svc-palantir-github
Copy link

Merge branch 'develop' into gdouglas/size-prop-buttons

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@svc-palantir-github
Copy link

Lint

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Comment on lines 144 to 153
if (large && small) {
console.warn(
ns +
` <${component}> large and small props are mutually exclusive. Please use size="large" or size="small" instead.`,
);
} else if (large) {
console.warn(ns + ` <${component}> large is deprecated. Please use size="large" instead.`);
} else if (small) {
console.warn(ns + ` <${component}> small is deprecated. Please use size="small" instead.`);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to log if these props are non null rather than just true. That way if someone is doing something like <Button small={someBooleanVariable} /> we properly log even when passing false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah, good call. Added in 5337c00

@svc-palantir-github
Copy link

Check for non-null values in logDeprecatedSizeWarning

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas merged commit 9aac861 into develop Feb 14, 2025
13 checks passed
@ggdouglas ggdouglas deleted the gdouglas/size-prop-buttons branch February 14, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants