Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(project): update enable-2021-release to enable-v11-release #8660

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down Expand Up @@ -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');
}
Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/globals/scss/_feature-flags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 ==
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/globals/scss/_theme-tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/globals/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/feature-flags/feature-flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -4666,15 +4666,15 @@ 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 {
"flags": 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,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Checkbox/Checkbox-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const checkbox = () => {

export const unstable_Checkbox = () => {
return (
<FeatureFlags flags={{ 'enable-2021-release': true }}>
<FeatureFlags flags={{ 'enable-v11-release': true }}>
<fieldset className={`${prefix}--fieldset`}>
<legend className={`${prefix}--label`}>Checkbox heading</legend>
<Checkbox
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Checkbox = React.forwardRef(function Checkbox(
wrapperClassName
);

const enabled = useFeatureFlag('enable-2021-release');
const enabled = useFeatureFlag('enable-v11-release');

return (
<div className={wrapperClasses}>
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Search/Search-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const SizeStory = () => (
</div>
<br />
<br />
<FeatureFlags flags={{ 'enable-2021-release': true }}>
<FeatureFlags flags={{ 'enable-v11-release': true }}>
<h3>Feature Flags: ENABLED</h3>
<br />
<br />
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
12 changes: 6 additions & 6 deletions packages/react/src/components/StructuredList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,46 +24,46 @@ import {
import { useFeatureFlag } from '../FeatureFlags';

export function StructuredListWrapper(props) {
const enabled = useFeatureFlag('enable-2021-release');
const enabled = useFeatureFlag('enable-v11-release');
if (enabled) {
return <StructuredListWrapperNext {...props} />;
}
return <StructuredListWrapperClassic {...props} />;
}

export function StructuredListHead(props) {
const enabled = useFeatureFlag('enable-2021-release');
const enabled = useFeatureFlag('enable-v11-release');
if (enabled) {
return <StructuredListHeadNext {...props} />;
}
return <StructuredListHeadClassic {...props} />;
}
export function StructuredListInput(props) {
const enabled = useFeatureFlag('enable-2021-release');
const enabled = useFeatureFlag('enable-v11-release');
if (enabled) {
return <StructuredListInputNext {...props} />;
}
return <StructuredListInputClassic {...props} />;
}

export function StructuredListBody(props) {
const enabled = useFeatureFlag('enable-2021-release');
const enabled = useFeatureFlag('enable-v11-release');
if (enabled) {
return <StructuredListBodyNext {...props} />;
}
return <StructuredListBodyClassic {...props} />;
}

export function StructuredListRow(props) {
const enabled = useFeatureFlag('enable-2021-release');
const enabled = useFeatureFlag('enable-v11-release');
if (enabled) {
return <StructuredListRowNext {...props} />;
}
return <StructuredListRowClassic {...props} />;
}

export function StructuredListCell(props) {
const enabled = useFeatureFlag('enable-2021-release');
const enabled = useFeatureFlag('enable-v11-release');
if (enabled) {
return <StructuredListCellNext {...props} />;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Toggle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ToggleNext {...props} />;
}
Expand Down