Skip to content

Fix Publisher sidebar width inconsistency between tabs#1257

Open
Ayham35 wants to merge 2 commits intowso2:mainfrom
Ayham35:fix/publisher-sidebar-width
Open

Fix Publisher sidebar width inconsistency between tabs#1257
Ayham35 wants to merge 2 commits intowso2:mainfrom
Ayham35:fix/publisher-sidebar-width

Conversation

@Ayham35
Copy link
Copy Markdown

@Ayham35 Ayham35 commented Feb 26, 2026

This PR unifies the Publisher navigation drawer width by using a single theme key (custom.drawerWidth) for GlobalNavBar, preventing sidebar width variation when navigating between tabs/routes that use different layout wrappers (e.g., Overview vs Lifecycle).

Low-risk UI theme-only change; keeps intended nav width consistent across routes.

Fixes #3617

Summary by CodeRabbit

  • Style
    • Navigation drawer width increased to 230px
    • Removed background color styling from drawer state

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 26, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 26, 2026

Walkthrough

The changes refactor the theme configuration for drawer width in the global navigation bar. Theme references are simplified from nested globalNavBar.opened.drawerWidth to a root-level custom.drawerWidth property. Hard-coded styling is removed and theme values are consolidated from 180px to 230px.

Changes

Cohort / File(s) Summary
Drawer Width Configuration Consolidation
portals/publisher/src/main/webapp/source/src/app/components/Base/Header/navbar/GlobalNavBar.jsx, portals/publisher/src/main/webapp/source/src/app/data/defaultTheme.js
Simplified drawer width theme references from theme.custom.globalNavBar.opened.drawerWidth to theme.custom.drawerWidth (230px) in three locations. Removed hard-coded green background color from drawer open state. Updated default theme configuration to align with new reference path.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A drawer so wide, now 230 it stands,
No more nested paths in this rabbit's hands,
Green background gone, configuration clean,
The simplest refactor ever seen!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing sidebar width inconsistency by standardizing the drawer width configuration across the Publisher navigation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
portals/publisher/src/main/webapp/source/src/app/data/defaultTheme.js (1)

193-200: ⚠️ Potential issue | 🟡 Minor

Remove the unused globalNavBar.opened.drawerWidth property from the theme.

Verification confirms that globalNavBar.opened.drawerWidth is not referenced anywhere in the codebase. GlobalNavBar.jsx exclusively uses theme.custom.drawerWidth (lines 41, 45, 52 in GlobalNavBar.jsx), making the nested property dead code. Since no backward compatibility usage was found, removing this unused property from custom.globalNavBar.opened in defaultTheme.js will prevent the two values from drifting apart and reduce configuration clutter.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@portals/publisher/src/main/webapp/source/src/app/data/defaultTheme.js` around
lines 193 - 200, Remove the dead nested property globalNavBar.opened.drawerWidth
from the default theme: open defaultTheme.js and delete the drawerWidth entry
under custom.globalNavBar.opened since GlobalNavBar.jsx reads
theme.custom.drawerWidth (not custom.globalNavBar.opened.drawerWidth); after
removal, run a quick grep for globalNavBar.opened.drawerWidth to confirm no
remaining references and ensure GlobalNavBar.jsx continues using
theme.custom.drawerWidth unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@portals/publisher/src/main/webapp/source/src/app/data/defaultTheme.js`:
- Around line 193-200: Remove the dead nested property
globalNavBar.opened.drawerWidth from the default theme: open defaultTheme.js and
delete the drawerWidth entry under custom.globalNavBar.opened since
GlobalNavBar.jsx reads theme.custom.drawerWidth (not
custom.globalNavBar.opened.drawerWidth); after removal, run a quick grep for
globalNavBar.opened.drawerWidth to confirm no remaining references and ensure
GlobalNavBar.jsx continues using theme.custom.drawerWidth unchanged.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e10d292 and e138e3f.

📒 Files selected for processing (2)
  • portals/publisher/src/main/webapp/source/src/app/components/Base/Header/navbar/GlobalNavBar.jsx
  • portals/publisher/src/main/webapp/source/src/app/data/defaultTheme.js

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