carbon-design-system / carbon

A design system built by IBM
https://www.carbondesignsystem.com
Apache License 2.0
7.8k stars 1.8k forks source link

Feature Flags: Update package to support aliases 🏖️ #15966

Open tay1orjones opened 6 months ago

tay1orjones commented 6 months ago

In https://github.com/carbon-design-system/carbon/pull/15964 we outlined the approach we'd like to take in our next major to ship breaking changes behind feature flags in the current/v11.

As part of this, flags can "graduate" from experimental status and become committed to a release. This is done by renaming the flag:

enable-tile-contrast -> enable-v12-tile-contrast

Ideally the feature flag package would support this rename workflow so it would be seamless from an authoring perspective and from a user perspective:

I think we could accomplish this by adding support for the concept of flag "aliases":

Without this work we'll have to have duplicate flag definitions and double check both flags within @carbon/react, example. It's prone to error and requires extra maintenance overhead. This would also cover us for anytime a flag name needs to change due to misspelling, change in scope, or any other reason.


Also we decided in https://github.com/carbon-design-system/carbon/pull/15964 to move away from the enable-experimental-* naming convention.


Additional related concerns:

github-actions[bot] commented 6 months ago

Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.

If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.

sstrubberg commented 2 months ago

I'm totally down for this but can we get some examples of how it might be used in relation to the next major? I guess I'm sorta wondering if this is a must have vs. a nice to have for v12.