-
Notifications
You must be signed in to change notification settings - Fork 24
Page Layouts - Added data collection layout #4652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
✅ Deploy Preview for unrivaled-bublanina-3a9bae ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
export const RoutedAnchor = ({ ...rest }: RoutedAnchorProps) => ( | ||
<Anchor {...rest} /> | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
); | |
); | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1 @@ | |||
export * from './RoutedAnchor'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export * from './RoutedAnchor'; | |
export * from './RoutedAnchor'; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1 @@ | |||
export * from './Region'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export * from './Region'; | |
export * from './Region'; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<PageHeader title="Layouts" /> | ||
<List data={layouts} defaultItemProps={{ pad: { vertical: 'xxsmall' } }}> | ||
{(item) => ( | ||
<RoutedAnchor key={item} as={Link} to={`/layouts/${item.toLowerCase()}`} label={item} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<RoutedAnchor key={item} as={Link} to={`/layouts/${item.toLowerCase()}`} label={item} /> | |
<RoutedAnchor key={item} alignSelf="start" as={Link} to={`/layouts/${item.toLowerCase()}`} label={item} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<Route key="dashboard" path="/layouts/dashboard" element={<div>Dashboard</div>} /> | ||
] | ||
|
||
export { Layouts, routes }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export { Layouts, routes }; | |
export { Layouts, routes }; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
</PageContent> | ||
</Page > | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<Menu label="Actions" items={tableActions} /> | ||
</Box> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
/> | ||
</Data> | ||
); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}; | |
}; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
/> | ||
</Box> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1 @@ | |||
export * from './Collection'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export * from './Collection'; | |
export * from './Collection'; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
{ property: 'type', header: 'Type' }, | ||
]; | ||
|
||
export { privateCloudColumns, publicCloudColumns }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export { privateCloudColumns, publicCloudColumns }; | |
export { privateCloudColumns, publicCloudColumns }; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
})} | ||
</Box > | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
onActive={index => setCloudType(cloudTypes[index])} | ||
> | ||
<Tab title="Private cloud"> | ||
<Grid columns={['auto', 'flex']} gap="large" pad={{ top: 'medium' }} align="start"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soft opinion/refinement -- should we set a max-width on the left column in case the menu labels ever gotten too long?
<Grid columns={['auto', 'flex']} gap="large" pad={{ top: 'medium' }} align="start"> | |
<Grid columns={[['auto', 'medium'], 'flex']} gap="large" pad={{ top: 'medium' }} align="start"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now that the CollectionMenu is already setting its own min/max, so feel free to ignore this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I might come back to this. It'd be nice to have the Grid fully in charge, but when I did [['auto', 'medium'], ...]
it was always growing to medium
because the table had room to flex and the menu width just felt excessive.
If only we had greater granularity in our t-shirt sizes... 🤪
skeleton={undefined} | ||
round="small" | ||
> | ||
<CollectionMenu items={dataSets[cloudType]} selected={dataSet} onSelect={setDataSet} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refinement -- seems like we have this repeated here and line 105. Should we pull it out into a variable to simplify any logic changes in future
const collectionMenu = <CollectionMenu .../>
...
<ContentPane ...>
{collectionMenu}
</ContentPane>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This will be helpful.
Deploy Preview
What does this PR do?
Where should the reviewer start?
sandbox/grommet-app/pages/layouts.index.tsx
What testing has been done on this PR?
In addition to the feature you are implementing, have you checked the following:
General UX Checks
Accessibility Checks
Code Quality Checks
How should this be manually tested?
Any background context you want to provide?
What are the relevant issues?
Screenshots (if appropriate)
Should this PR be mentioned in Design System updates?
Is this change backwards compatible or is it a breaking change?