domma-cms 1.6.60 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4344 -0
- package/README.md +1 -1
- package/admin/dist/domma/domma-tools.css +3 -3
- package/admin/dist/domma/domma-tools.min.js +3 -3
- package/admin/js/lib/effect-defs.js +1 -1
- package/admin/js/lib/effects-builder.js +2 -2
- package/admin/js/lib/page-editor-reference.js +5 -5
- package/admin/js/lib/shortcode-tags.js +1 -1
- package/admin/js/templates/docs/usage-shortcodes.html +39 -0
- package/docs/DommaFeatures.md +3005 -0
- package/docs/MultiTenant.md +176 -0
- package/docs/api-reference.md +1667 -0
- package/docs/cache.md +96 -0
- package/docs/configuration.md +1811 -0
- package/docs/editions-and-licences.md +190 -0
- package/docs/getting-started.md +201 -0
- package/docs/guides/form-triggers.md +260 -0
- package/docs/guides/mongodb-storage-adapter.md +282 -0
- package/docs/guides/multi-page-forms.md +121 -0
- package/docs/images/scribe-composer.png +0 -0
- package/docs/markdown-shortcodes.md +1738 -0
- package/docs/pentest-report-2026-04-03.md +181 -0
- package/docs/plans/2026-02-28-admin-topbar-login-forms.md +349 -0
- package/docs/plans/2026-02-28-domma-ui-polish.md +286 -0
- package/docs/plans/2026-02-28-reset-seed-fresh-commands.md +520 -0
- package/docs/plans/2026-03-02-cookie-consent-design.md +86 -0
- package/docs/plans/2026-03-02-cookie-consent-plugin.md +453 -0
- package/docs/plans/2026-03-02-tooltip-sweep-and-back-to-top-plugin-design.md +126 -0
- package/docs/plans/2026-03-02-tooltip-sweep-back-to-top.md +427 -0
- package/docs/plans/2026-03-05-cookie-consent-btt-core.md +115 -0
- package/docs/plans/2026-03-05-custom-css-migrate-to-core-design.md +35 -0
- package/docs/plans/2026-03-05-custom-css-migrate-to-core.md +352 -0
- package/docs/plans/2026-03-05-scribe-script-shortcode.md +373 -0
- package/docs/plans/2026-03-05-user-types-design.md +139 -0
- package/docs/plans/2026-03-05-user-types-implementation.md +1035 -0
- package/docs/plans/2026-03-09-page-editor-view-cta-inserts-design.md +78 -0
- package/docs/plans/2026-03-09-page-editor-view-cta-inserts.md +388 -0
- package/docs/plans/2026-03-09-pro-documentation-design.md +80 -0
- package/docs/plans/2026-03-09-pro-documentation.md +1017 -0
- package/docs/plans/2026-06-10-core-project-design.md +240 -0
- package/docs/plugin-development.md +827 -0
- package/docs/recruitment-recipe.md +501 -0
- package/docs/scaffolding.md +312 -0
- package/docs/screenshots/calculator-floating.png +0 -0
- package/docs/screenshots/calculator-standard.png +0 -0
- package/docs/screenshots/email-settings.png +0 -0
- package/docs/screenshots/messages-count.png +0 -0
- package/docs/structure/user-types.md +107 -0
- package/docs/superpowers/plans/2026-05-25-admin-sidebar-via-menus.md +1112 -0
- package/docs/superpowers/plans/2026-06-08-navbar-mobile-drawer-and-menu-enrichment.md +1161 -0
- package/docs/superpowers/plans/2026-06-25-domma-docs-project.md +695 -0
- package/docs/superpowers/plans/2026-06-26-surveys-HANDOFF.md +68 -0
- package/docs/superpowers/plans/2026-06-26-surveys-pro-plugin.md +1902 -0
- package/docs/superpowers/plans/2026-08-19-collection-context-sort-export.md +1577 -0
- package/docs/superpowers/plans/2026-10-09-content-api.md +1192 -0
- package/docs/superpowers/specs/2026-03-12-form-followup-actions-design.md +152 -0
- package/docs/superpowers/specs/2026-03-12-page-editor-form-insert-and-per-page-theme-design.md +115 -0
- package/docs/superpowers/specs/2026-03-17-nav-hidden-items-design.md +85 -0
- package/docs/superpowers/specs/2026-03-19-accordion-insert-design.md +175 -0
- package/docs/superpowers/specs/2026-03-25-static-block-shortcode-design.md +153 -0
- package/docs/superpowers/specs/2026-03-25-text-shortcode-design.md +168 -0
- package/docs/superpowers/specs/2026-04-05-card-builder-design.md +315 -0
- package/docs/superpowers/specs/2026-04-06-insert-builders-design.md +278 -0
- package/docs/superpowers/specs/2026-04-06-layouts-design.md +226 -0
- package/docs/superpowers/specs/2026-04-07-blog-plugin-design.md +300 -0
- package/docs/superpowers/specs/2026-04-07-calendar-plugin-design.md +538 -0
- package/docs/superpowers/specs/2026-04-17-components-area-design.md +368 -0
- package/docs/superpowers/specs/2026-05-02-effects-slideover-overhaul-design.md +193 -0
- package/docs/superpowers/specs/2026-05-06-dashboard-rebuild-design.md +257 -0
- package/docs/superpowers/specs/2026-05-24-menus-design.md +466 -0
- package/docs/superpowers/specs/2026-05-25-admin-sidebar-via-menus-design.md +358 -0
- package/docs/superpowers/specs/2026-05-25-projects-design.md +380 -0
- package/docs/superpowers/specs/2026-06-08-navbar-mobile-drawer-and-menu-enrichment-design.md +292 -0
- package/docs/superpowers/specs/2026-06-08-sidebar-tools-plugins-folders-design.md +59 -0
- package/docs/superpowers/specs/2026-06-25-domma-docs-project-design.md +192 -0
- package/docs/superpowers/specs/2026-06-26-domma-charts-upstream-proposal.md +44 -0
- package/docs/superpowers/specs/2026-06-26-manager-scheduler-upstream-proposal.md +46 -0
- package/docs/superpowers/specs/2026-06-26-surveys-pro-plugin-design.md +206 -0
- package/docs/superpowers/specs/2026-07-02-shortcode-context-menu-design.md +96 -0
- package/docs/superpowers/specs/2026-08-19-collection-context-sort-export-design.md +330 -0
- package/docs/superpowers/specs/2026-09-22-dcms-marketplace-design.md +1150 -0
- package/docs/superpowers/specs/2026-10-09-content-api-design.md +325 -0
- package/docs/superpowers/specs/plans/2026-03-12-form-followup-actions.md +624 -0
- package/docs/superpowers/specs/plans/2026-03-12-page-editor-form-insert-and-per-page-theme.md +125 -0
- package/docs/superpowers/specs/plans/2026-03-17-nav-hidden-items.md +578 -0
- package/docs/superpowers/specs/plans/2026-03-19-accordion-insert.md +635 -0
- package/docs/superpowers/specs/plans/2026-03-25-text-shortcode.md +545 -0
- package/docs/superpowers/specs/plans/2026-04-05-card-builder.md +1970 -0
- package/docs/superpowers/specs/plans/2026-04-06-insert-builders.md +1049 -0
- package/docs/superpowers/specs/plans/2026-04-06-layouts.md +1015 -0
- package/docs/superpowers/specs/plans/2026-04-07-calendar-plugin.md +1526 -0
- package/docs/superpowers/specs/plans/2026-04-08-plugin-monetisation-split.md +242 -0
- package/docs/superpowers/specs/plans/2026-04-17-components-area.md +2038 -0
- package/docs/superpowers/specs/plans/2026-05-02-effects-slideover-overhaul.md +2335 -0
- package/docs/superpowers/specs/plans/2026-05-06-dashboard-rebuild.md +1999 -0
- package/docs/superpowers/specs/plans/2026-05-17-cache-system.md +1436 -0
- package/docs/superpowers/specs/plans/2026-05-24-menus.md +3096 -0
- package/docs/superpowers/specs/plans/2026-05-25-projects.md +2869 -0
- package/docs/superpowers/specs/plans/2026-09-22-marketplace-step2-consolidation.md +505 -0
- package/docs/superpowers/specs/plans/2026-09-22-marketplace-step3-catalogue-and-key.md +154 -0
- package/docs/superpowers/specs/plans/2026-09-22-tools-promotion.md +260 -0
- package/docs/theming.md +320 -0
- package/package.json +2 -2
- package/public/js/celebrations/core/canvas.js +1 -1
- package/public/js/celebrations/index.js +1 -1
- package/public/js/celebrations/licenses/ABeeZee-Regular-OFL.txt +93 -0
- package/public/js/celebrations/licenses/Allura-Regular-OFL.txt +93 -0
- package/public/js/celebrations/message-attrs.mjs +1 -0
- package/public/js/celebrations/themes/anniversary.js +1 -0
- package/public/js/celebrations/themes/autumn.js +1 -0
- package/public/js/celebrations/themes/birthday.js +1 -0
- package/public/js/celebrations/themes/butterfly-flight.js +1 -0
- package/public/js/celebrations/themes/calendar.js +1 -0
- package/public/js/celebrations/themes/chinese-new-year-dates.js +1 -0
- package/public/js/celebrations/themes/chinese-new-year.js +1 -0
- package/public/js/celebrations/themes/christmas.js +1 -1
- package/public/js/celebrations/themes/easter.js +1 -0
- package/public/js/celebrations/themes/garden-drawing.js +1 -0
- package/public/js/celebrations/themes/garden.js +1 -0
- package/public/js/celebrations/themes/graduation.js +1 -0
- package/public/js/celebrations/themes/greeting.js +1 -0
- package/public/js/celebrations/themes/make-it-rain.js +1 -0
- package/public/js/celebrations/themes/money-rain.js +1 -0
- package/public/js/celebrations/themes/new-year.js +1 -0
- package/public/js/celebrations/themes/occasion-drawing.js +1 -0
- package/public/js/celebrations/themes/occasions.js +1 -0
- package/public/js/celebrations/themes/rain-control.js +1 -0
- package/public/js/celebrations/themes/sparkler-font-data.js +1 -0
- package/public/js/celebrations/themes/sparkler-font.js +1 -0
- package/public/js/celebrations/themes/sparkler-writing.js +1 -0
- package/public/js/celebrations/themes/summer-garden.js +1 -0
- package/public/js/celebrations/themes/winter.js +1 -0
- package/public/js/celebrations/trait-data.mjs +1 -1
- package/public/js/effects.js +1 -1
- package/scripts/build.js +4 -0
- package/server/services/markdown.js +5 -2
- package/server/templates/page.html +1 -1
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Domma UI Polish - Reveals, Counters, Ripple, Tooltips
|
|
2
|
+
|
|
3
|
+
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
|
|
4
|
+
|
|
5
|
+
**Goal:** Spruce up the admin panel with Domma's built-in animation and interaction APIs - counter animation on stats, scroll-reveal on card grids, ripple on buttons, and tooltips on icon buttons and sidebar nav items.
|
|
6
|
+
|
|
7
|
+
**Architecture:** All enhancements are additive - no structural changes. Each view's `onMount` calls the relevant Domma APIs (`E.counter`, `E.reveal`, `E.ripple`, `E.tooltip`) after its content is rendered. Sidebar tooltips are applied post-render in `app.js` via a helper that scans `.sidebar-link` elements.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** Domma JS (`E.counter`, `E.reveal`, `E.ripple`, `E.tooltip`), all already loaded via `domma.min.js`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
### Task 1: Dashboard - animated counters on stat values
|
|
14
|
+
|
|
15
|
+
**Files:**
|
|
16
|
+
- Modify: `admin/js/views/dashboard.js`
|
|
17
|
+
|
|
18
|
+
The stat value elements (`#stat-total`, `#stat-published`, `#stat-drafts`) are currently set with `.text(n)`. Replace with setting the text first, then calling `E.counter()` so the numbers animate from 0 to their real value on mount.
|
|
19
|
+
|
|
20
|
+
**Step 1: Replace the three `.text()` calls with counter animation**
|
|
21
|
+
|
|
22
|
+
In `dashboard.js`, replace:
|
|
23
|
+
```javascript
|
|
24
|
+
$container.find('#stat-total').text(total);
|
|
25
|
+
$container.find('#stat-published').text(published);
|
|
26
|
+
$container.find('#stat-drafts').text(drafts);
|
|
27
|
+
```
|
|
28
|
+
With:
|
|
29
|
+
```javascript
|
|
30
|
+
$container.find('#stat-total').text(total);
|
|
31
|
+
$container.find('#stat-published').text(published);
|
|
32
|
+
$container.find('#stat-drafts').text(drafts);
|
|
33
|
+
|
|
34
|
+
E.counter('#stat-total, #stat-published, #stat-drafts', {
|
|
35
|
+
trigger: 'immediate',
|
|
36
|
+
duration: 1000,
|
|
37
|
+
stagger: 120,
|
|
38
|
+
easing: 'ease-out'
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`E.counter()` reads the current text content of each element as the `to` value and animates from 0. `trigger: 'immediate'` starts on mount (not scroll, since stats are always visible). `stagger: 120` means each counter starts 120ms after the previous.
|
|
43
|
+
|
|
44
|
+
**Step 2: Verify**
|
|
45
|
+
|
|
46
|
+
Start/reload the server and visit `#/` (dashboard). The three stat numbers should tick up from 0 on page load instead of appearing instantly.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### Task 2: Dashboard - reveal animation on stat cards and recent pages card
|
|
51
|
+
|
|
52
|
+
**Files:**
|
|
53
|
+
- Modify: `admin/js/views/dashboard.js`
|
|
54
|
+
|
|
55
|
+
After all content is rendered (after `T.create()`), add reveal calls.
|
|
56
|
+
|
|
57
|
+
**Step 1: Add reveals after T.create() in dashboard.js**
|
|
58
|
+
|
|
59
|
+
At the end of `onMount`, after the `T.create()` call and `Domma.icons.scan()`, add:
|
|
60
|
+
```javascript
|
|
61
|
+
E.reveal('.stat-card', { animation: 'fade', stagger: 80, duration: 400 });
|
|
62
|
+
E.reveal('.card.mt-4', { animation: 'fade', delay: 200, duration: 400 });
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The stat cards stagger in sequence. The recent-pages card fades in 200ms after mount (after the stats).
|
|
66
|
+
|
|
67
|
+
**Step 2: Verify**
|
|
68
|
+
|
|
69
|
+
Hard-refresh the dashboard. Stat cards should fade in one after another, then the recent pages card fades in beneath them.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### Task 3: Media - reveal on grid cards + ripple on upload button
|
|
74
|
+
|
|
75
|
+
**Files:**
|
|
76
|
+
- Modify: `admin/js/views/media.js`
|
|
77
|
+
|
|
78
|
+
**Step 1: Add reveal after renderGrid populates cards**
|
|
79
|
+
|
|
80
|
+
Inside `renderGrid()`, at the very end (after `Domma.icons.scan()`), add:
|
|
81
|
+
```javascript
|
|
82
|
+
E.reveal('.media-card', { animation: 'fade', stagger: 40, duration: 350 });
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Step 2: Add ripple to the upload button**
|
|
86
|
+
|
|
87
|
+
In `onMount`, after `Domma.icons.scan()` is called, add:
|
|
88
|
+
```javascript
|
|
89
|
+
E.ripple('#upload-btn');
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Step 3: Add data-tooltip to icon buttons in renderGrid**
|
|
93
|
+
|
|
94
|
+
In `renderGrid()`, update the two icon buttons from `title="…"` to `data-tooltip="…"`:
|
|
95
|
+
```javascript
|
|
96
|
+
// Was:
|
|
97
|
+
<button class="btn btn-sm btn-ghost btn-copy" data-url="${file.url}" title="Copy URL">
|
|
98
|
+
<button class="btn btn-sm btn-danger btn-delete-media" data-name="${file.name}" title="Delete">
|
|
99
|
+
|
|
100
|
+
// Becomes:
|
|
101
|
+
<button class="btn btn-sm btn-ghost btn-copy" data-url="${file.url}" data-tooltip="Copy URL">
|
|
102
|
+
<button class="btn btn-sm btn-danger btn-delete-media" data-name="${file.name}" data-tooltip="Delete file">
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Then after `Domma.icons.scan()` in renderGrid, add:
|
|
106
|
+
```javascript
|
|
107
|
+
E.tooltip('[data-tooltip]', { placement: 'top' });
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Step 4: Verify**
|
|
111
|
+
|
|
112
|
+
Visit `#/media`. Cards should fade in with stagger. Hover over the copy/delete icon buttons - proper Domma tooltips should appear instead of browser native title tooltips. Clicking Upload should show a ripple.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### Task 4: Plugins - reveal on plugin cards + ripple on toggle buttons
|
|
117
|
+
|
|
118
|
+
**Files:**
|
|
119
|
+
- Modify: `admin/js/views/plugins.js`
|
|
120
|
+
|
|
121
|
+
**Step 1: Add reveal and ripple at the end of renderPlugins()**
|
|
122
|
+
|
|
123
|
+
After `Domma.icons.scan()` in `renderPlugins()`, add:
|
|
124
|
+
```javascript
|
|
125
|
+
E.reveal('.plugin-card', { animation: 'fade', stagger: 60, duration: 400 });
|
|
126
|
+
E.ripple('.btn-toggle-plugin');
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Step 2: Verify**
|
|
130
|
+
|
|
131
|
+
Visit `#/plugins`. Plugin cards should reveal with stagger. Clicking Enable/Disable should show a ripple effect.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### Task 5: Pages and Users list - reveal on the card wrapper
|
|
136
|
+
|
|
137
|
+
**Files:**
|
|
138
|
+
- Modify: `admin/js/views/pages.js`
|
|
139
|
+
- Modify: `admin/js/views/users.js`
|
|
140
|
+
|
|
141
|
+
**Step 1: Add reveal in pages.js after renderTable()**
|
|
142
|
+
|
|
143
|
+
The `renderTable()` function calls `T.create()`. After `Domma.icons.scan()` inside `renderTable()`, add:
|
|
144
|
+
```javascript
|
|
145
|
+
E.reveal('.card', { animation: 'fade', duration: 350 });
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Step 2: Check users.js - add same pattern**
|
|
149
|
+
|
|
150
|
+
Read `admin/js/views/users.js` and add the same `E.reveal('.card', { animation: 'fade', duration: 350 })` call after the table is rendered.
|
|
151
|
+
|
|
152
|
+
**Step 3: Verify**
|
|
153
|
+
|
|
154
|
+
Visit `#/pages` and `#/users`. The card wrapper should fade in smoothly after the table populates.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
### Task 6: Tooltips on topbar icon buttons
|
|
159
|
+
|
|
160
|
+
**Files:**
|
|
161
|
+
- Modify: `admin/js/app.js`
|
|
162
|
+
|
|
163
|
+
The `injectUserMenu()` function injects the Settings link and Sign out button into `#topbar-actions`. Add `data-tooltip` to both and call `E.tooltip()` after the icons are scanned.
|
|
164
|
+
|
|
165
|
+
**Step 1: Add data-tooltip to topbar actions in injectUserMenu()**
|
|
166
|
+
|
|
167
|
+
In `app.js`, in `injectUserMenu()`, update the `$('#topbar-actions').html(...)` call:
|
|
168
|
+
|
|
169
|
+
```javascript
|
|
170
|
+
$('#topbar-actions').html(`
|
|
171
|
+
<a href="#/settings" class="topbar-action-link" data-tooltip="Settings" data-tooltip-placement="bottom">
|
|
172
|
+
<span data-icon="settings"></span>
|
|
173
|
+
<span>Settings</span>
|
|
174
|
+
</a>
|
|
175
|
+
<button id="topbar-logout-btn" class="btn btn-sm btn-ghost topbar-signout" data-tooltip="Sign out" data-tooltip-placement="bottom">
|
|
176
|
+
<span data-icon="log-out"></span>
|
|
177
|
+
<span>Sign out</span>
|
|
178
|
+
</button>
|
|
179
|
+
`);
|
|
180
|
+
|
|
181
|
+
$('#topbar-logout-btn').on('click', () => logout());
|
|
182
|
+
Domma.icons.scan('#admin-topbar');
|
|
183
|
+
E.tooltip('[data-tooltip]', { placement: 'bottom' });
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Step 2: Verify**
|
|
187
|
+
|
|
188
|
+
Log in. Hover over the Settings link and Sign out button in the topbar - tooltips should appear below them.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### Task 7: Sidebar nav item tooltips (shown when collapsed)
|
|
193
|
+
|
|
194
|
+
**Files:**
|
|
195
|
+
- Modify: `admin/js/app.js`
|
|
196
|
+
|
|
197
|
+
After the sidebar is built, scan its `.sidebar-link` elements and attach `data-tooltip` values from the item text. This means when the sidebar collapses at ≤992px (icon-only mode), hovering a nav icon shows the page name.
|
|
198
|
+
|
|
199
|
+
**Step 1: Add a helper function attachSidebarTooltips() in app.js**
|
|
200
|
+
|
|
201
|
+
Add this function after `buildSidebar()`:
|
|
202
|
+
|
|
203
|
+
```javascript
|
|
204
|
+
function attachSidebarTooltips() {
|
|
205
|
+
$('#admin-sidebar .sidebar-link').each(function () {
|
|
206
|
+
const label = $(this).find('.sidebar-text').text().trim();
|
|
207
|
+
if (label) $(this).attr('data-tooltip', label);
|
|
208
|
+
});
|
|
209
|
+
E.tooltip('#admin-sidebar [data-tooltip]', { placement: 'right' });
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Step 2: Call attachSidebarTooltips() after each buildSidebar() call**
|
|
214
|
+
|
|
215
|
+
There are two call sites for `buildSidebar()`:
|
|
216
|
+
1. `buildSidebar(null)` at boot (line ~48)
|
|
217
|
+
2. `buildSidebar(user.role)` inside `router:afterChange` when coming from login
|
|
218
|
+
3. `buildSidebar(user.role)` in the boot sequence IIFE
|
|
219
|
+
|
|
220
|
+
After each, call `attachSidebarTooltips()`.
|
|
221
|
+
|
|
222
|
+
The `buildSidebar()` function itself can call it internally - add `attachSidebarTooltips()` at the end of `buildSidebar()`:
|
|
223
|
+
|
|
224
|
+
```javascript
|
|
225
|
+
function buildSidebar(role) {
|
|
226
|
+
if (sidebar) $('#admin-sidebar').empty();
|
|
227
|
+
sidebar = Domma.elements.sidebar('#admin-sidebar', {
|
|
228
|
+
header: { title: 'CMS Admin', icon: 'layout' },
|
|
229
|
+
items: getSidebarConfig(role),
|
|
230
|
+
collapsible: true,
|
|
231
|
+
collapseAt: 992,
|
|
232
|
+
push: true,
|
|
233
|
+
contentSelector: '.dashboard-main',
|
|
234
|
+
top: '60px'
|
|
235
|
+
});
|
|
236
|
+
attachSidebarTooltips();
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Step 3: Verify**
|
|
241
|
+
|
|
242
|
+
Narrow the browser to ≤992px so the sidebar collapses to icon-only mode. Hover over each nav icon - the page name should appear in a tooltip to the right.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
### Task 8: Global ripple on primary action buttons via router hook
|
|
247
|
+
|
|
248
|
+
**Files:**
|
|
249
|
+
- Modify: `admin/js/app.js`
|
|
250
|
+
|
|
251
|
+
Rather than adding `E.ripple()` in every view individually, apply it globally after each route renders by hooking into `router:afterChange`.
|
|
252
|
+
|
|
253
|
+
**Step 1: Add ripple subscription in app.js**
|
|
254
|
+
|
|
255
|
+
In the `M.subscribe('router:afterChange', ...)` block (or add a new one), after showing chrome, add a short timeout to let the view render before applying ripple:
|
|
256
|
+
|
|
257
|
+
```javascript
|
|
258
|
+
M.subscribe('router:afterChange', () => {
|
|
259
|
+
// Apply ripple to primary/danger buttons after view renders
|
|
260
|
+
setTimeout(() => {
|
|
261
|
+
E.ripple('.btn-primary, .btn-danger');
|
|
262
|
+
}, 50);
|
|
263
|
+
});
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
The 50ms timeout ensures the view's `onMount` has injected its HTML before `E.ripple()` scans for buttons. `E.ripple()` is idempotent - it skips elements already marked with `.dm-ripple-container`.
|
|
267
|
+
|
|
268
|
+
**Step 2: Verify**
|
|
269
|
+
|
|
270
|
+
Navigate to Dashboard, Pages, Settings. Click any primary button (New Page, Save, etc.) - a ripple effect should radiate from the click point.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Verification Checklist
|
|
275
|
+
|
|
276
|
+
- [ ] Dashboard stat numbers count up from 0 on load
|
|
277
|
+
- [ ] Dashboard stat cards fade in with stagger, then recent pages card fades in
|
|
278
|
+
- [ ] Media grid cards reveal with stagger after upload or initial load
|
|
279
|
+
- [ ] Media icon buttons show Domma tooltips on hover (not browser title)
|
|
280
|
+
- [ ] Upload button shows ripple on click
|
|
281
|
+
- [ ] Plugin cards reveal with stagger
|
|
282
|
+
- [ ] Plugin Enable/Disable buttons show ripple on click
|
|
283
|
+
- [ ] Pages card fades in on load
|
|
284
|
+
- [ ] Topbar Settings and Sign out show tooltip below on hover
|
|
285
|
+
- [ ] Sidebar nav items show tooltips on right when collapsed (≤992px)
|
|
286
|
+
- [ ] All `.btn-primary` and `.btn-danger` buttons across all views show ripple
|