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

Move manual show page to design system #2144

Closed

Conversation

mtaylorgds
Copy link
Contributor

@mtaylorgds mtaylorgds commented Aug 29, 2023

What

Migrate the manual 'show' view to the design system layout.

Why

The entire Manuals Publisher app is being moved over to use the more modern design system and associated components. This change should also bring it more in line with Whitehall, reducing the usability friction for people who need to work across both apps.

Visuals

Before

manuals-publisher-show-view-legacy

After

manuals-publisher-show-view-design-system

Trello

Trello card

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

@mtaylorgds mtaylorgds force-pushed the consolidation-move-manual-show-page-to-design-system branch 5 times, most recently from ed5395c to 2558a8b Compare August 30, 2023 13:20
@mtaylorgds mtaylorgds changed the title Consolidation move manual show page to design system Move manual show page to design system Aug 30, 2023
@mtaylorgds mtaylorgds force-pushed the consolidation-move-manual-show-page-to-design-system branch 2 times, most recently from b3039d4 to 94e852f Compare August 30, 2023 15:07
@mtaylorgds mtaylorgds marked this pull request as ready for review August 30, 2023 15:39
Copy link
Contributor

@ryanb-gds ryanb-gds left a comment

Choose a reason for hiding this comment

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

A bit hard for me to review really given I haven't done a lot of frontend work - I'm not really sure how the publishing components should be used. In terms of breaking it up a bit I can see why it's tricky, it's all quite coupled together. The only way I can see to do it is a two-step migration where you create new erb files and scss files for some of the page components/helpers (possibly in a commit per component), then change the manual page itself and remove the old components. That might be two separate PRs, depending on how you want to organise it, or just several commits (but it should be possible to keep tests green in each of them). That's a lot of extra effort to go to, but I suspect other reviewers might find that more digestible.

}
}

.app-view-summary__sidebar-actions .govuk-list--spaced li:last-child div + .broken-links-report {
Copy link
Contributor

Choose a reason for hiding this comment

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

It is unfortunate that this is necessary 😞

margin-bottom: govuk-spacing(6);
background-color: govuk-colour("light-grey");

.gem-c-button {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the advice on overriding design system component styles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure, but it doesn't look great without doing this (it's also just the spacing around the component, rather than changing its styling per se).

Comment on lines 118 to 120
row[:key] = if section.state == "draft"
tag.span("DRAFT", class: "govuk-tag govuk-tag--s govuk-tag--blue") <<
tag.span(section.title, class: "govuk-!-static-margin-2")
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little bit hard to read, I would argue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair, though I'm struggling to write anything that looks really nice for this. I've had a stab at rewriting a bit.

(If you're referring to the way the row[:key] is assigned the result of the conditional, that's how rubocop wants it to be.)

I'm open to suggestions for further improvements…

Copy link
Contributor

Choose a reason for hiding this comment

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

If that's what rubocop wants, it's good enough for me 🙈

</div>
</div>
<% end %>

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make any sense to move this out in to a separate commit? It doesn't seem directly related to the show page

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's tricky, because the show page is the first existing page moving over to the design system. The show page uses flash messages, so it is what's driving the need for this being added to the layout template.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, fair enough. I suspected I wouldn't be able to offer much of any use on this.

@mtaylorgds mtaylorgds force-pushed the consolidation-move-manual-show-page-to-design-system branch 2 times, most recently from c6e127f to 7c08a05 Compare September 5, 2023 13:30
Update the layout of the "show" view from using the legacy layout to use
 the design system one. This change significantly alters the layout of
 the page, but without changing any of the underlying functionality.
@mtaylorgds mtaylorgds force-pushed the consolidation-move-manual-show-page-to-design-system branch from 7c08a05 to 0702a75 Compare September 5, 2023 13:30
@mtaylorgds
Copy link
Contributor Author

Closing as have noticed an issue with the link checker on legacy forms.

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