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

refactor: Set up layout and styling for team page #4172

Merged

Conversation

ianjon3s
Copy link
Contributor

@ianjon3s ianjon3s commented Jan 21, 2025

What does this PR do?

Refactors layout and styling for the updated team page:

  • Reconfigures general layout of page
  • Adds search input (non-functional)
  • Introduces 3 column grid of cards for flows
  • Basic card styling

Preview:
https://4172.planx.pizza/buckinghamshire

@ianjon3s ianjon3s changed the base branch from main to ian/team-page-rebuild January 21, 2025 16:23
Copy link

github-actions bot commented Jan 21, 2025

Removed vultr server and associated DNS entries

@ianjon3s ianjon3s requested a review from a team January 21, 2025 17:18
@ianjon3s ianjon3s marked this pull request as ready for review January 21, 2025 17:19
@DafyddLlyr
Copy link
Contributor

DafyddLlyr commented Jan 22, 2025

@ianjon3s Is there a PR for ian/team-page-rebuild I should look at first, or should this PR be pointing to main?

@ianjon3s
Copy link
Contributor Author

@ianjon3s Is there a PR for ian/team-page-rebuild I should look at first, or should this PR be pointing to main?

@DafyddLlyr currently the branch is empty/unchanged so I couldn't create a PR with it. The intention is to split each piece of work from #4120 into a smaller PR, and merge them into ian/team-page-rebuild once approved to create an accumulated PR for usability and council officer testing.

@DafyddLlyr
Copy link
Contributor

Perfect! Sounds like a solid plan to - thanks for the explanation 👍

Will review this one later this afternoon.

Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

Looking great and working as expected - a few very minor comments.

editor.planx.uk/src/pages/Team.tsx Outdated Show resolved Hide resolved
editor.planx.uk/src/pages/Team.tsx Outdated Show resolved Hide resolved
Comment on lines +420 to +434
<InputRowLabel>
<strong>Search</strong>
</InputRowLabel>
<InputRowItem>
<Box sx={{ position: "relative" }}>
<Input
sx={{
borderColor: (theme) => theme.palette.border.input,
pr: 5,
}}
name="search"
id="search"
/>
</Box>
</InputRowItem>
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is just a non-functional placeholder atm, but just a heads up that the label and input appear not be correctly associated.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I've moved this to it's own component in this PR, if this is worth adding here: #4174

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To keep things simple I'd wait until this is merged to the main feature branch and use that as base to build onto.

editor.planx.uk/src/ui/editor/SimpleMenu.tsx Outdated Show resolved Hide resolved
const DashboardLink = styled(Link)(({ theme }) => ({
display: "block",
fontSize: theme.typography.h4.fontSize,
const FlowCardContent = styled(Box)(({ theme }) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd recommend splitting up this file and adding a few additional files for these now components. There's a whole lot going on here already - it was probably too big before this PR in all honesty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great shout, I'll create a dedicated component file for FlowCard to get started.

Copy link
Contributor Author

@ianjon3s ianjon3s Jan 22, 2025

Choose a reason for hiding this comment

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

I have now split FlowCard into its own component. Something I'm not sure about:

  • I'm using the styling of the card as a 'shell' for a dummy card that displays when no flows have been created. In order to do this I've imported the styling only for Card and CardContent for use in Team.tsx. Is this considered a good approach?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep - this change looks great and no issues with this approach.

Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

Great! One nit, this can be picked up here or in a follow up PR 👌

Comment on lines +275 to +280
<Box sx={{ display: "flex", alignItems: "center", gap: 0.2 }}>
<MoreHoriz sx={{ fontSize: "1.4em" }} />
<Typography variant="body2" fontSize="small">
<strong>Menu</strong>
</Typography>
</Box>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Not sure exactly where it's getting applied, but there's a MUI ripple here we usually remove with the disableRipple prop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes good spot, that'll be coming from SimpleMenu, will amend

@DafyddLlyr
Copy link
Contributor

DafyddLlyr commented Jan 22, 2025

Cleared caches and re-ran CI here - all passing now! ✅

@ianjon3s
Copy link
Contributor Author

Cleared caches and re-ran CI here - all passing now! ✅

Thanks for this @DafyddLlyr !

@ianjon3s ianjon3s merged commit fb24317 into ian/team-page-rebuild Jan 23, 2025
10 checks passed
@ianjon3s ianjon3s deleted the ian/team-page-rebuild--restructure-layout branch January 23, 2025 11:42
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.

3 participants