Fix Publisher sidebar width inconsistency between tabs#1257
Fix Publisher sidebar width inconsistency between tabs#1257
Conversation
WalkthroughThe changes refactor the theme configuration for drawer width in the global navigation bar. Theme references are simplified from nested Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
|
There was a problem hiding this comment.
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 | 🟡 MinorRemove the unused
globalNavBar.opened.drawerWidthproperty from the theme.Verification confirms that
globalNavBar.opened.drawerWidthis not referenced anywhere in the codebase. GlobalNavBar.jsx exclusively usestheme.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 fromcustom.globalNavBar.openedin 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
📒 Files selected for processing (2)
portals/publisher/src/main/webapp/source/src/app/components/Base/Header/navbar/GlobalNavBar.jsxportals/publisher/src/main/webapp/source/src/app/data/defaultTheme.js



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