react-dockable-desktop 7.5.0 → 7.6.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 CHANGED
@@ -6,6 +6,64 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [7.6.0] — 2026-10-04
10
+
11
+ Context menus open with nothing highlighted, the same every time.
12
+
13
+ ### Changed
14
+
15
+ - **A context menu opens with focus on the menu itself, no item highlighted.** It used to focus
16
+ its first item, and whether the browser then drew a focus ring depended on the user's previous
17
+ interaction: a menu opened from script (a map library's right-click calling `showContextMenu`,
18
+ say) showed a ring after a page load or a key press and none after a mouse click. ↓ reaches the
19
+ first item and ↑ the last, so keyboard use is unchanged but for that one key press.
20
+ - **Menus opened from the keyboard still start on their first item**: the library's own (the
21
+ ContextMenu key or Shift+F10 on a tab or taskbar item, Enter or Space on a window's ⋮ button),
22
+ a keyboard `contextmenu` event, and any menu shown with `initialFocus: 'first-item'`.
23
+
24
+ ### Added
25
+
26
+ - **`initialFocus?: 'menu' | 'first-item'`** on `showContextMenu` / `ShowContextMenuOptions`
27
+ (`useContextMenu()`, `useWorkspace().showContextMenu`, a `ContextMenuHandle`). A custom
28
+ `ContextMenuAdapter` receives it too.
29
+ - **`--rdd-context-menu-focus-ring`**: the outline on a menu item with keyboard focus, by default
30
+ `--rdd-focus-ring` (the skin's accent). `--rdd-focus-ring` is now documented with the theming
31
+ tokens; both are read with a fallback rather than declared, so they follow the skin's or your
32
+ brand's accent.
33
+
34
+ ### Fixed
35
+
36
+ - **↑ from a menu with nothing highlighted went to the second-to-last item**; it goes to the last.
37
+ - **A submenu opened by hovering took focus** when an earlier submenu had been opened from the
38
+ keyboard; a hover-opened submenu never takes focus now.
39
+ - **The focused menu element drew the global focus ring**; it draws none, and items draw the
40
+ skin's ring rather than the browser's default.
41
+
42
+ ### Upgrading
43
+
44
+ - Nothing to change for menus opened with the mouse or from script: they now open with no item
45
+ highlighted. If you open a menu from your own keyboard shortcut, pass
46
+ `initialFocus: 'first-item'` (or the keyboard `contextmenu` event) so it starts on an item.
47
+ - Tests that expected the first item to have focus right after `showContextMenu` should press ↓
48
+ first, or open the menu with `initialFocus: 'first-item'`.
49
+
50
+ ### Tests
51
+
52
+ - `KeyboardAccess.test.tsx`: the menu itself is focused on open; ↓/↑ from it; `initialFocus`;
53
+ keyboard and mouse `contextmenu` events; the Menu key and a right-click on a tab; a hover-opened
54
+ submenu after a keyboard-opened one. Each new test was seen failing with its part of the fix
55
+ removed. The old "focuses the first enabled item" test passed vacuously (its label helper read
56
+ the first label inside whatever had focus) and is replaced.
57
+ - The branding browser baseline (`tests/browser/fixtures/branding-baseline.json`) is regenerated
58
+ for 7.5.0's intended toolbar changes (toggle "on" colours and edge, the new tokens, the
59
+ vscode/macos light-mode hover), which 7.5.0 shipped without refreshing it. No context-menu
60
+ colour changed.
61
+
62
+ ### Docs
63
+
64
+ - Context Menus guide: initial focus, the option, the adapter and `ContextMenuHandle` signatures,
65
+ keyboard behaviour, the focus ring token. Advanced guide keyboard table; Theming token table.
66
+
9
67
  ## [7.5.0] — 2026-10-04
10
68
 
11
69
  Toolbar buttons: the library now sizes the icon inside its own buttons, and a toggle that is on
@@ -722,7 +780,8 @@ All of the above is additive and backward-compatible: every new field is optiona
722
780
 
723
781
  ---
724
782
 
725
- [Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.5.0...HEAD
783
+ [Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.0...HEAD
784
+ [7.6.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.5.0...v7.6.0
726
785
  [7.5.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.1...v7.5.0
727
786
  [7.4.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.0...v7.4.1
728
787
  [7.4.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.3.0...v7.4.0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # React Dockable Desktop
2
2
 
3
- [![npm version](https://img.shields.io/badge/npm-v7.5.0-blue.svg)](https://www.npmjs.com/package/react-dockable-desktop)
3
+ [![npm version](https://img.shields.io/badge/npm-v7.6.0-blue.svg)](https://www.npmjs.com/package/react-dockable-desktop)
4
4
  [![TypeScript](https://img.shields.io/badge/TypeScript-first-3178c6.svg)](https://www.typescriptlang.org/)
5
5
  [![Touch Ready](https://img.shields.io/badge/touch-iPad%20%7C%20Android-success.svg)](#touch--mobile)
6
6
  [![license](https://img.shields.io/badge/license-MIT-green.svg)](#license)