Ensure UI elements (buttons, icons, tooltips, overlays) are only registered or rendered when the corresponding configuration or feature flag is enabled. Also ensure feature flags are passed into components or a central store so components make rendering decisions from configuration rather than hard-coded assumptions.
Motivation
How to apply
Propagate flags: accept feature flags as props at top-level components and pass them into your UI components or into the app/store. Example pattern (top-level): // LikeC4Diagram.tsx (pattern reference) <LikeC4Diagram enableSearch={enableSearch} />
Gate registration: only add buttons/actions to arrays when the flag is true. Example: const buttons = [] if (flags.enableVscode) { buttons.push({ id: ‘open-in-vscode’, label: ‘Open in VSCode’, onClick: () => { /* … */ }, }) }
Gate rendering: only render optional UI elements in JSX when the flag is true or derived from the store/props. Example:
Notes
Enter the URL of a public GitHub repository