react-dockable-desktop 7.6.2 → 7.7.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 +114 -1
- package/README.md +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +118 -34
- package/dist/index.d.ts +118 -34
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/styles.css +26 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,117 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [7.7.1] — 2026-10-05
|
|
10
|
+
|
|
11
|
+
Two workspaces on one page no longer break each other. Several providers on one page were documented
|
|
12
|
+
as supported, but they shared state they should not have.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **A workspace's panels came back blank after another workspace on the page changed its panels.**
|
|
17
|
+
The panel DOM cache was shared by every workspace, and each workspace's cleanup deleted the cached
|
|
18
|
+
elements of panels that were not its own. On its next render the other workspace's panels got new,
|
|
19
|
+
empty elements: typed text, scroll offsets and React state were gone. Each workspace now keeps its
|
|
20
|
+
own panel DOM, sizes and lifecycle handlers.
|
|
21
|
+
- **Two workspaces with the same panel id interfered.** Both rendered into one element, `usePanelSize`
|
|
22
|
+
reported the other panel's size, `usePanelEvents` handlers fired for the other workspace's panel,
|
|
23
|
+
and closing the panel in one workspace silently dropped the other's handlers. Panel ids may now
|
|
24
|
+
repeat across workspaces.
|
|
25
|
+
- **A touch inside a taskbar preview could close it** while another workspace also showed a preview:
|
|
26
|
+
the "touched outside?" check found the first preview on the page rather than its own.
|
|
27
|
+
- **Unmounting one workspace stripped `<html>` of the other's skin, animations opt-out and stacking
|
|
28
|
+
base** (`data-rdd-skin`, `rdd-no-animations`, `--rdd-z-base`). With several workspaces mounted, the
|
|
29
|
+
most recently mounted one now decides these, and unmounting it hands them back to the others instead
|
|
30
|
+
of removing them. Chrome rendered outside the workspaces (menus, toasts, flyouts) therefore follows
|
|
31
|
+
the newest workspace's skin when two workspaces use different skins.
|
|
32
|
+
|
|
33
|
+
### Tests
|
|
34
|
+
|
|
35
|
+
- `TwoWorkspaces.test.tsx`: two providers in one document — distinct ids (a panel keeps its element
|
|
36
|
+
and state after the other workspace closes a panel), the same id (own element, own lifecycle
|
|
37
|
+
events, own size), the taskbar preview under touch, and the `<html>` mirror (newest wins, handed
|
|
38
|
+
back on unmount, a page-set skin left alone). Each assertion was seen failing on 7.7.0, the last one
|
|
39
|
+
with its guard removed.
|
|
40
|
+
- `twoWorkspaces.browser.ts` (harness `two=1`): a real tab drag and a close in one workspace leave the
|
|
41
|
+
other's typed input, scroll offset and DOM intact. On 7.7.0 the input came back empty.
|
|
42
|
+
|
|
43
|
+
### Internal
|
|
44
|
+
|
|
45
|
+
The browser suite takes about 5½ minutes instead of 12, with the same tests. Nothing in the published
|
|
46
|
+
package changes.
|
|
47
|
+
|
|
48
|
+
- **The scene helpers wait for the page to be still instead of sleeping.** Opening the harness, a
|
|
49
|
+
branding scene, its overlays and each hover now wait until nothing is animating or changing
|
|
50
|
+
(two still frames), with the old sleep as the ceiling. The wait after the pointer leaves a
|
|
51
|
+
control stays fixed, since the timers it starts are invisible to such a check, and so do the
|
|
52
|
+
timer tests in `taskbar.browser.ts`. Rewriting both baselines with the new helpers gave
|
|
53
|
+
byte-identical fixtures.
|
|
54
|
+
- **The radius tests check all three scales on one page per scene**: `--rdd-radius-scale` is set
|
|
55
|
+
on the open scene, which settles before its corners are read. Same 42 tests, a third of the page
|
|
56
|
+
loads.
|
|
57
|
+
- **A branding scene is captured twice only for an unexpected difference.** The intended
|
|
58
|
+
stale-accent changes are in every capture, so recapturing for them doubled most scenes and proved
|
|
59
|
+
nothing.
|
|
60
|
+
- **The baselines key elements by library class, not position**, so a new wrapper element no
|
|
61
|
+
longer renames everything after it (7.7.0's dialog row renamed a whole modal). Both fixtures were
|
|
62
|
+
regenerated once: every scene has the same entries with identical values, under the new keys.
|
|
63
|
+
- `V2Features.test.tsx`: the "logs nothing for an unused workspace" test moves a fake clock past
|
|
64
|
+
the old 1s timer instead of waiting it out (seen failing with such a timer added).
|
|
65
|
+
|
|
66
|
+
## [7.7.0] — 2026-10-05
|
|
67
|
+
|
|
68
|
+
Ready-made dialogs: the confirmation shows an icon, a new alert dialog, and both as promises.
|
|
69
|
+
A confirmation dismissed without its buttons now settles.
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- **`RddConfirm` shows an icon left of its message**: a question mark, coloured by `alertType`
|
|
74
|
+
(info, success, warning, danger) with the toast colour tokens. The new `icon` prop replaces it
|
|
75
|
+
with your own node; `icon: null` hides it.
|
|
76
|
+
- **`RddAlert`**: a message with a single OK button, for telling rather than asking. Its icon
|
|
77
|
+
follows `alertType` (info, success, warning, danger), with the same `icon` override. Props:
|
|
78
|
+
`message`, `title`, `alertType`, `icon`, `okLabel`, `onSettled`. Focus starts on OK and Enter
|
|
79
|
+
presses it; Escape, the backdrop and the × acknowledge it too, unless the modal is
|
|
80
|
+
`closable: false`.
|
|
81
|
+
- **`useModals().confirm(options)` and `useModals().alert(options)`** open those dialogs (size
|
|
82
|
+
`'small'`) and return a promise: `confirm` resolves `true` for the confirm button and `false` for
|
|
83
|
+
cancel or any dismissal; `alert` resolves once it is closed. Option types: `ConfirmOptions`,
|
|
84
|
+
`AlertOptions`.
|
|
85
|
+
- **`RddConfirm` `onSettled(ok)`**: fires exactly once however the dialog ends — `true` for the
|
|
86
|
+
confirm button, `false` for cancel, Escape, the backdrop, the × or a close by code. `onOK` and
|
|
87
|
+
`onCancel` still fire for their buttons only.
|
|
88
|
+
- **Test hooks:** `data-rdd-confirm-ok`, `data-rdd-confirm-cancel`, `data-rdd-alert-ok`.
|
|
89
|
+
- **Message key `alertTitle`** ("Information"), the default title of `modals.alert()`;
|
|
90
|
+
`modals.confirm()` uses the existing `modalTitle` ("Confirmation").
|
|
91
|
+
- **`usePanelEvents().onClose` (and the container contract's `onClose`) now fire in modals and
|
|
92
|
+
side drawers**, whichever way they close. They only fired for docked and floating panels before.
|
|
93
|
+
- New classes: `rdd-dialog-content`, `rdd-dialog-icon`, `rdd-dialog-icon-{info|success|warning|danger}`.
|
|
94
|
+
|
|
95
|
+
### Fixed
|
|
96
|
+
|
|
97
|
+
- **An `RddConfirm` closed with Escape, the backdrop, the × or `closeAll()` never answered.**
|
|
98
|
+
Neither `onOK` nor `onCancel` fired, so a promise built on them stayed pending. The library's
|
|
99
|
+
own unsaved-changes prompt was one: after Escape on it, that close request never finished. The
|
|
100
|
+
prompt now resolves from `onSettled`, so a dismissal counts as "keep the panel".
|
|
101
|
+
- **`RddConfirm` overwrote the modal's header icon.** It set a ❓ emoji there on mount, replacing
|
|
102
|
+
any `ModalOptions.icon` you passed. It no longer touches the header.
|
|
103
|
+
|
|
104
|
+
### Changed
|
|
105
|
+
|
|
106
|
+
- The ❓ is gone from a confirmation's header; the question icon is now drawn beside the message.
|
|
107
|
+
To keep a header icon, pass `ModalOptions.icon`.
|
|
108
|
+
|
|
109
|
+
### Tests
|
|
110
|
+
|
|
111
|
+
- `Dialogs.test.tsx`, under `StrictMode`: settle-once for every exit of both dialogs (Escape,
|
|
112
|
+
backdrop, ×, `closeAll`, `closeAllModals`, `close(id)`, each button); the unsaved-changes prompt
|
|
113
|
+
wired to `onSettled`; default, custom and hidden icons; the header icon left alone; alert focus,
|
|
114
|
+
label and `closable: false`; both promise helpers; `onClose` in drawers and modals. Each
|
|
115
|
+
assertion was seen failing with its code removed.
|
|
116
|
+
- The branding and radius browser baselines were regenerated on purpose: their scenes include a
|
|
117
|
+
confirmation, whose header no longer has an icon and whose message now sits in the icon row.
|
|
118
|
+
Nothing outside that modal changed in either baseline.
|
|
119
|
+
|
|
9
120
|
## [7.6.2] — 2026-10-04
|
|
10
121
|
|
|
11
122
|
### Fixed
|
|
@@ -826,7 +937,9 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
826
937
|
|
|
827
938
|
---
|
|
828
939
|
|
|
829
|
-
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.
|
|
940
|
+
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.7.1...HEAD
|
|
941
|
+
[7.7.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.7.0...v7.7.1
|
|
942
|
+
[7.7.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.2...v7.7.0
|
|
830
943
|
[7.6.2]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.1...v7.6.2
|
|
831
944
|
[7.6.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.0...v7.6.1
|
|
832
945
|
[7.6.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.5.0...v7.6.0
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# React Dockable Desktop
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/react-dockable-desktop)
|
|
4
4
|
[](https://www.typescriptlang.org/)
|
|
5
5
|
[](#touch--mobile)
|
|
6
6
|
[](#license)
|