RocketCommunicationsInc / astro

Astro UXDS is a collection of guidelines, patterns and components for designing space-based user interface applications.
https://astrouxds.com
Other
108 stars 25 forks source link

deprecate boolean 'small' prop #1172

Closed kiley-mitti closed 1 year ago

kiley-mitti commented 1 year ago

Brief Description

Deprecate the boolean 'small' prop on rux components in favor of the size= prop for consistency.

This is mostly a suggestion. I've heard a couple of times that a minor irritation is that, within our component library, the way to set a component's size is not a standard prop. Sometimes adding a boolean 'small' will set it. Sometimes it is size="whatever"

In this PR I've standardized on size=""

For the boolean props I've added size = "small" | "medium" where medium is the default size. I'm not actually sure about making the default size called large but calling it medium without a large seemed odd. Calling it normal or default could work.. and I suppose it doesn't necessarily matter since it IS the default size.. it will happen regardless of what the dev types into the prop. But I could use input there. We decided the default should be medium.

Check it out and let me know what you think!

Also, need to add a changeset. I THINK it is minor since it deprecates but does not remove a prop.. but not sure.

JIRA Link

ASTRO-6246

Related Issue

General Notes

This is just a suggestion using Notification Banner as a suggestion.

Motivation and Context

This would create a standard prop 'size' that users would expect to use on any component where the size can change. This PR is just an example/test of how that might work.

Issues and Limitations

The components with 'small' boolean prop don't have a medium size, only small and large. That might be confusing? But I think it is still less confusing than having some components use a boolean and some use a string prop for the same variable.

Types of changes

Checklist

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: d963524696980f4f486aea48208d64b95664dac6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

netlify[bot] commented 1 year ago

Deploy Preview for astro-stencil ready!

Name Link
Latest commit d963524696980f4f486aea48208d64b95664dac6
Latest deploy log https://app.netlify.com/sites/astro-stencil/deploys/64ada2e6124aa800086cb724
Deploy Preview https://deploy-preview-1172--astro-stencil.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 1 year ago

Deploy Preview for astro-preview ready!

Name Link
Latest commit d963524696980f4f486aea48208d64b95664dac6
Latest deploy log https://app.netlify.com/sites/astro-preview/deploys/64ada2e61924690008315286
Deploy Preview https://deploy-preview-1172--astro-preview.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

markacianfrani commented 1 year ago

Gonna close this for now. We'll be tackling size as a system concept soon