From 69b69a65b93f0ab9a322bc2c920dd659d6a5491a Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 17 Nov 2026 10:55:09 -0300 Subject: [PATCH 1/9] fix(Mobile): Keep drawers, segment rules and the feature summary usable on phones - Drawers grow with their content (min-height), so the lower half no longer renders without a background over the page. Dialogs stay content-sized cards. - Feature drawer tabs get the desktop spacing on phones. - Segment rule fields stack at full width; AND / AND NOT buttons are full width and evenly spaced, with the click on the button itself. - The feature drawer title shows just the flag name on phones, with the copy button beside it. - The environment summary shows two metrics per row on phones. Co-Authored-By: Claude Opus 5.5 --- .../components/feature-summary/FeatureRow.tsx | 14 +++++--- .../metrics/EnvironmentMetricsList.tsx | 10 +----- .../web/components/modals/CreateSegment.tsx | 33 +++++++++---------- .../Rule/components/RuleConditionRow.tsx | 12 +++---- frontend/web/styles/components/_metrics.scss | 9 +++++ frontend/web/styles/project/_modals.scss | 17 ++++++++-- 6 files changed, 56 insertions(+), 39 deletions(-) diff --git a/frontend/web/components/feature-summary/FeatureRow.tsx b/frontend/web/components/feature-summary/FeatureRow.tsx index 84a75d20f4c1..31863079ab53 100644 --- a/frontend/web/components/feature-summary/FeatureRow.tsx +++ b/frontend/web/components/feature-summary/FeatureRow.tsx @@ -235,7 +235,7 @@ const FeatureRow: FC = (props) => { : [] openModal( - + {!!cameFrom && ( = (props) => { )} - - {permission ? 'Edit Feature' : 'Feature'}: {projectFlag.name} + + {/* Phones show just the name so the copy button stays beside it */} + + {permission ? 'Edit Feature' : 'Feature'}:{' '} + + {projectFlag.name} = (props) => { onClick={() => { Utils.copyToClipboard(projectFlag.name) }} - className='ms-2' + className='ms-2 flex-shrink-0' > {ownerChips.length > 0 && ( -
+
{ownerChips.slice(0, 3).map((chip) => ( diff --git a/frontend/web/components/metrics/EnvironmentMetricsList.tsx b/frontend/web/components/metrics/EnvironmentMetricsList.tsx index 4b02f89d6726..1a9fd52fd89e 100644 --- a/frontend/web/components/metrics/EnvironmentMetricsList.tsx +++ b/frontend/web/components/metrics/EnvironmentMetricsList.tsx @@ -25,9 +25,6 @@ const EnvironmentMetricsList: FC = ({ }, ) - const MAX_COLUMNS = 6 - const columns = Math.min(data?.metrics?.length || 0, MAX_COLUMNS) || 1 - const extraMetricsData = getExtraMetricsData(projectId, environmentId) useEffect(() => { @@ -48,12 +45,7 @@ const EnvironmentMetricsList: FC = ({ } >
-
+
{data?.metrics.map((metric) => ( = ({ : 'Add at least one AND/NOT rule to create a segment.'} )} - - {!isReadOnly && ( -
+ -
- )} - {!isReadOnly && topLevelRuleType !== 'ANY' && ( -
addRule('NONE')} className='text-center'> + {topLevelRuleType === 'ANY' + ? 'Add OR Condition' + : 'Add AND Condition'} + + {topLevelRuleType !== 'ANY' && ( -
- )} -
+ )} +
+ )}
) diff --git a/frontend/web/components/segments/Rule/components/RuleConditionRow.tsx b/frontend/web/components/segments/Rule/components/RuleConditionRow.tsx index 1d5529525466..f3df50516f2e 100644 --- a/frontend/web/components/segments/Rule/components/RuleConditionRow.tsx +++ b/frontend/web/components/segments/Rule/components/RuleConditionRow.tsx @@ -84,9 +84,9 @@ const RuleConditionRow: React.FC = ({ )} -
-
-
+
+
+
= ({ setRuleProperty(ruleIndex, 'operator', value) }} options={operators} - className='col-10 col-sm-3 col-md-3' + className='col-12 col-sm-3 col-md-3' /> )} = ({ }) }} isValid={Utils.validateRule(rule) && !ruleErrors?.value} - className='col-10 col-sm-4 col-md-4' + className='col-12 col-sm-4 col-md-4' />
diff --git a/frontend/web/styles/components/_metrics.scss b/frontend/web/styles/components/_metrics.scss index d16f0f2ed29a..e1eabb09f487 100644 --- a/frontend/web/styles/components/_metrics.scss +++ b/frontend/web/styles/components/_metrics.scss @@ -16,4 +16,13 @@ display: grid; justify-content: center; row-gap: 12px; + // Phones: two per row + grid-template-columns: repeat(2, 1fr); + + // Wider screens: every metric on one row + @include media-breakpoint-up(md) { + grid-auto-columns: 1fr; + grid-auto-flow: column; + grid-template-columns: none; + } } \ No newline at end of file diff --git a/frontend/web/styles/project/_modals.scss b/frontend/web/styles/project/_modals.scss index 2459465c393d..12fcad6b49b3 100644 --- a/frontend/web/styles/project/_modals.scss +++ b/frontend/web/styles/project/_modals.scss @@ -345,11 +345,24 @@ $side-width: 800px; } @include media-breakpoint-down(md) { - .modal-dialog { + // Only drawers fill the screen; dialogs stay cards sized to their content + .side-modal .modal-dialog { margin:0; .modal-content { border-radius:0; - height: 100vh; + // min-height, not height: taller content must grow the panel, or it + // renders past its background on top of the page + min-height: 100vh; + } + } + + // Same spacing as the desktop side modal: none above the tabs, some below + .side-modal.create-feature-modal { + .modal-body { + padding-top: 0; + } + .tabs .tab-item:not(.p-0) { + padding-top: 24px; } } } From 5e78316ababbe42355760313d3df7671a5184789 Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 17 Nov 2026 11:18:45 -0300 Subject: [PATCH 2/9] fix(Mobile): Add the missing newline at the end of _metrics.scss Co-Authored-By: Claude Opus 5.5 --- frontend/web/styles/components/_metrics.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/web/styles/components/_metrics.scss b/frontend/web/styles/components/_metrics.scss index e1eabb09f487..7ff4f87bf0e8 100644 --- a/frontend/web/styles/components/_metrics.scss +++ b/frontend/web/styles/components/_metrics.scss @@ -25,4 +25,4 @@ grid-auto-flow: column; grid-template-columns: none; } -} \ No newline at end of file +} From 2b6c3f8f1b1557dfd7da6961d3864b408dc717a3 Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 17 Nov 2026 11:20:23 -0300 Subject: [PATCH 3/9] refactor(Mobile): Simplify the drawer spacing and mobile height rules The feature drawer's tab spacing matches desktop, so it no longer needs a breakpoint, and .p-0 is already !important. Co-Authored-By: Claude Opus 5.5 --- frontend/web/styles/project/_modals.scss | 30 +++++++++++------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/frontend/web/styles/project/_modals.scss b/frontend/web/styles/project/_modals.scss index 12fcad6b49b3..a3ecbec99e5e 100644 --- a/frontend/web/styles/project/_modals.scss +++ b/frontend/web/styles/project/_modals.scss @@ -119,7 +119,6 @@ $side-width: 800px; .tabs { .tab-item { - padding-top: 24px; padding-bottom: 24px; overflow-y: auto; height: calc(100vh - 110px); @@ -344,27 +343,26 @@ $side-width: 800px; } } +// Feature drawer: no space above the tabs, 24px below, at every width +.side-modal.create-feature-modal { + .modal-body { + padding-top: 0; + } + .tabs .tab-item { + padding-top: 24px; + } +} + @include media-breakpoint-down(md) { - // Only drawers fill the screen; dialogs stay cards sized to their content + // Only drawers fill the screen, growing with their content (min-height); + // dialogs stay cards sized to their content .side-modal .modal-dialog { - margin:0; + margin: 0; .modal-content { - border-radius:0; - // min-height, not height: taller content must grow the panel, or it - // renders past its background on top of the page + border-radius: 0; min-height: 100vh; } } - - // Same spacing as the desktop side modal: none above the tabs, some below - .side-modal.create-feature-modal { - .modal-body { - padding-top: 0; - } - .tabs .tab-item:not(.p-0) { - padding-top: 24px; - } - } } .modal-full-screen { From 700b5275a4f274fe865ec65e549a8948958be622 Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 17 Nov 2026 11:22:54 -0300 Subject: [PATCH 4/9] fix(Mobile): Keep drawers full width between 544px and 768px Bootstrap caps .modal-dialog at --bs-modal-width from 544px, so below the md breakpoint the drawer turned into a narrow card. Co-Authored-By: Claude Opus 5.5 --- frontend/web/styles/project/_modals.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/web/styles/project/_modals.scss b/frontend/web/styles/project/_modals.scss index a3ecbec99e5e..fcb6d15c2b0a 100644 --- a/frontend/web/styles/project/_modals.scss +++ b/frontend/web/styles/project/_modals.scss @@ -358,6 +358,8 @@ $side-width: 800px; // dialogs stay cards sized to their content .side-modal .modal-dialog { margin: 0; + // Bootstrap caps .modal-dialog width from 544px; drawers stay full width + max-width: none; .modal-content { border-radius: 0; min-height: 100vh; From 1f4718c30eeb534337c29af918e14e0863915d1e Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 17 Nov 2026 11:59:59 -0300 Subject: [PATCH 5/9] fix(Mobile): Let long drawer titles truncate and keep rule fields inside their row Co-Authored-By: Claude Opus 5.5 --- .../components/segments/Rule/components/RuleConditionRow.tsx | 2 +- frontend/web/styles/project/_modals.scss | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/web/components/segments/Rule/components/RuleConditionRow.tsx b/frontend/web/components/segments/Rule/components/RuleConditionRow.tsx index f3df50516f2e..176c54bfa811 100644 --- a/frontend/web/components/segments/Rule/components/RuleConditionRow.tsx +++ b/frontend/web/components/segments/Rule/components/RuleConditionRow.tsx @@ -85,7 +85,7 @@ const RuleConditionRow: React.FC = ({ )}
-
+
Date: Tue, 17 Nov 2026 12:22:50 -0300 Subject: [PATCH 6/9] fix(Mobile): Fit drawers to the visible screen when the browser toolbar shows Co-Authored-By: Claude Opus 5.5 --- frontend/web/styles/project/_modals.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/web/styles/project/_modals.scss b/frontend/web/styles/project/_modals.scss index 0a87093dc575..add584b64897 100644 --- a/frontend/web/styles/project/_modals.scss +++ b/frontend/web/styles/project/_modals.scss @@ -368,6 +368,8 @@ $side-width: 800px; .modal-content { border-radius: 0; min-height: 100vh; + // Fits the visible screen when the mobile browser toolbar shows + min-height: 100dvh; } } } From b72b54cbcae5d4c8e4839163e1f66611a7cacca2 Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 17 Nov 2026 12:26:54 -0300 Subject: [PATCH 7/9] chore(Mobile): Trim comments that repeat the code Co-Authored-By: Claude Opus 5.5 --- frontend/web/styles/components/_metrics.scss | 1 - frontend/web/styles/project/_modals.scss | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/web/styles/components/_metrics.scss b/frontend/web/styles/components/_metrics.scss index 7ff4f87bf0e8..2ec69cd9d9cc 100644 --- a/frontend/web/styles/components/_metrics.scss +++ b/frontend/web/styles/components/_metrics.scss @@ -16,7 +16,6 @@ display: grid; justify-content: center; row-gap: 12px; - // Phones: two per row grid-template-columns: repeat(2, 1fr); // Wider screens: every metric on one row diff --git a/frontend/web/styles/project/_modals.scss b/frontend/web/styles/project/_modals.scss index add584b64897..b4be88b90a47 100644 --- a/frontend/web/styles/project/_modals.scss +++ b/frontend/web/styles/project/_modals.scss @@ -348,7 +348,6 @@ $side-width: 800px; min-width: 0; } -// Feature drawer: no space above the tabs, 24px below, at every width .side-modal.create-feature-modal { .modal-body { padding-top: 0; @@ -359,8 +358,7 @@ $side-width: 800px; } @include media-breakpoint-down(md) { - // Only drawers fill the screen, growing with their content (min-height); - // dialogs stay cards sized to their content + // Drawers fill the screen; dialogs stay cards .side-modal .modal-dialog { margin: 0; // Bootstrap caps .modal-dialog width from 544px; drawers stay full width From 5593d85d91b253d3253eb7589bd607f8fb8a3438 Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 24 Nov 2026 15:32:21 -0300 Subject: [PATCH 8/9] fix(Mobile): Keep the responsive drawer title after creating a feature Co-Authored-By: Claude Opus 5.5 --- .../feature-summary/FeatureModalTitle.tsx | 32 +++++++++++++++++++ .../components/feature-summary/FeatureRow.tsx | 23 +++---------- .../components/modals/base/ModalDefault.tsx | 4 +-- .../create-feature/hoc/FeatureProvider.tsx | 10 +++++- 4 files changed, 48 insertions(+), 21 deletions(-) create mode 100644 frontend/web/components/feature-summary/FeatureModalTitle.tsx diff --git a/frontend/web/components/feature-summary/FeatureModalTitle.tsx b/frontend/web/components/feature-summary/FeatureModalTitle.tsx new file mode 100644 index 000000000000..ca3b22546232 --- /dev/null +++ b/frontend/web/components/feature-summary/FeatureModalTitle.tsx @@ -0,0 +1,32 @@ +import React, { FC } from 'react' +import IconButton from 'components/base/IconButton' +import Icon from 'components/icons/Icon' +import Utils from 'common/utils/utils' + +type FeatureModalTitleProps = { + name: string + label: string +} + +const FeatureModalTitle: FC = ({ label, name }) => ( + <> + + {/* Phones show just the name so the copy button stays beside it */} + {label}: + {name} + + { + Utils.copyToClipboard(name) + }} + className='ms-2 flex-shrink-0' + > + + + +) + +export default FeatureModalTitle diff --git a/frontend/web/components/feature-summary/FeatureRow.tsx b/frontend/web/components/feature-summary/FeatureRow.tsx index 31863079ab53..8430a58b454a 100644 --- a/frontend/web/components/feature-summary/FeatureRow.tsx +++ b/frontend/web/components/feature-summary/FeatureRow.tsx @@ -27,6 +27,7 @@ import { useGetHealthEventsQuery } from 'common/services/useHealthEvents' import { useGetProjectQuery } from 'common/services/useProject' import getUserDisplayName from 'common/utils/getUserDisplayName' import FeatureName from './FeatureName' +import FeatureModalTitle from './FeatureModalTitle' import FeatureDescription from './FeatureDescription' import FeatureTags from './FeatureTags' import { useFeatureRowState } from 'components/pages/features/hooks/useFeatureRowState' @@ -247,24 +248,10 @@ const FeatureRow: FC = (props) => { )} - - {/* Phones show just the name so the copy button stays beside it */} - - {permission ? 'Edit Feature' : 'Feature'}:{' '} - - {projectFlag.name} - - { - Utils.copyToClipboard(projectFlag.name) - }} - className='ms-2 flex-shrink-0' - > - - + {ownerChips.length > 0 && (
diff --git a/frontend/web/components/modals/base/ModalDefault.tsx b/frontend/web/components/modals/base/ModalDefault.tsx index 8354c7bc4c7b..2a6406031d74 100644 --- a/frontend/web/components/modals/base/ModalDefault.tsx +++ b/frontend/web/components/modals/base/ModalDefault.tsx @@ -17,8 +17,8 @@ export const setInterceptClose = (promise: (() => Promise) | null) => { interceptClose = promise } -let cb -export const setModalTitle = (title: string) => { +let cb: ((title: ReactNode) => void) | undefined +export const setModalTitle = (title: ReactNode) => { cb?.(title) } const ModalDefault: FC = ({ diff --git a/frontend/web/components/modals/create-feature/hoc/FeatureProvider.tsx b/frontend/web/components/modals/create-feature/hoc/FeatureProvider.tsx index 790384afbcac..8fa77712699a 100644 --- a/frontend/web/components/modals/create-feature/hoc/FeatureProvider.tsx +++ b/frontend/web/components/modals/create-feature/hoc/FeatureProvider.tsx @@ -2,6 +2,7 @@ import React, { Component } from 'react' import FeatureListStore from 'common/stores/feature-list-store' import ES6Component from 'common/ES6Component' import { setModalTitle } from 'components/modals/base/ModalDefault' +import FeatureModalTitle from 'components/feature-summary/FeatureModalTitle' // TODO: Migrate to a custom hook once we move away from Flux stores. // This class component is necessary because it uses ES6Component/listenTo @@ -49,7 +50,14 @@ export default function withFeatureProvider( `${document.location.pathname}?feature=${projectFlag.id}`, ) const newEnvironmentFlag = envFlags?.[projectFlag.id] || {} - setModalTitle(`Edit Feature ${projectFlag.name}`) + setModalTitle( + + + , + ) this.setState({ environmentFlag: { ...this.state.environmentFlag, From 8e0b379aee9fa65ccc620f2a54826dbd12265796 Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Tue, 24 Nov 2026 15:47:14 -0300 Subject: [PATCH 9/9] fix(IconButton): Keep its size when a flex row runs out of space Co-Authored-By: Claude Opus 5.5 --- frontend/web/components/base/IconButton/IconButton.scss | 1 + frontend/web/components/feature-summary/FeatureModalTitle.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/web/components/base/IconButton/IconButton.scss b/frontend/web/components/base/IconButton/IconButton.scss index fe3a7b02e45a..46686758bbf8 100644 --- a/frontend/web/components/base/IconButton/IconButton.scss +++ b/frontend/web/components/base/IconButton/IconButton.scss @@ -4,6 +4,7 @@ // Icons on a filled variant use --slate-0: ink on a coloured surface stays // white in both themes, and we have no token for that yet. .ds-icon-button { + flex-shrink: 0; justify-content: center; border-radius: var(--radius-md); transition: background-color var(--duration-fast) var(--easing-standard), diff --git a/frontend/web/components/feature-summary/FeatureModalTitle.tsx b/frontend/web/components/feature-summary/FeatureModalTitle.tsx index ca3b22546232..6ee21c451c9c 100644 --- a/frontend/web/components/feature-summary/FeatureModalTitle.tsx +++ b/frontend/web/components/feature-summary/FeatureModalTitle.tsx @@ -22,7 +22,7 @@ const FeatureModalTitle: FC = ({ label, name }) => ( onClick={() => { Utils.copyToClipboard(name) }} - className='ms-2 flex-shrink-0' + className='ms-2' >