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..176c54bfa811 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..2ec69cd9d9cc 100644 --- a/frontend/web/styles/components/_metrics.scss +++ b/frontend/web/styles/components/_metrics.scss @@ -16,4 +16,12 @@ display: grid; justify-content: center; row-gap: 12px; -} \ No newline at end of file + 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; + } +} diff --git a/frontend/web/styles/project/_modals.scss b/frontend/web/styles/project/_modals.scss index 2459465c393d..b4be88b90a47 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,12 +343,31 @@ $side-width: 800px; } } +// Lets a long drawer title truncate instead of pushing its buttons out +.side-modal .modal-title { + min-width: 0; +} + +.side-modal.create-feature-modal { + .modal-body { + padding-top: 0; + } + .tabs .tab-item { + padding-top: 24px; + } +} + @include media-breakpoint-down(md) { - .modal-dialog { - margin:0; + // Drawers fill the screen; dialogs stay cards + .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; - height: 100vh; + border-radius: 0; + min-height: 100vh; + // Fits the visible screen when the mobile browser toolbar shows + min-height: 100dvh; } } }