Skip to content

[O2B-1634] Adapt the header to multiple screen sizes - #2273

Merged
graduta merged 8 commits into
mainfrom
improv/O2B-1634/adapt-header-to-multiple-screen-sizes
Oct 22, 2026
Merged

graduta merged 8 commits into
mainfrom
improv/O2B-1634/adapt-header-to-multiple-screen-sizes

Conversation

@graduta

@graduta graduta commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Notable changes for users:

  • The page tabs collapse into a menu button below 1280px (tablets and phones), and the header keeps the same height on every screen size.
  • The "Bookkeeping" title is always visible; the account menu moves to the far left of the header.
  • The "Log" and "EoS report" buttons are replaced by a single "Add an entry" menu (a "+" on phones) listing: log entry, on-call log, RC daily meeting log, and the EoS report shift types (ECS, QC/PDP, SLIMOS, SL, DCS).
  • The EoS report shift type selection page is removed. Opening the EoS report creation page without a shift type redirects to the home page.
  • The current page is highlighted in the menu, and the navbar menus close on outside click or Escape.

Notable changes for developers:

  • New Header UI test suite (test/public/header) covering the full and collapsed navigation bar, the "Add an entry" menu and the account menu on phone, tablet, laptop and desktop viewports; registered in the CI matrix and in the local parallel runner.
  • The existing navbar tabs test now sets a big viewport, since tabs are hidden on small screens.
  • Navbar styles are new classes in app.css (navbar-*), no inline styles.

Changes made to the database:

  • None

Tests: the new header suite (23 tests) passes locally with the same docker setup as CI, as do the impacted existing tests (navbar tabs, log creation, tag creation, ECS EoS report creation).

- Collapse the page tabs into a menu button below 1280px, keep the header height identical on every screen size
- Always display the Bookkeeping title, move the account menu to the left and shrink the create button to a "+" on phones
- Highlight the current page in the menu and close the navbar menus on outside click or Escape
- Merge the "Log" and "EoS report" buttons into a single "Add an entry" menu listing the log types and the EoS report shift types
- Remove the EoS report shift type selection page: opening the creation page without a shift type redirects to the home page
- New "Header" UI suite covering the full and collapsed navigation bar, the "Add an entry" menu and the account menu on phone, tablet, laptop and desktop screen sizes
- Register the suite in the CI matrix and in the local parallel test runner
- Set a big viewport in the existing navbar tabs test as tabs are collapsed on small screens
@graduta
graduta requested a review from isaachilly as a code owner October 21, 2026 14:09
@graduta graduta added frontend CI test Label to be used when PR is only about tests labels Oct 21, 2026
@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.39%. Comparing base (8eb1375) to head (aa3a874).

Files with missing lines Patch % Lines
lib/public/components/NavBar/index.js 0.00% 33 Missing ⚠️
lib/public/Model.js 0.00% 8 Missing ⚠️
lib/public/views/EosReport/EosReportModel.js 0.00% 1 Missing ⚠️
...ic/views/EosReport/create/EosReportCreationPage.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2273      +/-   ##
==========================================
- Coverage   46.46%   46.39%   -0.07%     
==========================================
  Files        1053     1053              
  Lines       17359    17384      +25     
  Branches     3162     3168       +6     
==========================================
  Hits         8065     8065              
- Misses       9294     9319      +25     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…wports

The header tabs are collapsed below 1280px, so the envs and runs overview tests (700px and 1200px wide) cannot click them with a real click anymore.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Menu accessibility and the collapsed ALI FLP link’s navigation behavior need correction.

3 open issues
What changed in this PR

Adapts Bookkeeping’s header for smaller screens and consolidates entry creation into one menu.

Changes:

  • Adds responsive navigation and moves the account menu left.
  • Combines log and EoS report creation; removes the shift-selection page.
  • Adds header UI tests and registers them in local and CI runners.
File Description
test/​scripts/​test-header.js Adds standalone header test runner.
test/​scripts/​parallel-local/​main.js Registers header tests locally.
test/​public/​runs/​overview.test.js Adjusts navigation interactions.
test/​public/​logs/​create.test.js Opens the creation menu before navigation.
test/​public/​index.js Registers the header suite.
test/​public/​header/​navBar.test.js Tests responsive layout and menu behavior.
test/​public/​header/​index.js Groups header tests.
test/​public/​envs/​overview.test.js Adjusts navigation interaction.
test/​public/​components/​navBar.test.js Uses a desktop viewport for tabs.
lib/​public/​views/​EosReport/​EosReportModel.js Redirects creation without a shift type.
lib/​public/​views/​EosReport/​create/​EosReportCreationPage.js Removes shift-selection UI.
lib/​public/​Model.js Adds outside-click and Escape dismissal.
lib/​public/​components/​NavBar/​index.js Implements responsive navigation and creation menus.
lib/​public/​app.css Adds responsive navbar styles.
.github/​workflows/​bookkeeping.yml Adds header tests to CI.

Review effort: Balanced

Comment thread lib/public/Model.js
Comment thread lib/public/components/NavBar/index.js
Comment thread lib/public/components/NavBar/index.js Outdated
- Give the focus back to the opened menu's button when closing it with Escape
- Expose aria-expanded and aria-haspopup on the navbar menu buttons
- Open the ALI FLP link of the collapsed menu in a new tab like the desktop one
- Test the three behaviours in the header suite
@graduta
graduta merged commit 44459fc into main Oct 22, 2026
24 of 26 checks passed
@graduta
graduta deleted the improv/O2B-1634/adapt-header-to-multiple-screen-sizes branch October 22, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI frontend test Label to be used when PR is only about tests

Development

Successfully merging this pull request may close these issues.

2 participants