Skip to content

Conversation

@manuthecoder
Copy link
Contributor

Previously blocked by UI3, this PR improves HCB's code quality by consolidating duplicate application layout file code.

@manuthecoder manuthecoder requested a review from a team December 20, 2025 00:16
Copy link
Contributor

@Luke-Oldenburg Luke-Oldenburg left a comment

Choose a reason for hiding this comment

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

Please use strict locals if passing variables to partials. Also, I think the names could have "shared" removed / be tweaked.

Copy link
Contributor

@Luke-Oldenburg Luke-Oldenburg left a comment

Choose a reason for hiding this comment

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

It seems you have some unrelated changes.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates duplicate application layout code into shared partials, improving code maintainability by extracting common head tags, body suffix elements, and seasonal decorations into reusable components.

Key Changes:

  • Extracted common head tags (meta tags, assets, console art) into _head.html.erb partial with configurable options
  • Consolidated seasonal decorations (snow, halloween elements) into _seasonal.html.erb partial
  • Created _body_suffix.html.erb partial for fullstory tracking, confetti effects, and feature flag styling

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
app/views/layouts/login.html.erb Replaced duplicated head content with render "layouts/head", consolidated seasonal decorations
app/views/layouts/docs.html.erb Refactored to use shared head, seasonal, and body_suffix partials
app/views/layouts/application.html.erb Migrated to shared partials for head, seasonal, and body suffix code
app/views/layouts/admin.html.erb Updated to use shared head partial with admin-specific configuration
app/views/layouts/_seasonal.html.erb New partial for seasonal decorations with configurable snow style
app/views/layouts/_head.html.erb New partial consolidating common head tags with multiple configuration options
app/views/layouts/_body_suffix.html.erb New partial for fullstory, confetti, and feature flag styling
app/views/layouts/_shared_seasonal.html.erb Duplicate unused partial that should be removed
app/views/layouts/_shared_head.html.erb Duplicate unused partial that should be removed
app/views/layouts/_shared_body_suffix.html.erb Duplicate unused partial that should be removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

manuthecoder and others added 2 commits December 23, 2025 13:49
Co-authored-by: Luke Oldenburg <87272260+Luke-Oldenburg@users.noreply.github.com>
Co-authored-by: Luke Oldenburg <87272260+Luke-Oldenburg@users.noreply.github.com>
Copy link
Contributor

@Luke-Oldenburg Luke-Oldenburg left a comment

Choose a reason for hiding this comment

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

Dark theme isn't set on refresh.

@manuthecoder
Copy link
Contributor Author

image

@manuthecoder
Copy link
Contributor Author

fixed!

Copy link
Contributor

@Luke-Oldenburg Luke-Oldenburg left a comment

Choose a reason for hiding this comment

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

lgtm

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.

[Layouts] DRY up shared code in application, bare, etc. layouts

3 participants