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

Revamp layouts #4831

Merged
merged 7 commits into from
Jan 20, 2025
Merged

Revamp layouts #4831

merged 7 commits into from
Jan 20, 2025

Conversation

Nitemaeric
Copy link
Contributor

@Nitemaeric Nitemaeric commented Jan 17, 2025

Context

  1. Our application.html.erb layout has code that handles multiple namespace variants, namely the support vs publish namespaces. This creates increases the complexity of the layout and its less straight-forward about what should render where and when.

  2. While working on layouts, we were given the heads up that we want to update the Find header.

  3. Since we're working on a new view component, enhance the view component preview pages.

Changes proposed in this pull request

  • Re-organise layouts.

    • Remove layout inheritance.
    • 1 layout per namespace.
    • Publish uses the application.html.erb layout. Top-level pages are generally Publish-facing pages.
  • Reorganise stylesheets to align with namespace patterns.

    app
      controllers
        find
        publish
      assets
        stylesheets
          find
            application.scss
          publish
            application.scss
      views
        layouts
          find.html.erb
          application.html.erb # This should be "publish", but there 
    
  • Change the Find and Support layouts to use the new HeaderComponent that includes the service_navigation component.

Guidance to review

  • The publish header is to stay as-is, while we figure out how we want the organisation-switcher to work with it.
  • Does this break any shared pages? Any weird titles?

Screenshots

Publish

CleanShot 2025-01-17 at 16 49 43@2x

Find

CleanShot 2025-01-17 at 16 50 13@2x

Support

CleanShot 2025-01-17 at 16 50 32@2x

View component previews

CleanShot 2025-01-17 at 17 03 02@2x

@Nitemaeric Nitemaeric changed the title Dd/revamp layouts Revamp layouts Jan 17, 2025
@Nitemaeric Nitemaeric added the deploy A Review App will be created for PRs with this label label Jan 17, 2025
@Nitemaeric Nitemaeric self-assigned this Jan 17, 2025
@Nitemaeric Nitemaeric force-pushed the dd/revamp-layouts branch 2 times, most recently from 2a2cc23 to e726e86 Compare January 20, 2025 10:44
@Nitemaeric Nitemaeric force-pushed the dd/revamp-layouts branch 3 times, most recently from 84cc186 to ff5597f Compare January 20, 2025 12:21
We retain the existing Header component for Publish while we design how the new header should work alongside the organisation switcher.
@Nitemaeric Nitemaeric marked this pull request as ready for review January 20, 2025 12:51
@Nitemaeric Nitemaeric requested a review from a team as a code owner January 20, 2025 12:51
@inulty-dfe
Copy link
Contributor

Bit of a styling issue here when there is a lot in the title bar
image

@Nitemaeric
Copy link
Contributor Author

Bit of a styling issue here when there is a lot in the title bar image

Interesting, I could have sworn that I didn't change that component. 😅

@@ -2,22 +2,21 @@

require 'rails_helper'

RSpec.feature 'view components' do
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't remove the explicit receiver here. It's good practice to not rely on implicit receivers in the global namespace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved the file and dropped the receiver at the same time and it fixed an issue and I just ran with it 😅 .

Brought back the receiver.

Copy link
Contributor

@inulty-dfe inulty-dfe left a comment

Choose a reason for hiding this comment

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

Great work!

It feels like a massive improvement. And the commits were easy to follow.

💯

Move view_components_spec into support
@Nitemaeric Nitemaeric merged commit 2518e80 into main Jan 20, 2025
19 checks passed
@Nitemaeric Nitemaeric deleted the dd/revamp-layouts branch January 20, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy A Review App will be created for PRs with this label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants