Resizing, accessibility and themes
A reference of the soundor-plugin-design skill.
soundor-plugin-design reads this reference when a task needs it. Source on GitHub
Editor size
editor in soundor.config.ts (check the installed @soundor/config):
editor: {
width: 900,
height: 560,
resizable: true,
resize: 'scale', // or 'layout'
minWidth: 675,
minHeight: 420,
maxWidth: 1800,
maxHeight: 1120,
},resize: 'scale'draws the same layout larger or smaller. Use it for dense, position-based designs where users find controls by place (Prism: 1200 × 720, 75 % to 200 %).resize: 'layout'(the default) lays the UI out again at the new size; text keeps its size. Use it for UIs with flexible regions (a larger graph, more visible rows), built with flexbox (flex: 1).- Hosts may impose sizes outside the limits;
fit: 'contain'(default) centres the UI with bands around it,'cover'fills the window anduseViewSize().safeAreatells the UI where its designed area is. - Put a
ResizeGripat the editor's root when resizable; it shows only when the host allows resizing. - Without
editor, the editor is a fixed 800 × 600.
High-DPI
Soundor's engine draws at the display's scale; sizes in styles are logical
pixels. Use vector drawing (styles, Svg, canvas paths, Soundor Icons)
rather than bitmaps; provide images at 2× when you must use them. Check
screenshots at the scale the Driver reports.
Keyboard
- Every control is reachable with Tab, in reading order, and operable with
keys; Components do this. Custom controls use the headless hooks, or a
Pressable(focusable by default) or aViewwithfocusable, with key handlers. - Focus is visible (a ring for keyboard focus only).
- Menus and modals trap and return focus (
Modal,FocusScopein@soundor/react; Components' menus handle it). - Avoid shortcuts that collide with the DAW's (space, numbers, Ctrl/Cmd+S).
Screen readers
Soundor maps accessibility props to UI Automation (Windows), AT-SPI (Linux), the macOS accessibility API, and ARIA on the web.
- Components report their role (
adjustable,button,switch…), label and formatted value. - Custom controls set
accessibilityRole,accessibilityLabel,accessibilityValue, and actions (increment, decrement) on the node. - Graphs get an
accessibilityLabelthat summarises them; their handles are adjustable controls themselves. - Tests that find controls by role and name verify this.
Themes
- Components use tokens;
ThemeProviderandcreateThemefrom@soundor/components/themeoverride tokens and component slots. - A light theme is optional. If offered, keep it a user setting (in
soundor:storage, shared by the plugin's instances), define both themes with the same tokens, and check contrast in each. - Accent and status colors keep their meaning in both themes.