Skip to content

Commit

Permalink
[ui] Settings updates for Cloud (#20418)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Some Settings side nav item tweaks for use in Cloud.

## How I Tested These Changes

View Settings in Cloud, verify that the right-hand icon appears for one
of my items.
  • Loading branch information
hellendag authored Mar 13, 2024
1 parent 80b06df commit dfa4b9a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ export const getVisibleFeatureFlagRows = () => [
key: 'Use new asset automation page',
flagType: FeatureFlag.flagUseNewAutomationPage,
},
{
key: 'Use new settings page',
flagType: FeatureFlag.flagSettingsPage,
},
];
19 changes: 12 additions & 7 deletions js_modules/dagster-ui/packages/ui-core/src/ui/SideNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ interface Props {

export const SideNavItem = (props: Props) => {
const {active = false, item} = props;
const {type, icon, label} = item;
const {type, icon, label, rightElement} = item;
const content = (
<Box
padding={{vertical: 4, horizontal: 12}}
flex={{direction: 'row', gap: 8, alignItems: 'center'}}
padding={{vertical: 4, left: 12, right: 8}}
flex={{direction: 'row', gap: 8, alignItems: 'center', justifyContent: 'space-between'}}
>
{icon}
{label}
<Box flex={{direction: 'row', gap: 8, alignItems: 'center'}} className="iconAndLabel">
{icon}
{label}
</Box>
<div>{rightElement}</div>
</Box>
);

Expand Down Expand Up @@ -76,8 +79,10 @@ const StyledSideNavLink = styled(Link)<{$active: boolean}>`
text-decoration: none;
}
${IconWrapper} {
background-color: ${({$active}) => ($active ? Colors.textBlue() : Colors.textDefault())};
.iconAndLabel {
${IconWrapper} {
background-color: ${({$active}) => ($active ? Colors.textBlue() : Colors.textDefault())};
}
}
`;

Expand Down

1 comment on commit dfa4b9a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-i55eaakgs-elementl.vercel.app

Built with commit dfa4b9a.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.