Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The layout switch omits user-page controls, notices, and the Gravatar avatar.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Continues the Bootstrap 5 migration for user views with breadcrumbs, styled forms, Kaminari localization, and CI updates.
Changes:
- Styles user CRUD views and adds breadcrumbs.
- Configures Kaminari with localized translations.
- Enables stylesheet integrity.
- Renames GitHub Actions jobs and updates the view spec.
File summaries
| File | Change |
|---|---|
spec/views/users/index.html.erb_spec.rb |
Updates users table assertion. |
config/locales/pt-BR.yml |
Adds localization entries. |
config/locales/kaminari.pt-BR.yml |
Adds Portuguese pagination translations. |
config/locales/kaminari.en.yml |
Adds English pagination translations. |
config/locales/en.yml |
Adds localization entries. |
config/initializers/kaminari.rb |
Configures pagination windows. |
app/views/users/show.html.erb |
Updates user details styling. |
app/views/users/new.html.erb |
Styles the new-user view. |
app/views/users/index.html.erb |
Adds breadcrumbs and Bootstrap styling. |
app/views/users/edit.html.erb |
Styles the edit-user view. |
app/views/users/_fields.html.erb |
Adds Bootstrap form controls. |
app/views/shared/_notice_fingerprinter.html.erb |
Applies formatting updates. |
app/views/shared/_link_google_account.html.erb |
Applies formatting updates. |
app/views/shared/_link_github_account.html.erb |
Applies formatting updates. |
app/views/layouts/application.html.erb |
Adds breadcrumbs and stylesheet integrity. |
app/controllers/users_controller.rb |
Removes the legacy layout override. |
.github/workflows/herb.yml |
Renames the workflow job. |
.github/workflows/brakeman.yml |
Renames the workflow job. |
Review details
- Files reviewed: 18/18 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Moderate issues remain with user-page layout content, Bootstrap field classes, breadcrumb localization, and pagination accessibility.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (4)
app/controllers/users_controller.rb:3
- Removing this layout declaration makes
new,edit,show, and their redirects useapplication, but that layout currently comments out the title/action-bar/flash rendering (app/views/layouts/application.html.erb:40-53). Consequently the user pages lose the cancel/edit/delete/account links and the create/update/delete feedback. Keep the legacy layout for these actions until the Bootstrap layout renders those slots, or enable equivalent rendering there.
class UsersController < ApplicationController
app/views/users/_fields.html.erb:54
- The existing
toggleRequiredPasswordMarksJavaScript (app/assets/javascripts/errbit.js:109-125) sets each password input's parentclassto either"required"or""on page load and when GitHub login changes. With this new Bootstrap structure, that parent is the.colwrapper, so the class is overwritten and the password fields lose their Bootstrap column layout on every new/edit page. Update the script to toggle a dedicated class without replacing the wrapper classes, or isolate the legacy marker in a separate wrapper.
<div class="row">
<div class="col">
<%= f.label :password, t(".password"), class: "form-label" %>
<%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
config/locales/kaminari.en.yml:7
- These new values replace
First,Last,Previous, andNextwith bare symbols. The existing Kaminari partials put these translations directly in anchors without anaria-labelor visually hidden text, so screen-reader users cannot identify the pagination controls. Keep accessible textual labels or add accessible names in the pagination partials.
first: "«"
last: "»"
previous: "‹"
next: "›"
config/locales/kaminari.pt-BR.yml:7
- These new values replace
First,Last,Previous, andNextwith bare symbols. The existing Kaminari partials put these translations directly in anchors without anaria-labelor visually hidden text, so screen-reader users cannot identify the pagination controls. Keep accessible textual labels or add accessible names in the pagination partials.
first: "«"
last: "»"
previous: "‹"
next: "›"
- Files reviewed: 18/18 changed files
- Comments generated: 4
- Review effort level: Lite
| <li class="breadcrumb-item"><%= link_to("Home", root_path) %></li> | ||
| <li class="breadcrumb-item"><%= link_to("Users", users_path) %></li> |
| <div class="col"> | ||
| <nav aria-label="breadcrumb"> | ||
| <ol class="breadcrumb"> | ||
| <li class="breadcrumb-item"><%= link_to("Home", root_path) %></li> |
| <li class="breadcrumb-item"><%= link_to("Home", root_path) %></li> | ||
| <li class="breadcrumb-item"><%= link_to("Users", users_path) %></li> |
| <li class="breadcrumb-item"><%= link_to("Home", root_path) %></li> | ||
| <li class="breadcrumb-item"><%= link_to("Users", users_path) %></li> |
746465b to
5176ec0
Compare
Changes
Screenshots
Users#index
Users#new
Users#show
Users#edit