From 6c3159542e19c49ebd7d4f4a0affbf05ed0c42ff Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 17 Nov 2026 16:40:00 -0300 Subject: [PATCH 1/3] fix(Styles): Make token border colours work with Bootstrap's .border Co-Authored-By: Claude Opus 5.5 --- frontend/scripts/generate-tokens.mjs | 1 - frontend/web/styles/3rdParty/_bootstrap.scss | 26 +++++++++++++++----- frontend/web/styles/_token-utilities.scss | 10 -------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/frontend/scripts/generate-tokens.mjs b/frontend/scripts/generate-tokens.mjs index f9a62152f879..18b6cca1d47d 100644 --- a/frontend/scripts/generate-tokens.mjs +++ b/frontend/scripts/generate-tokens.mjs @@ -479,7 +479,6 @@ function generateUtilities() { // Colour utilities const colourMappings = { - border: { prefix: 'border', property: 'border-color' }, icon: { prefix: 'icon', property: null }, // special: color + fill surface: { prefix: 'bg-surface', property: 'background-color' }, text: { prefix: 'text', property: 'color' }, diff --git a/frontend/web/styles/3rdParty/_bootstrap.scss b/frontend/web/styles/3rdParty/_bootstrap.scss index d982b7d5a2e0..a9ed3e2fdc8e 100644 --- a/frontend/web/styles/3rdParty/_bootstrap.scss +++ b/frontend/web/styles/3rdParty/_bootstrap.scss @@ -48,12 +48,26 @@ $_color-util: map-merge( ); $utilities: map-merge($utilities, ("color": $_color-util)); -// Border colour: token border utilities take over. Values are identical to -// Bootstrap's, so a no-op; it just moves ownership to the token layer. +// Border colour: Bootstrap generates `.border-*` with the token colours, after +// `.border`, so `border border-warning` draws the warning colour. $_border-util: map-get($utilities, "border-color"); $_border-util: map-merge( $_border-util, - (values: map-remove(map-get($_border-util, "values"), "danger", "info", "success", "warning")) + ( + values: map-merge( + map-get($_border-util, "values"), + ( + "action": var(--color-border-action), + "danger": var(--color-border-danger), + "default": var(--color-border-default), + "disabled": var(--color-border-disabled), + "info": var(--color-border-info), + "strong": var(--color-border-strong), + "success": var(--color-border-success), + "warning": var(--color-border-warning), + ) + ), + ) ); $utilities: map-merge($utilities, ("border-color": $_border-util)); @@ -104,8 +118,8 @@ $utilities: map-merge($utilities, ("shadow": $_shadow-util)); padding: 0; } -// Bootstrap's `.border*` utilities paint `--bs-border-color` with `!important`, -// so `.border-default` can never win. Point the Bootstrap variable at the token. -:root { +// The colour of a plain `.border`. On body, not :root, so the token resolves +// under .dark too. +body { --bs-border-color: var(--color-border-default); } diff --git a/frontend/web/styles/_token-utilities.scss b/frontend/web/styles/_token-utilities.scss index 488ed0b1c3db..143f909b03e5 100644 --- a/frontend/web/styles/_token-utilities.scss +++ b/frontend/web/styles/_token-utilities.scss @@ -34,16 +34,6 @@ .text-tertiary { color: var(--color-text-tertiary); } .text-warning { color: var(--color-text-warning); } -// Border -.border-action { border-color: var(--color-border-action); } -.border-danger { border-color: var(--color-border-danger); } -.border-default { border-color: var(--color-border-default); } -.border-disabled { border-color: var(--color-border-disabled); } -.border-info { border-color: var(--color-border-info); } -.border-strong { border-color: var(--color-border-strong); } -.border-success { border-color: var(--color-border-success); } -.border-warning { border-color: var(--color-border-warning); } - // Icon .icon-action { color: var(--color-icon-action); fill: var(--color-icon-action); } .icon-danger { color: var(--color-icon-danger); fill: var(--color-icon-danger); } From c20796ebff422bcafe5b2013134dc0e112f75dfd Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 17 Nov 2026 17:00:01 -0300 Subject: [PATCH 2/3] fix(Multivariate): Lighten the Currently served box Co-Authored-By: Claude Opus 5.5 --- frontend/web/components/mv/VariationOptions.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/web/components/mv/VariationOptions.tsx b/frontend/web/components/mv/VariationOptions.tsx index a0fe35aca129..2db489e1b985 100644 --- a/frontend/web/components/mv/VariationOptions.tsx +++ b/frontend/web/components/mv/VariationOptions.tsx @@ -82,13 +82,13 @@ export const VariationOptions: FC = ({ {/* No radio, unlike the row below: selecting it would save the stale value as a literal override. */} {select && !!divergedOverride && ( -
+
Currently served
-
+
Date: Tue, 17 Nov 2026 17:13:22 -0300 Subject: [PATCH 3/3] fix(Multivariate): Highlight the currently served value Co-Authored-By: Claude Opus 5.5 --- .../web/components/ValueEditor/ValueEditor.tsx | 14 +++++++++----- .../modals/create-feature/tabs/FeatureValueTab.tsx | 7 ++++--- frontend/web/components/mv/VariationOptions.tsx | 12 +++++------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/frontend/web/components/ValueEditor/ValueEditor.tsx b/frontend/web/components/ValueEditor/ValueEditor.tsx index 847760764f96..e06636b66cbe 100644 --- a/frontend/web/components/ValueEditor/ValueEditor.tsx +++ b/frontend/web/components/ValueEditor/ValueEditor.tsx @@ -35,6 +35,8 @@ export interface ValueEditorProps { // A string, not FlagsmithValue: deciding that "123" is a number is the // caller's job (Utils.getTypedValue, Utils.valueToFeatureState). onChange?: (value: string) => void + // Not editable, but shown at full strength, unlike `disabled`. + readOnly?: boolean value?: FlagsmithValue } @@ -47,6 +49,7 @@ const ValueEditor: FC = ({ language: languageProp, onBlur, onChange, + readOnly, value, }) => { const [picked, setPicked] = useState() @@ -75,7 +78,8 @@ const ValueEditor: FC = ({ // A caller that pins the format has nothing to switch, so the row goes, and // copy goes with it as it always has. - const showControls = !disabled && !languageProp + const locked = disabled || readOnly + const showControls = !locked && !languageProp // Only rendered alongside the format row, so a pinned caller does not need a // DOMParser run on every keystroke. @@ -117,10 +121,10 @@ const ValueEditor: FC = ({ diff --git a/frontend/web/components/modals/create-feature/tabs/FeatureValueTab.tsx b/frontend/web/components/modals/create-feature/tabs/FeatureValueTab.tsx index 172cefada982..71fc35401d52 100644 --- a/frontend/web/components/modals/create-feature/tabs/FeatureValueTab.tsx +++ b/frontend/web/components/modals/create-feature/tabs/FeatureValueTab.tsx @@ -8,6 +8,7 @@ import { AddVariationButton } from 'components/mv/AddVariationButton' import ErrorMessage from 'components/ErrorMessage' import InfoMessage from 'components/InfoMessage' import WarningMessage from 'components/WarningMessage' +import Banner from 'components/base/Banner' import Tooltip from 'components/Tooltip' import Icon from 'components/icons/Icon' import Switch from 'components/Switch' @@ -471,9 +472,9 @@ const FeatureValueTab: FC = ({ )} {!!divergedVariantOverride && ( - + + {`This identity is served a stale copy of variation '${divergedVariantOverride.key}', taken when the override was saved. Press Update Feature to refresh it.`} + )} = ({ Currently served
-
- -
+
)} {select && !!unmatchedOverride && (