@tuturuuu/ui 0.19.1 → 0.20.1
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 +39 -0
- package/biome.json +1 -1
- package/package.json +56 -48
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/button.tsx +2 -0
- package/src/components/ui/custom/__tests__/settings-dialog-shell.test.tsx +48 -4
- package/src/components/ui/custom/__tests__/workspace-select-helpers.test.ts +22 -0
- package/src/components/ui/custom/animated-slot-text.tsx +20 -0
- package/src/components/ui/custom/common-footer.tsx +262 -237
- package/src/components/ui/custom/language-dropdown-item.tsx +3 -10
- package/src/components/ui/custom/language-toggle.test.tsx +30 -0
- package/src/components/ui/custom/language-toggle.tsx +11 -10
- package/src/components/ui/custom/locale-preference.ts +32 -0
- package/src/components/ui/custom/settings/appearance-settings.tsx +5 -13
- package/src/components/ui/custom/settings-dialog-shell.tsx +40 -9
- package/src/components/ui/custom/structure.tsx +12 -0
- package/src/components/ui/custom/system-language-dropdown-item.tsx +3 -6
- package/src/components/ui/custom/workspace-access/adapters.test.ts +10 -1
- package/src/components/ui/custom/workspace-access/adapters.ts +36 -4
- package/src/components/ui/custom/workspace-access/member-filter-utils.test.ts +14 -0
- package/src/components/ui/custom/workspace-access/member-filter-utils.ts +8 -0
- package/src/components/ui/custom/workspace-access/types.ts +20 -0
- package/src/components/ui/custom/workspace-access/workspace-access-context.test.tsx +111 -0
- package/src/components/ui/custom/workspace-access/workspace-access-default-role-card.tsx +15 -5
- package/src/components/ui/custom/workspace-access/workspace-access-invite-dialog.tsx +155 -48
- package/src/components/ui/custom/workspace-access/workspace-access-member-profile-dialog.tsx +92 -0
- package/src/components/ui/custom/workspace-access/workspace-access-member-row.tsx +171 -76
- package/src/components/ui/custom/workspace-access/workspace-access-members.tsx +11 -2
- package/src/components/ui/custom/workspace-access/workspace-access-page-header.tsx +11 -11
- package/src/components/ui/custom/workspace-access/workspace-access-page.tsx +180 -22
- package/src/components/ui/custom/workspace-access/workspace-access-people-filters.tsx +29 -15
- package/src/components/ui/custom/workspace-access/workspace-access-permission-checklist.tsx +56 -10
- package/src/components/ui/custom/workspace-access/workspace-access-permission-preview.test.ts +33 -0
- package/src/components/ui/custom/workspace-access/workspace-access-permission-preview.tsx +24 -1
- package/src/components/ui/custom/workspace-access/workspace-access-responsive.test.ts +64 -0
- package/src/components/ui/custom/workspace-access/workspace-access-role-editor-dialog.tsx +28 -16
- package/src/components/ui/custom/workspace-access/workspace-access-roles.tsx +35 -11
- package/src/components/ui/custom/workspace-access/workspace-access-tabs-toolbar.tsx +23 -11
- package/src/components/ui/custom/workspace-select-helpers.ts +5 -3
- package/src/components/ui/custom/workspace-select.tsx +8 -2
- package/src/components/ui/finance/shared/charts/monthly-total-chart-client.tsx +1 -1
- package/src/components/ui/finance/shared/charts/monthly-total-chart.tsx +1 -1
- package/src/components/ui/storefront/cart-summary.tsx +12 -2
- package/src/components/ui/storefront/storefront-surface.test.tsx +21 -0
- package/src/components/ui/storefront/storefront-surface.tsx +6 -0
- package/src/components/ui/text-editor/__tests__/collaboration-binding.test.tsx +161 -0
- package/src/components/ui/text-editor/editor.tsx +267 -235
- package/src/globals.css +166 -0
- package/src/hooks/__tests__/use-workspace-identity-mutation.test.tsx +181 -0
- package/src/hooks/use-workspace-identity-mutation.ts +136 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.20.1](https://github.com/tutur3u/platform/compare/ui-v0.20.0...ui-v0.20.1) (2026-07-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **auth:** resume a pending sign-in after switching accounts ([5403718](https://github.com/tutur3u/platform/commit/54037189ee895863eac621239eb54b8ea94c6ed0))
|
|
9
|
+
* **tasks:** quiet the description toolbar and name the compact action honestly ([51838a0](https://github.com/tutur3u/platform/commit/51838a08a1875a44cd4c7f539b35203f890e1a39))
|
|
10
|
+
* **tasks:** show one skeleton per task dialog open ([944288b](https://github.com/tutur3u/platform/commit/944288bdc869ee80b3cdf537ee10feb17fdada22))
|
|
11
|
+
* **tasks:** stop the task dialog remounting after it opens ([9a423da](https://github.com/tutur3u/platform/commit/9a423daf7e7c1e901a63ddcc1a8a94ddff9192c9))
|
|
12
|
+
* **workspaces:** propagate a workspace rename without a page reload ([cca0b2d](https://github.com/tutur3u/platform/commit/cca0b2d7e14f6d72f1fdda1deaac18aaf07e9eee))
|
|
13
|
+
|
|
14
|
+
## [0.20.0](https://github.com/tutur3u/platform/compare/ui-v0.19.1...ui-v0.20.0) (2026-07-25)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **inventory:** secure Square POS event checkout ([532b463](https://github.com/tutur3u/platform/commit/532b46372116ee0bebfd83ba2af762cc9f668c3c))
|
|
20
|
+
* **landing:** retile the app bento and rebuild the problem section ([c56f42a](https://github.com/tutur3u/platform/commit/c56f42adf754362a269ff08b380db1ee0cf8c6ca))
|
|
21
|
+
* **offline:** own service worker runtime and refresh dependencies ([ae44477](https://github.com/tutur3u/platform/commit/ae44477603c39f0513244514771653287338a89f))
|
|
22
|
+
* **reports:** add periodic reporting automation ([ec7bd5e](https://github.com/tutur3u/platform/commit/ec7bd5e10abb137e217d1dcf143624530276392f))
|
|
23
|
+
* **ui:** align landing and locale experience ([aa6e47f](https://github.com/tutur3u/platform/commit/aa6e47f17356ce74111ccf130e8b17071cc7aadf))
|
|
24
|
+
* **web:** improve workspace navigation context ([73959e3](https://github.com/tutur3u/platform/commit/73959e3c6745f60513d23740f30024c5d24e7ee4))
|
|
25
|
+
* **web:** redesign marketing landing page ([13ede78](https://github.com/tutur3u/platform/commit/13ede784ac03af9f25bbb7df61095826c335e002))
|
|
26
|
+
* **web:** refine marketing experience ([c7f1cec](https://github.com/tutur3u/platform/commit/c7f1cec0dd667e6d5f59aaf0bab82069b79c7376))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* **platform:** improve satellite workspace routing ([0c49c48](https://github.com/tutur3u/platform/commit/0c49c4882d26704fb16ba94ee289ab0af7deb4de))
|
|
32
|
+
* **platform:** persist settings dialog state ([04d2128](https://github.com/tutur3u/platform/commit/04d212807b6fabf33f43743c0b779ba9499334ba))
|
|
33
|
+
* **settings:** harden workspace role management ([0570687](https://github.com/tutur3u/platform/commit/0570687d255698e438d1eb02262ec0fa7c56240f))
|
|
34
|
+
* **settings:** repair satellite workspace management ([63614cd](https://github.com/tutur3u/platform/commit/63614cdd1550cbf7084724dbed728e798b6f979c))
|
|
35
|
+
* **tasks:** restore task description on deep-link opens ([56d4efa](https://github.com/tutur3u/platform/commit/56d4efabd2f036e7dae39588d8aed7b129fa9a11))
|
|
36
|
+
* **ui:** make member management mobile responsive ([104c812](https://github.com/tutur3u/platform/commit/104c8120949ef34bfdc48da74fdc0e2d35eb4ce7))
|
|
37
|
+
* **ui:** refine member access settings ([b5b1ebf](https://github.com/tutur3u/platform/commit/b5b1ebf49a4a3b93532da74357899927f6e5d988))
|
|
38
|
+
* **ui:** unify workspace access and sidebar controls ([450183e](https://github.com/tutur3u/platform/commit/450183ef78af8e09a386bebb93be7018379c5152))
|
|
39
|
+
* **web:** harden prerender client boundaries ([ab1596a](https://github.com/tutur3u/platform/commit/ab1596a769e5a6ae43b0247c651ecbecea52d20d))
|
|
40
|
+
* **workspaces:** repair shared member administration ([8a1515b](https://github.com/tutur3u/platform/commit/8a1515ba970adbe690b9d92f77a447adb93c339f))
|
|
41
|
+
|
|
3
42
|
## [0.19.1](https://github.com/tutur3u/platform/compare/ui-v0.19.0...ui-v0.19.1) (2026-07-21)
|
|
4
43
|
|
|
5
44
|
|
package/biome.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuturuuu/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,33 +24,33 @@
|
|
|
24
24
|
"@hookform/resolvers": "^5.4.0",
|
|
25
25
|
"@json-render/core": "^0.19.0",
|
|
26
26
|
"@json-render/react": "^0.19.0",
|
|
27
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
28
|
-
"@radix-ui/react-alert-dialog": "^1.1.
|
|
29
|
-
"@radix-ui/react-aspect-ratio": "^1.1.
|
|
30
|
-
"@radix-ui/react-avatar": "^1.2.
|
|
31
|
-
"@radix-ui/react-checkbox": "^1.3.
|
|
32
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
33
|
-
"@radix-ui/react-context-menu": "^2.3.
|
|
34
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
35
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
36
|
-
"@radix-ui/react-hover-card": "^1.1.
|
|
37
|
-
"@radix-ui/react-label": "^2.1.
|
|
38
|
-
"@radix-ui/react-menubar": "^1.1.
|
|
39
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
40
|
-
"@radix-ui/react-popover": "^1.1.
|
|
41
|
-
"@radix-ui/react-progress": "^1.1.
|
|
42
|
-
"@radix-ui/react-radio-group": "^1.4.
|
|
43
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
44
|
-
"@radix-ui/react-select": "^2.3.
|
|
45
|
-
"@radix-ui/react-separator": "^1.1.
|
|
46
|
-
"@radix-ui/react-slider": "^1.4.
|
|
47
|
-
"@radix-ui/react-slot": "^1.3.
|
|
48
|
-
"@radix-ui/react-switch": "^1.3.
|
|
49
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
50
|
-
"@radix-ui/react-toast": "^1.2.
|
|
51
|
-
"@radix-ui/react-toggle": "^1.1.
|
|
52
|
-
"@radix-ui/react-toggle-group": "^1.1.
|
|
53
|
-
"@radix-ui/react-tooltip": "^1.2.
|
|
27
|
+
"@radix-ui/react-accordion": "^1.2.18",
|
|
28
|
+
"@radix-ui/react-alert-dialog": "^1.1.21",
|
|
29
|
+
"@radix-ui/react-aspect-ratio": "^1.1.13",
|
|
30
|
+
"@radix-ui/react-avatar": "^1.2.4",
|
|
31
|
+
"@radix-ui/react-checkbox": "^1.3.9",
|
|
32
|
+
"@radix-ui/react-collapsible": "^1.1.18",
|
|
33
|
+
"@radix-ui/react-context-menu": "^2.3.5",
|
|
34
|
+
"@radix-ui/react-dialog": "^1.1.21",
|
|
35
|
+
"@radix-ui/react-dropdown-menu": "^2.1.22",
|
|
36
|
+
"@radix-ui/react-hover-card": "^1.1.21",
|
|
37
|
+
"@radix-ui/react-label": "^2.1.13",
|
|
38
|
+
"@radix-ui/react-menubar": "^1.1.22",
|
|
39
|
+
"@radix-ui/react-navigation-menu": "^1.2.20",
|
|
40
|
+
"@radix-ui/react-popover": "^1.1.21",
|
|
41
|
+
"@radix-ui/react-progress": "^1.1.14",
|
|
42
|
+
"@radix-ui/react-radio-group": "^1.4.5",
|
|
43
|
+
"@radix-ui/react-scroll-area": "^1.2.16",
|
|
44
|
+
"@radix-ui/react-select": "^2.3.5",
|
|
45
|
+
"@radix-ui/react-separator": "^1.1.13",
|
|
46
|
+
"@radix-ui/react-slider": "^1.4.5",
|
|
47
|
+
"@radix-ui/react-slot": "^1.3.1",
|
|
48
|
+
"@radix-ui/react-switch": "^1.3.5",
|
|
49
|
+
"@radix-ui/react-tabs": "^1.1.19",
|
|
50
|
+
"@radix-ui/react-toast": "^1.2.21",
|
|
51
|
+
"@radix-ui/react-toggle": "^1.1.16",
|
|
52
|
+
"@radix-ui/react-toggle-group": "^1.1.17",
|
|
53
|
+
"@radix-ui/react-tooltip": "^1.2.14",
|
|
54
54
|
"@streamdown/cjk": "^1.0.3",
|
|
55
55
|
"@streamdown/code": "^1.1.1",
|
|
56
56
|
"@streamdown/math": "^1.0.2",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@tanstack/react-pacer": "^0.22.1",
|
|
60
60
|
"@tanstack/react-query": "^5.101.2",
|
|
61
61
|
"@tanstack/react-table": "^8.21.3",
|
|
62
|
-
"@tanstack/react-virtual": "^3.14.
|
|
62
|
+
"@tanstack/react-virtual": "^3.14.8",
|
|
63
63
|
"@tiptap/core": "3.28.0",
|
|
64
64
|
"@tiptap/extension-collaboration": "3.28.0",
|
|
65
65
|
"@tiptap/extension-collaboration-caret": "3.28.0",
|
|
@@ -86,13 +86,13 @@
|
|
|
86
86
|
"@tiptap/pm": "3.28.0",
|
|
87
87
|
"@tiptap/react": "3.28.0",
|
|
88
88
|
"@tiptap/starter-kit": "3.28.0",
|
|
89
|
-
"@tuturuuu/ai": "0.
|
|
90
|
-
"@tuturuuu/apis": "0.
|
|
91
|
-
"@tuturuuu/hooks": "0.0
|
|
92
|
-
"@tuturuuu/icons": "0.0
|
|
93
|
-
"@tuturuuu/internal-api": "0.
|
|
94
|
-
"@tuturuuu/supabase": "0.
|
|
95
|
-
"@tuturuuu/utils": "0.
|
|
89
|
+
"@tuturuuu/ai": "0.4.0",
|
|
90
|
+
"@tuturuuu/apis": "0.10.0",
|
|
91
|
+
"@tuturuuu/hooks": "0.1.0",
|
|
92
|
+
"@tuturuuu/icons": "0.1.0",
|
|
93
|
+
"@tuturuuu/internal-api": "0.22.0",
|
|
94
|
+
"@tuturuuu/supabase": "0.5.0",
|
|
95
|
+
"@tuturuuu/utils": "0.18.0",
|
|
96
96
|
"@types/debug": "^4.1.13",
|
|
97
97
|
"browser-image-compression": "^2.0.2",
|
|
98
98
|
"class-variance-authority": "^0.7.1",
|
|
@@ -100,29 +100,29 @@
|
|
|
100
100
|
"cookies-next": "^6.1.1",
|
|
101
101
|
"date-fns": "^4.4.0",
|
|
102
102
|
"date-fns-tz": "^3.2.0",
|
|
103
|
-
"dayjs": "^1.11.
|
|
103
|
+
"dayjs": "^1.11.21",
|
|
104
104
|
"debug": "^4.4.3",
|
|
105
105
|
"embla-carousel-react": "^8.6.0",
|
|
106
106
|
"eventemitter3": "^5.0.4",
|
|
107
107
|
"framer-motion": "^12.42.2",
|
|
108
108
|
"gsap": "^3.15.0",
|
|
109
|
-
"html2canvas-pro": "^2.
|
|
109
|
+
"html2canvas-pro": "^2.3.1",
|
|
110
110
|
"input-otp": "^1.4.2",
|
|
111
111
|
"katex": "^0.18.1",
|
|
112
112
|
"lodash": "4.18.1",
|
|
113
113
|
"moment": "^2.30.1",
|
|
114
114
|
"motion": "^12.42.2",
|
|
115
|
-
"next": "^16.3.0-preview.
|
|
116
|
-
"next-intl": "^4.13.
|
|
115
|
+
"next": "^16.3.0-preview.9",
|
|
116
|
+
"next-intl": "^4.13.4",
|
|
117
117
|
"next-themes": "^0.4.6",
|
|
118
118
|
"nuqs": "^2.9.1",
|
|
119
119
|
"prosemirror-state": "^1.4.4",
|
|
120
120
|
"prosemirror-view": "1.42.1",
|
|
121
121
|
"qrcode.react": "^4.2.0",
|
|
122
|
-
"react": "^19.2.
|
|
122
|
+
"react": "^19.2.8",
|
|
123
123
|
"react-colorful": "^5.8.0",
|
|
124
124
|
"react-day-picker": "^10.0.1",
|
|
125
|
-
"react-dom": "^19.2.
|
|
125
|
+
"react-dom": "^19.2.8",
|
|
126
126
|
"react-dropzone": "^19.1.1",
|
|
127
127
|
"react-hook-form": "^7.82.0",
|
|
128
128
|
"react-markdown": "^10.1.0",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"react-resizable": "^4.0.2",
|
|
132
132
|
"react-resizable-panels": "^4.12.2",
|
|
133
133
|
"react-syntax-highlighter": "^16.1.1",
|
|
134
|
-
"recharts": "3.
|
|
134
|
+
"recharts": "3.10.0",
|
|
135
135
|
"slot-text": "^0.3.3",
|
|
136
136
|
"sonner": "^2.0.7",
|
|
137
137
|
"streamdown": "^2.5.0",
|
|
@@ -148,11 +148,11 @@
|
|
|
148
148
|
"devDependencies": {
|
|
149
149
|
"@tailwindcss/postcss": "^4.3.3",
|
|
150
150
|
"@tailwindcss/typography": "^0.5.20",
|
|
151
|
-
"@tanstack/react-query": "^5.101.
|
|
151
|
+
"@tanstack/react-query": "^5.101.4",
|
|
152
152
|
"@tanstack/react-table": "^8.21.3",
|
|
153
|
-
"@testing-library/jest-dom": "^
|
|
153
|
+
"@testing-library/jest-dom": "^7.0.0",
|
|
154
154
|
"@testing-library/react": "^16.3.2",
|
|
155
|
-
"@tuturuuu/types": "0.
|
|
155
|
+
"@tuturuuu/types": "0.21.0",
|
|
156
156
|
"@tuturuuu/typescript-config": "0.1.1",
|
|
157
157
|
"@types/html2canvas": "^1.0.0",
|
|
158
158
|
"@types/lodash": "^4.17.24",
|
|
@@ -162,10 +162,10 @@
|
|
|
162
162
|
"@types/react-resizable": "^4.0.0",
|
|
163
163
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
164
164
|
"@types/uuid": "^11.0.0",
|
|
165
|
-
"@vitejs/plugin-react": "^6.0.
|
|
165
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
166
166
|
"autoprefixer": "^10.5.4",
|
|
167
167
|
"jsdom": "^29.1.1",
|
|
168
|
-
"postcss": "^8.5.
|
|
168
|
+
"postcss": "^8.5.22",
|
|
169
169
|
"postcss-load-config": "^6.0.1",
|
|
170
170
|
"tailwindcss": "^4.3.3",
|
|
171
171
|
"typescript": "7.0.2",
|
|
@@ -274,6 +274,10 @@
|
|
|
274
274
|
"types": "./src/components/ui/custom/sidebar-context.tsx",
|
|
275
275
|
"import": "./src/components/ui/custom/sidebar-context.tsx"
|
|
276
276
|
},
|
|
277
|
+
"./custom/animated-slot-text": {
|
|
278
|
+
"types": "./src/components/ui/custom/animated-slot-text.tsx",
|
|
279
|
+
"import": "./src/components/ui/custom/animated-slot-text.tsx"
|
|
280
|
+
},
|
|
277
281
|
"./custom/nav": {
|
|
278
282
|
"types": "./src/components/ui/custom/nav.tsx",
|
|
279
283
|
"import": "./src/components/ui/custom/nav.tsx"
|
|
@@ -294,6 +298,10 @@
|
|
|
294
298
|
"types": "./src/components/ui/custom/language-dropdown-wrapper.tsx",
|
|
295
299
|
"import": "./src/components/ui/custom/language-dropdown-wrapper.tsx"
|
|
296
300
|
},
|
|
301
|
+
"./custom/locale-preference": {
|
|
302
|
+
"types": "./src/components/ui/custom/locale-preference.ts",
|
|
303
|
+
"import": "./src/components/ui/custom/locale-preference.ts"
|
|
304
|
+
},
|
|
297
305
|
"./custom/system-language-dropdown-item": {
|
|
298
306
|
"types": "./src/components/ui/custom/system-language-dropdown-item.tsx",
|
|
299
307
|
"import": "./src/components/ui/custom/system-language-dropdown-item.tsx"
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import '@testing-library/jest-dom';
|
|
2
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
3
|
-
import {
|
|
2
|
+
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
|
3
|
+
import {
|
|
4
|
+
type OnUrlUpdateFunction,
|
|
5
|
+
withNuqsTestingAdapter,
|
|
6
|
+
} from 'nuqs/adapters/testing';
|
|
7
|
+
import { type ReactNode, useState } from 'react';
|
|
4
8
|
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
5
9
|
import { Dialog } from '../../dialog';
|
|
6
10
|
import {
|
|
@@ -55,7 +59,13 @@ const navItems: SettingsNavGroup[] = [
|
|
|
55
59
|
},
|
|
56
60
|
];
|
|
57
61
|
|
|
58
|
-
function renderShell(
|
|
62
|
+
function renderShell(
|
|
63
|
+
activeGroupBreadcrumb?: ReactNode,
|
|
64
|
+
options?: {
|
|
65
|
+
onUrlUpdate?: OnUrlUpdateFunction;
|
|
66
|
+
searchParams?: string;
|
|
67
|
+
}
|
|
68
|
+
) {
|
|
59
69
|
function Harness() {
|
|
60
70
|
const [activeTab, setActiveTab] = useState('profile');
|
|
61
71
|
|
|
@@ -63,6 +73,7 @@ function renderShell() {
|
|
|
63
73
|
<Dialog open>
|
|
64
74
|
<SettingsDialogShell
|
|
65
75
|
activeTab={activeTab}
|
|
76
|
+
activeGroupBreadcrumb={activeGroupBreadcrumb}
|
|
66
77
|
keyboardNavigation
|
|
67
78
|
navItems={navItems}
|
|
68
79
|
onActiveTabChange={setActiveTab}
|
|
@@ -74,7 +85,9 @@ function renderShell() {
|
|
|
74
85
|
);
|
|
75
86
|
}
|
|
76
87
|
|
|
77
|
-
return render(<Harness
|
|
88
|
+
return render(<Harness />, {
|
|
89
|
+
wrapper: withNuqsTestingAdapter(options),
|
|
90
|
+
});
|
|
78
91
|
}
|
|
79
92
|
|
|
80
93
|
describe('SettingsDialogShell keyboard navigation', () => {
|
|
@@ -148,6 +161,17 @@ describe('SettingsDialogShell keyboard navigation', () => {
|
|
|
148
161
|
expect(screen.getByText('Forms')).toBeVisible();
|
|
149
162
|
});
|
|
150
163
|
|
|
164
|
+
it('can replace the active group crumb with an interactive context control', () => {
|
|
165
|
+
renderShell(<button type="button">Switch workspace</button>);
|
|
166
|
+
|
|
167
|
+
const breadcrumb = screen.getByTestId('settings-active-group-breadcrumb');
|
|
168
|
+
|
|
169
|
+
expect(breadcrumb).toContainElement(
|
|
170
|
+
screen.getByRole('button', { name: 'Switch workspace' })
|
|
171
|
+
);
|
|
172
|
+
expect(breadcrumb).not.toHaveTextContent('Account');
|
|
173
|
+
});
|
|
174
|
+
|
|
151
175
|
it('focuses settings search with slash and modifier search shortcuts', () => {
|
|
152
176
|
renderShell();
|
|
153
177
|
|
|
@@ -185,6 +209,26 @@ describe('SettingsDialogShell keyboard navigation', () => {
|
|
|
185
209
|
expect(activeTab).toHaveTextContent('profile');
|
|
186
210
|
});
|
|
187
211
|
|
|
212
|
+
it('restores the active section from the URL and persists tab changes', async () => {
|
|
213
|
+
const onUrlUpdate = vi.fn<OnUrlUpdateFunction>();
|
|
214
|
+
|
|
215
|
+
renderShell(undefined, {
|
|
216
|
+
onUrlUpdate,
|
|
217
|
+
searchParams: '?settingsDialog=open&settingsTab=appearance',
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
await waitFor(() =>
|
|
221
|
+
expect(screen.getByTestId('active-tab')).toHaveTextContent('appearance')
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
fireEvent.click(screen.getAllByText('Profile')[0]!);
|
|
225
|
+
|
|
226
|
+
await waitFor(() => {
|
|
227
|
+
const update = onUrlUpdate.mock.calls.at(-1)?.[0];
|
|
228
|
+
expect(update?.searchParams.get('settingsTab')).toBe('profile');
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
|
|
188
232
|
it('does not handle navigation shortcuts outside the dialog content', () => {
|
|
189
233
|
renderShell();
|
|
190
234
|
|
|
@@ -75,9 +75,31 @@ describe('mergeWorkspaceSelectWorkspaces', () => {
|
|
|
75
75
|
"t('common.join_workspace_action')"
|
|
76
76
|
);
|
|
77
77
|
});
|
|
78
|
+
|
|
79
|
+
it('supports a modal popover so nested settings pickers remain scrollable', () => {
|
|
80
|
+
const workspaceSelectSource = readFileSync(
|
|
81
|
+
join(process.cwd(), 'src/components/ui/custom/workspace-select.tsx'),
|
|
82
|
+
'utf8'
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
expect(workspaceSelectSource).toContain('popoverModal = false');
|
|
86
|
+
expect(workspaceSelectSource).toContain('<Popover modal={popoverModal}');
|
|
87
|
+
});
|
|
78
88
|
});
|
|
79
89
|
|
|
80
90
|
describe('normalizeWorkspaceSwitchPath', () => {
|
|
91
|
+
it('lands on tasks when switching workspace from a canonical task board detail route', () => {
|
|
92
|
+
expect(
|
|
93
|
+
normalizeWorkspaceSwitchPath('/personal/boards/board-1', 'personal')
|
|
94
|
+
).toBe('/personal/tasks');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('lands on tasks when switching workspace from the canonical task boards index', () => {
|
|
98
|
+
expect(normalizeWorkspaceSwitchPath('/personal/boards', 'personal')).toBe(
|
|
99
|
+
'/personal/tasks'
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
|
|
81
103
|
it('lands on tasks when switching workspace from a task board detail route', () => {
|
|
82
104
|
expect(
|
|
83
105
|
normalizeWorkspaceSwitchPath('/personal/tasks/boards/board-1', 'personal')
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from '@tuturuuu/utils/format';
|
|
4
|
+
import { SlotText } from 'slot-text/react';
|
|
5
|
+
|
|
6
|
+
export function AnimatedSlotText({
|
|
7
|
+
className,
|
|
8
|
+
text,
|
|
9
|
+
}: {
|
|
10
|
+
className?: string;
|
|
11
|
+
text: string;
|
|
12
|
+
}) {
|
|
13
|
+
return (
|
|
14
|
+
<SlotText
|
|
15
|
+
className={cn('line-clamp-1 break-all', className)}
|
|
16
|
+
options={{ bounce: 0.1, duration: 180, stagger: 12 }}
|
|
17
|
+
text={text}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
}
|