Skip to content

fix: render overflow menu in light DOM to apply theme styles - #29

Merged
javier-godoy merged 1 commit into
masterfrom
issue-25-light-dom
Oct 16, 2026
Merged

javier-godoy merged 1 commit into
masterfrom
issue-25-light-dom

Conversation

@paodb

@paodb paodb commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

The overflow context menu was rendered inside the component's shadow root, so the cloned day buttons it shows didn't get the global theme styles (e.g. Aura) and looked different from the visible ones. The menu is now created in the component's light DOM and slotted into the shadow root, so the clones get the same styles as the original buttons.

  • Create the overflow vaadin-context-menu in the light DOM, listening on the overflow button
  • Remove the Vaadin 25 copy of the button styles for the overflow (fc-days-of-week-selector.css), no longer needed

Close #25

Summary by CodeRabbit

  • Changes
    • Overflow items are presented in a context menu that opens when the overflow badge is clicked.
    • The selector no longer applies its custom button styling. Button dimensions, disabled and read-only appearance, and focus indicators now follow the surrounding theme’s styling.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6b286aac-cadc-43bb-87f4-24e4a73b17e6
📥 Commits

Reviewing files that changed from the base of the PR and between 161f353 and e6cd98d.

📒 Files selected for processing: 3
  • src/main/java/com/flowingcode/vaadin/addons/dayofweekselector/DayOfWeekSelector.java
  • src/main/resources/META-INF/frontend/styles/fc-days-of-week-selector.css
  • src/main/resources/META-INF/resources/frontend/src/fc-days-of-week-selector.ts
💤 Files with no reviewable changes: 2
  • src/main/java/com/flowingcode/vaadin/addons/dayofweekselector/DayOfWeekSelector.java
  • src/main/resources/META-INF/frontend/styles/fc-days-of-week-selector.css

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The selector now creates a slotted context menu for overflow items. The overflow badge triggers the menu. The component-specific stylesheet and its Java import were removed.

Changes

Overflow menu

Layer / File(s) Summary
Context menu setup and overflow items
src/main/resources/META-INF/resources/frontend/src/fc-days-of-week-selector.ts, src/main/java/com/flowingcode/vaadin/addons/dayofweekselector/DayOfWeekSelector.java, src/main/resources/META-INF/frontend/styles/fc-days-of-week-selector.css
The selector creates a slotted context menu in firstUpdated and assigns overflow items to it when available. The negative left margin moved to the overflow badge. The component-specific stylesheet and its import were removed.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to e6cd9

The change moves the overflow menu into the light DOM so theme styles apply to the cloned day buttons. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 5
Check name Status Explanation
Linked Issues check Passed Issue #25 requires consistent styling for visible and overflow day buttons. fc-days-of-week-selector.ts now creates vaadin-context-menu in the component light DOM, assigns it to the overflowMenu…
Out of Scope Changes check Passed The changes stay within issue #25 and the stated PR intent. The TypeScript change moves the overflow menu and its cloned items to the required light-DOM and slot arrangement. The Java change removes t…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: rendering the overflow menu in light DOM so theme styles apply.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@sonarqubecloud

Copy link
Copy Markdown

@paodb
paodb marked this pull request as ready for review October 15, 2026 19:22
@javier-godoy
javier-godoy merged commit db27897 into master Oct 16, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from To Do to Pending release in Flowing Code Addons Oct 16, 2026
@javier-godoy
javier-godoy deleted the issue-25-light-dom branch October 16, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending release

Development

Successfully merging this pull request may close these issues.

Aura: buttons in overflow do not inherit base styles

2 participants