Skip to content

Update add calendar modal, update menu list style#521

Open
lenhanphung wants to merge 1 commit intomainfrom
UI/update-menu-style
Open

Update add calendar modal, update menu list style#521
lenhanphung wants to merge 1 commit intomainfrom
UI/update-menu-style

Conversation

@lenhanphung
Copy link
Collaborator

@lenhanphung lenhanphung commented Feb 6, 2026

Summary by CodeRabbit

Release Notes

  • Refactor

    • Restructured calendar item layout to use vertical arrangement with improved spacing.
  • Style

    • Enhanced styling for menu items, navigation icons, and dialog headers with refined colors and sizing.
    • Increased avatar size in header and user menu for improved visibility.
    • Updated visual appearance of Settings and Logout menu items.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

Walkthrough

This PR updates visual styling and layout across multiple calendar components. Changes include restructuring CalendarSearch.tsx layout to use vertical flexing, adding new styling rules for menu items and dividers in CustomCalendar.styl, applying explicit icon styling to back buttons in ResponsiveDialog.tsx and SettingsPage.tsx, and updating Menubar.tsx with SettingsOutlinedIcon and styled LogoutIcon alongside avatar size increases and typography adjustments. All modifications are presentation-only with no impact on business logic or control flow.

Possibly related PRs

Suggested labels

merge_wanted

Suggested reviewers

  • chibenwa
  • Eriikah
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title partially describes the changes but is incomplete. It mentions 'menu list style' which is covered in the PR, but omits significant changes to CalendarSearch layout, ResponsiveDialog icon styling, and Menubar components. Consider a more comprehensive title like 'Refactor calendar layout and update UI styling across components' or 'Update menu styles, refactor calendar layout, and enhance icon styling' to better reflect all major changes in the PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch UI/update-menu-style

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.

Copy link
Contributor

@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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/components/Calendar/CustomCalendar.styl`:
- Around line 367-377: The global selectors
li.MuiButtonBase-root.MuiMenuItem-root and
hr.MuiDivider-root.MuiDivider-fullWidth in CustomCalendar.styl are leaking
styles across the app; scope them by nesting under a Calendar-specific parent
class used by the component (e.g., .customCalendar or the root class on
Calendar.tsx) so they only apply inside the calendar component. Update
CustomCalendar.styl to wrap those rules under that parent selector (e.g.,
.customCalendar li.MuiButtonBase-root.MuiMenuItem-root and .customCalendar
hr.MuiDivider-root.MuiDivider-fullWidth) or increase selector specificity with
the component’s root class to restrict the styles to the Calendar component.
🧹 Nitpick comments (3)
src/features/Settings/SettingsPage.tsx (1)

281-281: Consider extracting the shared icon style into a constant.

The exact same sx={{ color: "#605D62", fontSize: 30 }} is applied to ArrowBackIcon here and in ResponsiveDialog.tsx (line 190). A shared constant (e.g., backIconSx) would keep the two in sync and make future theme adjustments a single-point change.

src/components/Menubar/Menubar.tsx (2)

351-368: Prefer theme tokens over hardcoded color/font values.

color: "#424244" and fontFamily: "Inter" bypass the MUI theme, which makes future theme changes (e.g., dark mode, rebranding) miss these elements. Consider using theme.palette.text.primary / theme.palette.text.secondary and theme.typography.fontFamily (or a Typography variant) instead.


371-388: Duplicated icon sx between Settings and Logout menu items.

Both SettingsOutlinedIcon and LogoutIcon share the exact same sx object. A shared constant would reduce repetition:

const menuIconSx = { mr: 2, color: "rgba(28, 27, 31, 0.48)", fontSize: 20 };

Comment on lines +367 to +377
li.MuiButtonBase-root.MuiMenuItem-root
padding 8px 16px
font-size 14px
color #243B55
min-width 120px

&:hover
background #f6f6f7

hr.MuiDivider-root.MuiDivider-fullWidth
margin 0 No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, verify the file exists and check the exact code at lines 367-377
fd CustomCalendar.styl

Repository: linagora/twake-calendar-frontend

Length of output: 119


🏁 Script executed:

# Check the content around lines 367-377
cat -n src/components/Calendar/CustomCalendar.styl | sed -n '360,380p'

Repository: linagora/twake-calendar-frontend

Length of output: 563


🏁 Script executed:

# Check where CustomCalendar.styl is imported
rg "CustomCalendar" --type=ts --type=tsx -A2 -B2

Repository: linagora/twake-calendar-frontend

Length of output: 103


🏁 Script executed:

# Count MenuItem usage across the codebase
rg "MenuItem" --type=tsx --type=ts | wc -l

Repository: linagora/twake-calendar-frontend

Length of output: 122


🏁 Script executed:

# Check if there are any scoping wrappers in CustomCalendar component itself
rg -A5 "CustomCalendar" src/components/Calendar/CustomCalendar.tsx 2>/dev/null | head -30

Repository: linagora/twake-calendar-frontend

Length of output: 58


🏁 Script executed:

# Check imports of CustomCalendar.styl without file type
rg "CustomCalendar.styl" -A2 -B2

Repository: linagora/twake-calendar-frontend

Length of output: 523


🏁 Script executed:

# Check imports of CustomCalendar component
rg "CustomCalendar" --max-count=20 | grep -E "import|from"

Repository: linagora/twake-calendar-frontend

Length of output: 144


🏁 Script executed:

# Check MenuItem usage across the codebase
rg "MenuItem" | head -20

Repository: linagora/twake-calendar-frontend

Length of output: 1509


🏁 Script executed:

# Get the structure of CustomCalendar.tsx to understand the component context
fd CustomCalendar.tsx -x wc -l {} \; && fd CustomCalendar.tsx -x head -50 {}

Repository: linagora/twake-calendar-frontend

Length of output: 58


🏁 Script executed:

# Check where Calendar.tsx (which imports CustomCalendar.styl) is used
rg "import.*Calendar" --max-count=10 | grep -v node_modules

Repository: linagora/twake-calendar-frontend

Length of output: 22973


🏁 Script executed:

# Check the full context of CustomCalendar.styl to verify there's no parent scoping wrapper
head -50 src/components/Calendar/CustomCalendar.styl

Repository: linagora/twake-calendar-frontend

Length of output: 1103


🏁 Script executed:

# Check if there are any CSS scoping mechanisms in Calendar.tsx itself
rg -A10 "import.*CustomCalendar.styl" src/components/Calendar/Calendar.tsx

Repository: linagora/twake-calendar-frontend

Length of output: 567


These selectors are unscoped and apply globally to all MUI MenuItems and Dividers in the application.

li.MuiButtonBase-root.MuiMenuItem-root and hr.MuiDivider-root.MuiDivider-fullWidth at lines 367–377 are not nested under any parent class. Since CustomCalendar.styl is imported in Calendar.tsx (which loads via CalendarLayout in App.tsx), these rules override styling for all menu items and dividers application-wide — including Menubar dropdowns, SettingsPage options, EventRepeat menus, and any future menus. This creates unpredictable visual regressions in other parts of the app.

Scope these rules under a parent selector specific to the component or context they target.

Example: scope under a parent class
-li.MuiButtonBase-root.MuiMenuItem-root
-  padding 8px 16px
-  font-size 14px
-  color `#243B55`
-  min-width 120px
-
-  &:hover
-    background `#f6f6f7`
-
-hr.MuiDivider-root.MuiDivider-fullWidth
-  margin 0
+.custom-calendar-menu
+  li.MuiButtonBase-root.MuiMenuItem-root
+    padding 8px 16px
+    font-size 14px
+    color `#243B55`
+    min-width 120px
+
+    &:hover
+      background `#f6f6f7`
+
+  hr.MuiDivider-root.MuiDivider-fullWidth
+    margin 0
🤖 Prompt for AI Agents
In `@src/components/Calendar/CustomCalendar.styl` around lines 367 - 377, The
global selectors li.MuiButtonBase-root.MuiMenuItem-root and
hr.MuiDivider-root.MuiDivider-fullWidth in CustomCalendar.styl are leaking
styles across the app; scope them by nesting under a Calendar-specific parent
class used by the component (e.g., .customCalendar or the root class on
Calendar.tsx) so they only apply inside the calendar component. Update
CustomCalendar.styl to wrap those rules under that parent selector (e.g.,
.customCalendar li.MuiButtonBase-root.MuiMenuItem-root and .customCalendar
hr.MuiDivider-root.MuiDivider-fullWidth) or increase selector specificity with
the component’s root class to restrict the styles to the Calendar component.

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.

1 participant