Skip to content

docs: add Mantine 9.3 window menu demos - #31

Closed
ded-furby wants to merge 1 commit into
gfazioli:masterfrom
ded-furby:codex/docs-window-menu-demos
Closed

docs: add Mantine 9.3 window menu demos#31
ded-furby wants to merge 1 commit into
gfazioli:masterfrom
ded-furby:codex/docs-window-menu-demos

Conversation

@ded-furby

@ded-furby ded-furby commented Jun 3, 2026

Copy link
Copy Markdown

Summary

  • add a Menu.ContextMenu demo that shows desktop-style right-click actions inside a Window
  • add a window menu bar demo that combines Menu.Search, Menu.CheckboxItem, and Menu.RadioGroup
  • document both patterns in docs/docs.mdx and export them from the demo index

Closes #30.

Validation

  • yarn build
  • yarn docs:build
  • yarn format:test
  • yarn lint

Summary by CodeRabbit

Documentation

  • Added context menu example demonstrating right-click menu functionality for the Window component
  • Added menu bar example showing searchable command menus with toggles and filter options
  • Updated documentation with two new Window usage patterns

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e65fdaa-cb10-4f59-82f4-8aa91aff128e

📥 Commits

Reviewing files that changed from the base of the PR and between a476b37 and a4fde8a.

📒 Files selected for processing (4)
  • docs/demos/Window.demo.contextMenu.tsx
  • docs/demos/Window.demo.menuBar.tsx
  • docs/demos/index.ts
  • docs/docs.mdx

📝 Walkthrough

Walkthrough

This PR adds two new documentation demos showcasing Mantine 9.3's context menu and option menu capabilities within the mantine-window component. Context Menu demo demonstrates right-click menus using Menu.ContextMenu, while Menu Bar demo shows searchable menus with toggleable and radio-select options. Both are registered in the demo system and documented in docs.mdx.

Changes

Menu Feature Demos and Documentation

Layer / File(s) Summary
Context menu demo implementation
docs/demos/Window.demo.contextMenu.tsx
Adds a demo showing Menu.ContextMenu for right-click context menus. Includes code template for documentation display, a Demo component rendering a Window with a right-click menu triggering on Box content, and a dropdown with window actions (maximize, duplicate, close).
Menu bar with search and option items demo
docs/demos/Window.demo.menuBar.tsx
Adds a demo of a searchable menu bar using Menu.Search to filter commands, plus Menu.CheckboxItem and Menu.RadioItem for toggleable view options (grid, rulers, density). Includes code template, a static commands list, and a Demo component managing search and option state.
Demo registration and documentation
docs/demos/index.ts, docs/docs.mdx
Re-exports contextMenu and menuBar from docs/demos/index.ts to register them in the demo barrel. Adds two new documentation sections in docs/docs.mdx describing Context Menu and Window Menu Bar patterns with linked demos.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Two menus sprout from Mantine's spring,
Right-click whispers, toggles sing,
In windows wise, these demos dwell,
Search and select, a desert's bell!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add Mantine 9.3 window menu demos' clearly and concisely summarizes the main change: adding documentation demos for Mantine 9.3 window menu features.
Linked Issues check ✅ Passed All primary objectives from issue #30 are met: Context Menu demo with Menu.ContextMenu, menu bar demo with Menu.Search and option items, both exported as MantineDemo objects, docs sections added, and all demos integrated following existing conventions.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #30 requirements: two demo files added, demo index updated with exports, and docs.mdx extended with two new sections. No unrelated modifications detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@gfazioli

gfazioli commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Hi @ded-furby, thank you for picking this up so quickly — the implementation was clean and followed the issue spec correctly, which is genuinely appreciated.

That said, I've decided to go with an alternative take in #32 where every menu entry drives real window/workspace state (duplicating/closing actual windows, creating/removing canvas layers), which fits the desktop metaphor this component is built around. A couple of details from your version also needed adjustments (the hardcoded gray-0 background breaks in dark mode — worth keeping in mind: theme tokens like var(--mantine-color-default) keep demos scheme-safe).

Closing this in favor of #32, but thanks again for contributing — PRs are always welcome.

@gfazioli gfazioli closed this Jun 4, 2026
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.

Add docs demos for Mantine 9.3 context menus and option menus (Menu.ContextMenu, Menu.Search, Menu.CheckboxItem/RadioItem)

2 participants