Skip to content
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

Intersection Dashboard UI Update #173

Open
wants to merge 20 commits into
base: Update/ui-theme
Choose a base branch
from

Conversation

mwodahl
Copy link
Collaborator

@mwodahl mwodahl commented Feb 27, 2025

PR Details

This PR updates the intersection dashboard UI to match the following Figma prototype: https://www.figma.com/proto/QG64ugNXpXMUk2vQ1wgPdZ/CV-Manager-Prototype-January-2025?page-id=2143%3A6061&node-id=2146-7749&viewport=-595%2C-659%2C0.22&t=A1CuORABoO0Qexzk-1&scaling=scale-down&content-scaling=fixed&starting-point-node-id=2146%3A6646

Description

This PR includes the following updates:

  • Vertical tabs now include icons
  • The intersection ID and Select Intersection buttons are shared between all tabs
  • The tab content layout has been updated to use grid formatting

How Has This Been Tested?

This was tested locally using docker compose. Additionally, unit tests were verified to run using npm test. Please note that these changes were tested with the theme updates found in #172.

Types of changes

  • [ X ] Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • My changes require new environment variables:
    • I have updated the docker-compose, K8s YAML, and all dependent deployment configuration files.
  • My changes require updates to the documentation:
    • I have updated the documentation accordingly.
  • My changes require updates and/or additions to the unit tests:
    • I have modified/added tests to cover my changes.
  • [ X ] All existing tests pass.

</Typography>
</div>
</Box>
<Container maxWidth={false} sx={{ pl: '0 !important', pr: '0 !important' }}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't love using !important. Is it absolutely necessary here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope - this has been updated

@@ -53,6 +54,19 @@ function VerticalTabs(props: VerticalTabProps) {
const filteredTabs = tabs.filter((tab) => evaluateFeatureFlags(tab.tag))
const defaultTabKey = filteredTabs[defaultTabIndex ?? 0]?.path

const getIcon = (tabName: string) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should pass the icon through the tabs object (VerticalTabItem) instead of hardcoding them here. This component is intended to be generic

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to pass the icon through VerticalTabItem instead of hardcoding

<CardContent>
<Typography noWrap variant={'h6'} sx={{ mt: -1, mb: 4 }}>
Query
</Typography>
<Grid2 container spacing={3}>
<Grid2 size={{ md: 6, xs: 12 }}>
<FormControl fullWidth error={Boolean(formik.touched.intersectionId && formik.errors.intersectionId)}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add a backlog item for removing the additional Intersection ID selector, now that the intersection ID selector is moved into the same page

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a backlog item for this

<Container
maxWidth={false}
sx={{
paddingLeft: '0px !important',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this !important necessary? This can cause unintended side effects in the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope - this has been removed.

fullWidth
inputProps={{ ref: queryRef }}
InputProps={{
<Box
Copy link
Collaborator

Choose a reason for hiding this comment

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

This box is quite tall and takes up a lot of visual space

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rgelmis do you have thoughts on making this scrollable?

}}
variant="contained"
variant="outlined"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check the contrast on this one - the outlined variant is a little hard to read against the dark background

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to use a lighter color for the outlined button.

rowsPerPage={rowsPerPage}
rowsPerPageOptions={[5, 10, 25]}
/>
{props.reportsCount > 1 ? (
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be >= 1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes - thank you for catching this!

style={{
width: `fit-content`,
position: 'absolute',
top: `calc(${headerTabHeight}px + ${theme.spacing(3)})`,
Copy link
Collaborator

@jacob6838 jacob6838 Feb 27, 2025

Choose a reason for hiding this comment

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

I don't love using these kinds of relative offsets (line 39, 44, 45, ...) I couldn't come up with a better way, but this would be a good backlog item

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a backlog item for this

@jacob6838
Copy link
Collaborator

The assessments grid does not re-size super well right now - at large window sizes, there are large gaps:
image
And at smaller screen sizes the panels overlap each other:
image

Copy link
Collaborator

@jacob6838 jacob6838 left a comment

Choose a reason for hiding this comment

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

A few comments, love the icons and re-arrangement of the vertical tabs

@mwodahl mwodahl changed the base branch from develop to Update/ui-theme February 27, 2025 17:08
@jacob6838 jacob6838 requested a review from John-Wiens February 27, 2025 17:40
@mwodahl
Copy link
Collaborator Author

mwodahl commented Mar 5, 2025

I added some additional resizing so that the assessments grid looks better on smaller screens. The gaps between these cards on larger screens are due to the cards using a specified width when data is present. @rgelmis do we have a mockup of the assessments grid cards when data is present? Or should the specific width logic be removed altogether?

@mwodahl mwodahl requested a review from jacob6838 March 5, 2025 21:28
@jacob6838
Copy link
Collaborator

jacob6838 commented Mar 11, 2025

I added some additional resizing so that the assessments grid looks better on smaller screens. The gaps between these cards on larger screens are due to the cards using a specified width when data is present. @rgelmis do we have a mockup of the assessments grid cards when data is present? Or should the specific width logic be removed altogether?

Another option would be to let the white space around the grid grow, without growing the space between the tiles, by setting a max width of the content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants