feat(Datagrid): add feature flags to select hooks until fully released #2937
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributes to #2917
This PR adds feature flags to some of the Datagrid hooks that we've discussed are not considered as part of the base Datagrid component. The hooks will still work as expected, there will just be a console error if the hook is not enabled and a console warning if it is enabled.
I also updated some of the feature flag logic in
package-settings.js
so that if a feature flag that does not exist in our list of default flags, it doesn't log anything to the console. Previously you could set any feature flag even if it wasn't some that existed, for exampleThis would have resulted in us logging a warning to the browser console
Carbon for IBM Products (WARNING): Feature "Datagrid.someRandomFlag" enabled via feature flags.
Hooks that were updated to require feature flags:
What did you change?
How did you test and verify your work?
Storybook