Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frontend/web/components/modals/CreateGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -456,15 +456,15 @@ const CreateGroup: FC<CreateGroupType> = ({ group, orgId, roles }) => {
<Tabs uncontrolled className='px-0'>
<TabItem
tabLabel={
<div>
<>
General
{!!edited && <span className='unread'>*</span>}
</div>
</>
}
>
{editGroupEl}
</TabItem>
<TabItem tabLabel={<div>Permissions</div>}>{editPermissionsEl}</TabItem>
<TabItem tabLabel='Permissions'>{editPermissionsEl}</TabItem>
</Tabs>
) : (
editGroupEl
Expand Down
26 changes: 9 additions & 17 deletions frontend/web/components/modals/CreateSegment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,10 @@ const CreateSegment: FC<CreateSegmentType> = ({
<TabItem
tabLabelString='General'
tabLabel={
<Row className='justify-content-center flex-nowrap'>
General{' '}
{valueChanged && <div className='unread ml-2 px-1'>{'*'}</div>}
</Row>
<>
General
{valueChanged && <span className='unread'>{'*'}</span>}
</>
}
>
<div className='my-4'>
Expand Down Expand Up @@ -564,12 +564,12 @@ const CreateSegment: FC<CreateSegmentType> = ({
<TabItem
tabLabelString='Custom Fields'
tabLabel={
<Row className='justify-content-center flex-nowrap'>
<>
Custom Fields
{metadataValueChanged && (
<div className='unread ml-2 px-1 pt-2'>{'*'}</div>
<span className='unread'>{'*'}</span>
)}
</Row>
</>
}
>
<div className='my-4'>{MetadataTab}</div>
Expand All @@ -579,10 +579,7 @@ const CreateSegment: FC<CreateSegmentType> = ({
)}
{!(isEdit && !condensed) && metadataEnable && segmentContentType?.id && (
<Tabs value={tab} onChange={(tab: UserTabs) => setTab(tab)}>
<TabItem
tabLabelString='Basic configuration'
tabLabel={'Basic configuration'}
>
<TabItem tabLabel='Basic configuration'>
<div className={className || 'my-3 mx-4'}>
<CreateSegmentRulesTabForm
save={save}
Expand Down Expand Up @@ -610,12 +607,7 @@ const CreateSegment: FC<CreateSegmentType> = ({
/>
</div>
</TabItem>
<TabItem
tabLabelString='Custom Fields'
tabLabel={
<Row className='justify-content-center'>Custom Fields</Row>
}
>
<TabItem tabLabel='Custom Fields'>
<div className={className || 'my-3 mx-4'}>{MetadataTab}</div>
</TabItem>
</Tabs>
Expand Down
17 changes: 5 additions & 12 deletions frontend/web/components/modals/create-experiment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,14 +468,12 @@ const Index = class extends Component {
data-test='value'
tabLabelString='Value'
tabLabel={
<Row className='justify-content-center'>
Value{' '}
<>
Value
{this.state.valueChanged && (
<div className='unread ml-2 px-1'>
{'*'}
</div>
<span className='unread'>{'*'}</span>
)}
</Row>
</>
}
>
<FeatureValueTab
Expand Down Expand Up @@ -540,12 +538,7 @@ const Index = class extends Component {
</TabItem>
<TabItem
data-test='results'
tabLabelString='Results'
tabLabel={
<Row className='justify-content-center'>
Results
</Row>
}
tabLabel='Results'
>
<ExperimentResultsTab
environmentId={this.props.environmentId}
Expand Down
45 changes: 14 additions & 31 deletions frontend/web/components/modals/create-feature/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -571,12 +571,10 @@ const CreateFeatureModal: FC<CreateFeatureModalProps> = (props) => {
data-test='value'
tabLabelString='Value'
tabLabel={
<Row className='justify-content-center'>
Value{' '}
{valueChanged && (
<div className='unread ml-2 px-1'>{'*'}</div>
)}
</Row>
<>
Value
{valueChanged && <div className='unread'>*</div>}
</>
}
>
<FeatureValueTab
Expand Down Expand Up @@ -615,16 +613,10 @@ const CreateFeatureModal: FC<CreateFeatureModalProps> = (props) => {
data-test='segment_overrides'
tabLabelString='Segment Overrides'
tabLabel={
<Row
className={`justify-content-center ${
segmentsChanged ? 'pr-1' : ''
}`}
>
Segment Overrides{' '}
{segmentsChanged && (
<div className='unread ml-2 px-2'>*</div>
)}
</Row>
<>
Segment Overrides
{segmentsChanged && <div className='unread'>*</div>}
</>
}
>
<SegmentOverridesTab
Expand Down Expand Up @@ -660,12 +652,7 @@ const CreateFeatureModal: FC<CreateFeatureModalProps> = (props) => {
</TabItem>
)}
{(!Project.disableAnalytics || hasCodeReferences) && (
<TabItem
tabLabelString='Usage'
tabLabel={
<Row className='justify-content-center'>Usage</Row>
}
>
<TabItem tabLabelString='Usage' tabLabel='Usage'>
<UsageTab
projectId={projectId}
featureId={projectFlag.id}
Expand All @@ -691,9 +678,7 @@ const CreateFeatureModal: FC<CreateFeatureModalProps> = (props) => {
<TabItem
data-test='external-resources-links'
tabLabelString='Links'
tabLabel={
<Row className='justify-content-center'>Links</Row>
}
tabLabel='Links'
>
<ExternalResourcesLinkTab
githubId={githubId}
Expand All @@ -719,12 +704,10 @@ const CreateFeatureModal: FC<CreateFeatureModalProps> = (props) => {
data-test='settings'
tabLabelString='Settings'
tabLabel={
<Row className='justify-content-center'>
Settings{' '}
{settingsChanged && (
<div className='unread ml-2 px-1'>{'*'}</div>
)}
</Row>
<>
Settings
{settingsChanged && <div className='unread'>*</div>}
</>
}
>
<FeatureSettings
Expand Down
2 changes: 1 addition & 1 deletion frontend/web/components/navigation/TabMenu/TabButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const TabButton = React.forwardRef<HTMLButtonElement | null, TabButtonProps>(
isSelected ? ' tab-active' : ''
} ${className}`}
>
{child.props.tabLabel}
<span className='btn-tab__label'>{child.props.tabLabel}</span>
</Button>
)
},
Expand Down
8 changes: 8 additions & 0 deletions frontend/web/styles/components/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@

.btn-tab {
position: relative;

.btn-tab__label {
display: inline-flex;
align-items: center;
flex-wrap: nowrap;
gap: 4px;
}

.unread {
padding-left: 0 !important;
padding-right: 0 !important;
Expand Down
Loading