From 729f5c177d2542e38122041f6fecc48ee8c6b15e Mon Sep 17 00:00:00 2001 From: Josh Black Date: Wed, 12 May 2021 11:05:19 -0500 Subject: [PATCH] refactor(project): update enable-2021-release to enable-v11-release (#8660) * refactor(project): update enable-2021-release to enable-v11-release * fix(toggle): rename v11 release flag Co-authored-by: Taylor Jones Co-authored-by: Taylor Jones --- .../components/structured-list/_structured-list.scss | 6 +++--- .../components/src/globals/scss/_feature-flags.scss | 4 ++-- .../components/src/globals/scss/_theme-tokens.scss | 2 +- packages/components/src/globals/scss/styles.scss | 2 +- packages/feature-flags/feature-flags.yml | 4 ++-- .../__tests__/__snapshots__/PublicAPI-test.js.snap | 4 ++-- packages/react/src/components/Button/Button.js | 2 +- .../react/src/components/Checkbox/Checkbox-story.js | 2 +- packages/react/src/components/Checkbox/Checkbox.js | 2 +- packages/react/src/components/Search/Search-story.js | 2 +- packages/react/src/components/Search/Search.js | 2 +- .../react/src/components/StructuredList/index.js | 12 ++++++------ packages/react/src/components/Toggle/index.js | 2 +- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/components/src/components/structured-list/_structured-list.scss b/packages/components/src/components/structured-list/_structured-list.scss index cd0b83acd884..ad01758e2247 100644 --- a/packages/components/src/components/structured-list/_structured-list.scss +++ b/packages/components/src/components/structured-list/_structured-list.scss @@ -17,7 +17,7 @@ .#{$prefix}--structured-list--selection .#{$prefix}--structured-list-th { @include padding--data-structured-list; } - @if feature-flag-enabled('enable-2021-release') { + @if feature-flag-enabled('enable-v11-release') { .#{$prefix}--structured-list-row--focused-within { @include focus-outline('outline'); } @@ -67,7 +67,7 @@ cursor: inherit; } - @if not feature-flag-enabled('enable-2021-release') { + @if not feature-flag-enabled('enable-v11-release') { .#{$prefix}--structured-list-row:focus:not(.#{$prefix}--structured-list-row--header-row) { @include focus-outline('outline'); } @@ -123,7 +123,7 @@ display: table-cell; max-width: 36rem; color: $text-secondary; - @if feature-flag-enabled('enable-2021-release') { + @if feature-flag-enabled('enable-v11-release') { border-top: 1px solid $border-subtle; } diff --git a/packages/components/src/globals/scss/_feature-flags.scss b/packages/components/src/globals/scss/_feature-flags.scss index c96420286f01..89c345112d78 100644 --- a/packages/components/src/globals/scss/_feature-flags.scss +++ b/packages/components/src/globals/scss/_feature-flags.scss @@ -33,12 +33,12 @@ $default-feature-flags: ( grid-columns-16: false, grid--fallback: false, enable-css-custom-properties: false, - enable-2021-release: false, + enable-v11-release: false, ); $feature-flags: map-merge($default-feature-flags, $feature-flags); -@if feature-flag-enabled('enable-2021-release') == true { +@if feature-flag-enabled('enable-v11-release') == true { @if variable-exists(css--disable-css-custom-properties) == false or $css--disable-css-custom-properties == diff --git a/packages/components/src/globals/scss/_theme-tokens.scss b/packages/components/src/globals/scss/_theme-tokens.scss index 5dd694253e01..99848fca2fff 100644 --- a/packages/components/src/globals/scss/_theme-tokens.scss +++ b/packages/components/src/globals/scss/_theme-tokens.scss @@ -15,7 +15,7 @@ // to make sure that they're in sync if one has diverged from the other. @include carbon--theme(); -@if not feature-flag-enabled('enable-2021-release') { +@if not feature-flag-enabled('enable-v11-release') { $background: $ui-background; $layer: $ui-01; $layer-accent: $ui-03; diff --git a/packages/components/src/globals/scss/styles.scss b/packages/components/src/globals/scss/styles.scss index a9202060c30a..cd4d306907cb 100644 --- a/packages/components/src/globals/scss/styles.scss +++ b/packages/components/src/globals/scss/styles.scss @@ -61,7 +61,7 @@ $css--use-experimental-grid: false !default; /// @deprecated (For v10) v10 always uses `@carbon/grid` $css--use-experimental-grid-fallback: false !default; -/// If `enable-2021-release` is set to `true`, it automatically enables the custom properties flag. +/// If `enable-v11-release` is set to `true`, it automatically enables the custom properties flag. /// If so, we need a way to disable custom properties, but use the new tokens. /// @access public /// @type Bool diff --git a/packages/feature-flags/feature-flags.yml b/packages/feature-flags/feature-flags.yml index 88d7c268dd0f..963de1a8c370 100644 --- a/packages/feature-flags/feature-flags.yml +++ b/packages/feature-flags/feature-flags.yml @@ -18,7 +18,7 @@ feature-flags: description: > Enable CSS Grid Layout in the Grid and Column React components enabled: false - - name: enable-2021-release + - name: enable-v11-release description: > - Enable the features and functionality for the 2021 Release + Enable the features and functionality for the v11 Release enabled: false diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index a718524c4dfe..deddeafea454 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -4666,7 +4666,7 @@ Map { "enable-css-custom-properties" => false, "enable-use-controlled-state-with-value" => false, "enable-css-grid" => false, - "enable-2021-release" => false, + "enable-v11-release" => false, }, }, "_currentValue2": FeatureFlagScope { @@ -4674,7 +4674,7 @@ Map { "enable-css-custom-properties" => false, "enable-use-controlled-state-with-value" => false, "enable-css-grid" => false, - "enable-2021-release" => false, + "enable-v11-release" => false, }, }, "_threadCount": 0, diff --git a/packages/react/src/components/Button/Button.js b/packages/react/src/components/Button/Button.js index f0ea21b7adb8..fe0ed52f354a 100644 --- a/packages/react/src/components/Button/Button.js +++ b/packages/react/src/components/Button/Button.js @@ -118,7 +118,7 @@ const Button = React.forwardRef(function Button( return () => document.removeEventListener('keydown', handleEscKeyDown); }, []); - const enabled = useFeatureFlag('enable-2021-release'); + const enabled = useFeatureFlag('enable-v11-release'); const buttonClasses = classNames(className, { [`${prefix}--btn`]: true, diff --git a/packages/react/src/components/Checkbox/Checkbox-story.js b/packages/react/src/components/Checkbox/Checkbox-story.js index d1b682eb4856..6b43a8ec950f 100644 --- a/packages/react/src/components/Checkbox/Checkbox-story.js +++ b/packages/react/src/components/Checkbox/Checkbox-story.js @@ -43,7 +43,7 @@ export const checkbox = () => { export const unstable_Checkbox = () => { return ( - +
Checkbox heading diff --git a/packages/react/src/components/Search/Search-story.js b/packages/react/src/components/Search/Search-story.js index bf56429ac750..a43bd79ce169 100644 --- a/packages/react/src/components/Search/Search-story.js +++ b/packages/react/src/components/Search/Search-story.js @@ -84,7 +84,7 @@ export const SizeStory = () => (

- +

Feature Flags: ENABLED



diff --git a/packages/react/src/components/Search/Search.js b/packages/react/src/components/Search/Search.js index 0ae575ab854e..6e0819f7dde8 100644 --- a/packages/react/src/components/Search/Search.js +++ b/packages/react/src/components/Search/Search.js @@ -192,7 +192,7 @@ export default class Search extends Component { let enabled; if (scope.enabled) { - enabled = scope.enabled('enable-2021-release'); + enabled = scope.enabled('enable-v11-release'); } const searchClasses = classNames({ diff --git a/packages/react/src/components/StructuredList/index.js b/packages/react/src/components/StructuredList/index.js index 2425e255b13b..99d9fcb42e23 100644 --- a/packages/react/src/components/StructuredList/index.js +++ b/packages/react/src/components/StructuredList/index.js @@ -24,7 +24,7 @@ import { import { useFeatureFlag } from '../FeatureFlags'; export function StructuredListWrapper(props) { - const enabled = useFeatureFlag('enable-2021-release'); + const enabled = useFeatureFlag('enable-v11-release'); if (enabled) { return ; } @@ -32,14 +32,14 @@ export function StructuredListWrapper(props) { } export function StructuredListHead(props) { - const enabled = useFeatureFlag('enable-2021-release'); + const enabled = useFeatureFlag('enable-v11-release'); if (enabled) { return ; } return ; } export function StructuredListInput(props) { - const enabled = useFeatureFlag('enable-2021-release'); + const enabled = useFeatureFlag('enable-v11-release'); if (enabled) { return ; } @@ -47,7 +47,7 @@ export function StructuredListInput(props) { } export function StructuredListBody(props) { - const enabled = useFeatureFlag('enable-2021-release'); + const enabled = useFeatureFlag('enable-v11-release'); if (enabled) { return ; } @@ -55,7 +55,7 @@ export function StructuredListBody(props) { } export function StructuredListRow(props) { - const enabled = useFeatureFlag('enable-2021-release'); + const enabled = useFeatureFlag('enable-v11-release'); if (enabled) { return ; } @@ -63,7 +63,7 @@ export function StructuredListRow(props) { } export function StructuredListCell(props) { - const enabled = useFeatureFlag('enable-2021-release'); + const enabled = useFeatureFlag('enable-v11-release'); if (enabled) { return ; } diff --git a/packages/react/src/components/Toggle/index.js b/packages/react/src/components/Toggle/index.js index 8c9a766eab95..b65c1694da45 100644 --- a/packages/react/src/components/Toggle/index.js +++ b/packages/react/src/components/Toggle/index.js @@ -13,7 +13,7 @@ import ToggleClassic from './Toggle'; import { useFeatureFlag } from '../FeatureFlags'; function Toggle(props) { - const enabled = useFeatureFlag('enable-2021-release'); + const enabled = useFeatureFlag('enable-v11-release'); if (enabled) { return ; }