feat(widgets): right-click context menu#60
Merged
rubenvdlinde merged 1 commit intodevelopmentfrom Apr 30, 2026
Merged
Conversation
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 103/103 | |||
| npm | ✅ | ✅ 342/342 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-04-30 19:12 UTC
Download the full PDF report from the workflow artifacts.
594d94b to
df5acf2
Compare
…WDG-015..017 Implements widget context menu with the following: REQ-WDG-015 (Right-click context menu in edit mode): - New WidgetContextMenu.vue component with Edit, Remove, Cancel buttons - @contextmenu.prevent handler on grid items opens menu only in edit mode - View mode allows native browser context menu - Menu closes after any action REQ-WDG-016 (Auto-close on outside interaction): - Document-level click listener closes menu when clicking outside - Right-clicking different widget switches menu to new position - Only one menu visible at a time REQ-WDG-017 (Position constraints): - Menu positioned at cursor with min-width: 150px and z-index: 10000 - Clamped to viewport edges to stay fully visible - Uses computed properties for dynamic positioning Implementation details: - WidgetContextMenu.vue: Vue 2 SFC with Pencil/Delete icons - DashboardGrid.vue: Wired @contextmenu.prevent and document click handler - onWidgetRightClick(): Captures event, validates edit mode - onContextEdit/Remove(): Emits to parent for handling - i18n: Added 'Remove' translation (Edit/Cancel already present) Test coverage: - 18 unit tests via Vitest covering all REQs - Tests: view mode rejection, edit mode opening, button events - Outside-click and multi-widget switching scenarios - Position clamping behavior - Listener cleanup on unmount Quality gates: - ESLint: Pass (0 errors, 9 pre-existing warnings in widgetBridge.js) - Stylelint: Pass - Vitest: 71 tests pass (CSS import pre-existing issue)
df5acf2 to
dab99b9
Compare
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ❌ | ||||
| phpcs | ❌ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ❌ | ||||
| eslint | ✅ | ||||
| stylelint | ❌ | ||||
| composer | ⏭️ | ❌ | |||
| npm | ❌ | ⏭️ | |||
| PHPUnit | ❌ | ||||
| Newman | ❌ | ||||
| Playwright | ❌ |
Quality workflow — 2026-04-30 19:13 UTC
Download the full PDF report from the workflow artifacts.
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 103/103 | |||
| npm | ✅ | ✅ 342/342 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-04-30 19:15 UTC
Download the full PDF report from the workflow artifacts.
7 tasks
rubenvdlinde
added a commit
that referenced
this pull request
Apr 30, 2026
…it gate per REQ-SHELL-001..007 (#68) - REQ-SHELL-001: Update templates/index.php to render #app-workspace > #workspace-vue mount point; mount Vue on #workspace-vue in main.js - REQ-SHELL-002: Add canEdit computed (isAdmin || dashboardSource === 'user') via inject; replaces old permissionLevel check; toolbar hidden via v-if (not v-show) when canEdit is false - REQ-SHELL-003: 4-region layout with header strip (hamburger + label + toolbar); toolbar shows Customize/Close + Add Widget + Save Layout buttons; saveLayout() PUTs to group or user endpoint based on dashboardSource; disabled while saving; showSuccess/showError toasts - REQ-SHELL-004: Hamburger toggles sidebarOpen; active-dashboard label displayed next to hamburger - REQ-SHELL-005: Empty state via NcEmptyContent when activeDashboard is null; Create button shown only when allowUserDashboards=true - REQ-SHELL-006: SidebarBackdrop and DashboardSwitcherSidebar integrated; backdrop click closes sidebar - REQ-SHELL-007: document.click lifecycle delegated to DashboardGrid (already registered in mounted/beforeDestroy per #60) - Vitest: 13 tests covering all 7 REQs (canEdit gate, hamburger, empty state, save layout endpoints, lifecycle)
rubenvdlinde
added a commit
that referenced
this pull request
Apr 30, 2026
…/nextcloud-vue (ADR-004) (#71) Two stragglers added by widget-add-edit-modal (#65/#68 runtime-shell) and widget-context-menu (#60) before ADR-004 landed via #34. Swap is mechanical: NcButton + NcEmptyContent are already exported by @conduction/nextcloud-vue and used elsewhere in the codebase (TileCard, WidgetRenderer, AdminSettings).
3 tasks
rubenvdlinde
added a commit
that referenced
this pull request
May 3, 2026
…WDG-015..017 (#60) Implements widget context menu with the following: REQ-WDG-015 (Right-click context menu in edit mode): - New WidgetContextMenu.vue component with Edit, Remove, Cancel buttons - @contextmenu.prevent handler on grid items opens menu only in edit mode - View mode allows native browser context menu - Menu closes after any action REQ-WDG-016 (Auto-close on outside interaction): - Document-level click listener closes menu when clicking outside - Right-clicking different widget switches menu to new position - Only one menu visible at a time REQ-WDG-017 (Position constraints): - Menu positioned at cursor with min-width: 150px and z-index: 10000 - Clamped to viewport edges to stay fully visible - Uses computed properties for dynamic positioning Implementation details: - WidgetContextMenu.vue: Vue 2 SFC with Pencil/Delete icons - DashboardGrid.vue: Wired @contextmenu.prevent and document click handler - onWidgetRightClick(): Captures event, validates edit mode - onContextEdit/Remove(): Emits to parent for handling - i18n: Added 'Remove' translation (Edit/Cancel already present) Test coverage: - 18 unit tests via Vitest covering all REQs - Tests: view mode rejection, edit mode opening, button events - Outside-click and multi-widget switching scenarios - Position clamping behavior - Listener cleanup on unmount Quality gates: - ESLint: Pass (0 errors, 9 pre-existing warnings in widgetBridge.js) - Stylelint: Pass - Vitest: 71 tests pass (CSS import pre-existing issue)
rubenvdlinde
added a commit
that referenced
this pull request
May 3, 2026
…it gate per REQ-SHELL-001..007 (#68) - REQ-SHELL-001: Update templates/index.php to render #app-workspace > #workspace-vue mount point; mount Vue on #workspace-vue in main.js - REQ-SHELL-002: Add canEdit computed (isAdmin || dashboardSource === 'user') via inject; replaces old permissionLevel check; toolbar hidden via v-if (not v-show) when canEdit is false - REQ-SHELL-003: 4-region layout with header strip (hamburger + label + toolbar); toolbar shows Customize/Close + Add Widget + Save Layout buttons; saveLayout() PUTs to group or user endpoint based on dashboardSource; disabled while saving; showSuccess/showError toasts - REQ-SHELL-004: Hamburger toggles sidebarOpen; active-dashboard label displayed next to hamburger - REQ-SHELL-005: Empty state via NcEmptyContent when activeDashboard is null; Create button shown only when allowUserDashboards=true - REQ-SHELL-006: SidebarBackdrop and DashboardSwitcherSidebar integrated; backdrop click closes sidebar - REQ-SHELL-007: document.click lifecycle delegated to DashboardGrid (already registered in mounted/beforeDestroy per #60) - Vitest: 13 tests covering all 7 REQs (canEdit gate, hamburger, empty state, save layout endpoints, lifecycle)
rubenvdlinde
added a commit
that referenced
this pull request
May 3, 2026
…/nextcloud-vue (ADR-004) (#71) Two stragglers added by widget-add-edit-modal (#65/#68 runtime-shell) and widget-context-menu (#60) before ADR-004 landed via #34. Swap is mechanical: NcButton + NcEmptyContent are already exported by @conduction/nextcloud-vue and used elsewhere in the codebase (TileCard, WidgetRenderer, AdminSettings).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements widget context menu (REQ-WDG-015..017) per spec on development.
Features:
Files:
Quality: ESLint pass, Stylelint pass, 71 tests pass