-
Notifications
You must be signed in to change notification settings - Fork 794
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(Overview & FAQs page) Feature flag update (#4259)
* Adding feature flag to Overview & FAQs pages * feat: add Tag * chore: oops wrong PR - revert * Updating in the data/components.json * chore: update classname and add tokens * Copy fixes * link shortened * Anna's feedback * fix(checklist): extra % --------- Co-authored-by: Alison Joseph <[email protected]> Co-authored-by: Scott Strubberg <[email protected]>
- Loading branch information
1 parent
b8fd3ac
commit 803f54c
Showing
9 changed files
with
137 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
title: Overview | ||
description: | ||
Components are one of the key building blocks of the design system. Each | ||
component has been designed and coded to solve a specific UI problem. | ||
tabs: ['Components', 'Accessibility status', 'Feature flags'] | ||
--- | ||
|
||
import { Launch } from '@carbon/icons-react'; | ||
import { Link } from '@carbon/react'; | ||
|
||
<PageDescription> | ||
|
||
Feature flags enable new behaviors and styling, allowing users to opt-in to new | ||
breaking changes while staying on the current major version. | ||
|
||
</PageDescription> | ||
|
||
<AnchorLinks> | ||
|
||
<AnchorLink>Overview</AnchorLink> | ||
<AnchorLink>Components with feature flags</AnchorLink> | ||
<AnchorLink>How to implement</AnchorLink> | ||
|
||
</AnchorLinks> | ||
|
||
## Overview | ||
|
||
When a new feature flag is introduced, it is set to false or "off" by default to | ||
ensure backward compatibility. We are not deprecating the current components but | ||
encourage all teams to use the new feature flag-enabled components in their | ||
products moving forward. | ||
|
||
## Components with feature flags | ||
|
||
The following components have feature flags, with changes related to either | ||
design or development. | ||
|
||
| Component | Design change | Code change | | ||
| ---------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| Menu buttons (Overflow menu) | No design change | <Link href={"https://react.carbondesignsystem.com/?path=/docs/experimental-feature-flags-overflowmenu--overview"} renderIcon={() => <Launch aria-label="Launch" />}>React</Link> | | ||
| Modal | No design change | <Link href={"https://react.carbondesignsystem.com/?path=/docs/experimental-feature-flags-modal--overview"} renderIcon={() => <Launch aria-label="Launch" />}>React</Link> | | ||
| Notification | No design change | <Link href={"https://react.carbondesignsystem.com/?path=/docs/experimental-feature-flags-notifications-actionable--overview"} renderIcon={() => <Launch aria-label="Launch" />}>React</Link> | | ||
| Structured list | <Link href={"/components/structured-list/usage/#feature-flags"}>Usage tab</Link> | <Link href={"https://react.carbondesignsystem.com/?path=/docs/experimental-feature-flags-structuredlist--overview"} renderIcon={() => <Launch aria-label="Launch" />}>React</Link> | | ||
| Tile | <Link href={"/components/tile/usage/#feature-flags"}>Usage tab</Link> | <Link href={"https://react.carbondesignsystem.com/?path=/docs/experimental-feature-flags-tile--overview"} renderIcon={() => <Launch aria-label="Launch" />}>React</Link> | | ||
| Tree view | No design change | <Link href={"https://react.carbondesignsystem.com/?path=/docs/experimental-feature-flags-treeview--overview"} renderIcon={() => <Launch aria-label="Launch" />}>React</Link> | | ||
|
||
## How to implement | ||
|
||
### Code | ||
|
||
Each framework handles feature flags differently. At the moment, only React has | ||
available feature flags. This may change in the future, check back later for | ||
updates related to all available feature flags. | ||
|
||
<Title>React</Title> | ||
|
||
The development specifics for feature flags in React can be found in the | ||
[@carbon/react](https://react.carbondesignsystem.com/?path=/docs/experimental-feature-flags--overview) | ||
framework. | ||
|
||
### Design | ||
|
||
Inside a design file, click on the component with a feature flag (A). In the | ||
properties panel, locate the **Feature flag** boolean property (B). By default, | ||
this feature is turned off, but can be toggled on to enable the feature flag. | ||
|
||
<Row> | ||
<Column colLg={8}> | ||
|
||
![Feature flag implementation in Figma](images/feature-flag-implementation-1.png) | ||
|
||
</Column> | ||
</Row> | ||
|
||
Additionally, when clicking on the **components details** (C) in the properties | ||
panel, a description of the feature flag, and a link to the component's usage | ||
guidance is provided for more information in the **Component documentation** | ||
window (D). | ||
|
||
<Row> | ||
<Column colLg={8}> | ||
|
||
![Feature flag implementation in Figma](images/feature-flag-implementation-2.png) | ||
|
||
</Column> | ||
</Row> |
Binary file added
BIN
+113 KB
src/pages/components/overview/images/feature-flag-implementation-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+199 KB
src/pages/components/overview/images/feature-flag-implementation-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters