Skip to content

Commit 23e1cea

Browse files
fix: env columns hard to distinguish in compare view (#7250)
1 parent fd03ae3 commit 23e1cea

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

frontend/web/components/CompareEnvironments.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import Tag from './tags/Tag'
1414
import Icon from './icons/Icon'
1515
import Constants from 'common/constants'
1616
import Button from './base/forms/Button'
17+
import EmptyState from './EmptyState'
1718
import Tooltip from './Tooltip'
1819
import { withRouter } from 'react-router-dom'
1920
import { getDarkMode } from 'project/darkMode'
@@ -313,6 +314,7 @@ class CompareEnvironments extends Component {
313314
<FeatureRow
314315
condensed
315316
isCompareEnv
317+
className='border-left-1 ps-2'
316318
fadeEnabled={fadeEnabled}
317319
fadeValue={fadeValue}
318320
history={this.props.history}
@@ -344,9 +346,11 @@ class CompareEnvironments extends Component {
344346
)}
345347
{!this.state.isLoading &&
346348
(!this.state.changes || !this.state.changes.length) && (
347-
<div className='text-center mt-2'>
348-
These environments have no flag differences
349-
</div>
349+
<EmptyState
350+
title='No flag differences'
351+
description='These environments have identical flag configurations.'
352+
icon='checkmark-circle'
353+
/>
350354
)}
351355
{!this.state.isLoading &&
352356
this.state.changes &&
@@ -390,7 +394,7 @@ class CompareEnvironments extends Component {
390394
</div>
391395
<Flex className='table-column'></Flex>
392396
</Flex>
393-
<Flex className='flex-row'>
397+
<Flex className='flex-row border-left-1 ps-2'>
394398
<div
395399
className='table-column'
396400
style={{ width: '80px' }}

frontend/web/components/CondensedFeatureRow.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,6 @@ const CondensedFeatureRow: React.FC<CondensedFeatureRowProps> = ({
7474
</div>
7575
<Flex className='table-column clickable'>
7676
<Row>
77-
<div
78-
onClick={() => permission && !readOnly && editFeature()}
79-
style={{ flex: 1 }}
80-
className={`overflow-hidden ${fadeValue ? 'faded' : ''}`}
81-
>
82-
<FeatureValue
83-
value={environmentFlags?.[id]?.feature_state_value ?? null}
84-
data-test={`feature-value-${index}`}
85-
/>
86-
</div>
87-
8877
<SegmentOverridesIcon
8978
onClick={(e) => {
9079
e.stopPropagation()
@@ -100,6 +89,16 @@ const CondensedFeatureRow: React.FC<CondensedFeatureRowProps> = ({
10089
count={projectFlag.num_identity_overrides}
10190
showPlusIndicator={showPlusIndicator}
10291
/>
92+
<div
93+
onClick={() => permission && !readOnly && editFeature()}
94+
style={{ flex: 1 }}
95+
className={`overflow-hidden ${fadeValue ? 'faded' : ''}`}
96+
>
97+
<FeatureValue
98+
value={environmentFlags?.[id]?.feature_state_value ?? null}
99+
data-test={`feature-value-${index}`}
100+
/>
101+
</div>
103102
</Row>
104103
</Flex>
105104
</Flex>

0 commit comments

Comments
 (0)