Skip to content

Commit

Permalink
[ui] Asset catalog small design fixes (#20547)
Browse files Browse the repository at this point in the history
Adds two changes:
- Ensures that on scroll all of the page content is displayed.
Previously in certain situations the page was cut off.
- Displays user's first name instead of full name.
  • Loading branch information
clairelin135 authored Mar 19, 2024
1 parent d94b2f3 commit 091f096
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ export const AssetsOverview = ({viewerName}: {viewerName?: string}) => {
timezone: [timezone],
} = useContext(TimeContext);
const recentlyVisitedAssets = fetchRecentlyVisitedAssetsFromLocalStorage();
const viewerFirstName = viewerName?.split(' ')[0];

if (assetsQuery.loading) {
return (
Expand All @@ -280,7 +281,7 @@ export const AssetsOverview = ({viewerName}: {viewerName?: string}) => {
}

return (
<>
<Box flex={{direction: 'column'}} style={{height: '100%'}}>
<AssetPageHeader
assetKey={{path: currentPath}}
right={<ReloadAllButton label="Reload definitions" />}
Expand All @@ -291,7 +292,7 @@ export const AssetsOverview = ({viewerName}: {viewerName?: string}) => {
<Box flex={{direction: 'row', alignItems: 'center', justifyContent: 'space-between'}}>
<Heading>
{getGreeting(timezone)}
{viewerName ? `, ${viewerName}` : ''}
{viewerFirstName ? `, ${viewerFirstName}` : ''}
</Heading>
<Box flex={{direction: 'row', gap: 16, alignItems: 'center'}}>
<Link to="/assets">View all</Link>
Expand Down Expand Up @@ -388,7 +389,7 @@ export const AssetsOverview = ({viewerName}: {viewerName?: string}) => {
)}
</Box>
</Box>
</>
</Box>
);
};

Expand Down

1 comment on commit 091f096

@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-j3ut8zj9i-elementl.vercel.app

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

Please sign in to comment.