Commit Graph
31 Commits
Author SHA1 Message Date
Lam Wei Lun 4ea50a33e4 Testing macOS fixes 2026-09-18 19:07:03 +08:00
Lam Wei Lun 075a84093f Fixes issue with showing hidden settings in speed dial. 2026-09-16 16:02:39 +08:00
Lam Wei Lun 0131533ae0 Get speed dial to work with translations 2026-09-14 14:59:06 +08:00
Lam Wei Lun 966e029b95 Code refactoring for better maintainability 2026-09-11 17:15:57 +08:00
Lam Wei Lun c57b74731e Tooltip bottom bar for process/filament/printer settings 2026-09-11 16:38:14 +08:00
Lam Wei Lun 70a2b3a814 Code cleanup, dedup, update unit tests 2026-09-11 15:43:46 +08:00
Lam Wei Lun 81458dae86 Add category headers. Alphabetical sorting when no search query. Recent count adjustments 2026-09-11 14:56:59 +08:00
Lam Wei Lun 7c2991d00c Update translations. Code dedup and cleanup 2026-09-11 13:05:39 +08:00
Lam Wei Lun 42bee12481 Speed Dial: replace tile monograms with native SVG icons
Tiles previously rendered a colored monogram (title/source initials plus an ordinal) with a per-id hue. Show the matching native SVG icon instead:

- AppAction/NativeCommand gain an `icon` field; commands get a curated key->icon table and settings inherit their group header's icon.
- Notebook tracks each page's resource icon name and reports it in tab_options(), so the tab picker can show it too.
- Searcher records the group icon so settings keep it through search.
- Web tile rendering swaps monogramFor/hue for an <img>; drop the now-unused hue/text CSS vars. Add a test asserting every non-empty icon resolves to a shipped SVG.
2026-09-11 11:36:24 +08:00
Lam Wei Lun 8bbce371b2 Add Help actions. Add Toggle Developer action. Add warning popup when switching between process mode. Add primitives/handy models actions 2026-09-10 18:34:05 +08:00
Lam Wei Lun 1d44320f30 Updated unit tests 2026-09-10 13:29:57 +08:00
Lam Wei Lun 16d285fea6 Cleanup comments and formatting 2026-09-10 13:00:23 +08:00
Lam Wei Lun b4beae4be3 Fixed potential UB 2026-09-10 12:47:43 +08:00
Lam Wei Lun a0ba8e12e5 Change to a pin/bookmark icon.
Added shortcut (Ctrl/Cmd+B) to pin/unpin actions.

Clear unresolved pinned actions when switching between modes.

Fixed scroll-back issue when scrolling to pin action
2026-09-10 12:07:36 +08:00
Lam Wei Lun 3985200672 Search improvements. Code refactoring so its easier to maintain. Experimental features for speed dial: connect/disconnect from printer. 2026-09-09 16:53:58 +08:00
Lam Wei Lun c3a21fa0d4 Switched back to jump to setting instead 2026-09-09 12:26:09 +08:00
Lam Wei Lun cae23a933e Plate controls 2026-09-09 11:29:18 +08:00
Lam Wei Lun 846a95374f Fixed unit test issue. Added basic object manipulation to actions. Added calibration wizards to actions. Added View controls to actions 2026-09-08 18:23:51 +08:00
Lam Wei Lun 2dce0ad24f Back to spacebar for speed dial shortcut. Integrated inline process settings editing. Optimized saerch results 2026-09-08 16:46:56 +08:00
Lam Wei Lun b32f28e712 Initial Commit of speed dial improvement 2026-09-07 14:00:28 +08:00
SoftFever f0f496e9c3 Merge branch 'feat/plugin-feature' into feature/speed-dial
Adapt the speed dial's ActionRegistry to the collapsed
get_plugin_capability(PluginCapabilityId) overload, and restore the
script success/skipped status message the dialog lost when its
PluginScriptRunner refactor was superseded by ActionRegistry.
2026-07-17 19:32:44 +08:00
Andrew 9279f86858 Migrate from PluginLoader to PluginManager
Refactor to streamline plugin management within
ActionRegistry by consolidating interface usage.
2026-07-16 13:32:40 +08:00
Andrew c816e48b78 refactor: collapse speed-dial action source abstraction
Only one action source ever existed, so the
IActionSource interface and ScriptActionSource
are gone. ActionRegistry now subscribes to the
plugin loader and enumerates actions directly
in init() - no polymorphism for one impl.

Replace the opaque FNV-hash SpeedDialActionId
with a readable composed id of the form
prefix:title:source_key. Split AppAction's
single source field into source_key (stable
identity, e.g. plugin_key) and source_name
(display), so identity and display no longer
share one field.
2026-07-16 13:08:48 +08:00
Andrew 87c9ab138c Protect action identity from mutation
Keep action identity and display metadata
constructor-set so registry keys cannot drift
from the objects they index.

Require sources to publish unique ownership while
the registry retains shared keepalive for runs.

Preserve opaque IDs and persisted state keys.
2026-07-13 17:32:34 +08:00
Andrew 88e3e59c64 Convert actions storage to unordered_map
Enhance action lookup efficiency by switching
from a vector to an unordered_map, allowing
faster access by action ID.
2026-07-13 14:28:26 +08:00
Andrew c29ffdfc1a Extract script actions into an action source
Move plugin capability enumeration, loader
subscriptions, and action construction into
ScriptActionSource. Keep ActionRegistry focused
on generic action state, dispatch, and snapshots.

Use source rather than package for generic origin
metadata so future non-plugin providers share the
same interface. Action IDs and persisted
configuration remain unchanged.

Subscribe before initial enumeration so plugin
events cannot be missed between the snapshot and
callback registration. Add a focused test for
source startup.
2026-07-13 14:28:05 +08:00
Andrew 2cef101ffe Make speed dial actions polymorphic
Decouple registry dispatch from plugin-specific
result types so future action types can provide
their own run implementations.

Store actions behind shared pointers to keep them
alive while plugin UI pumps a nested event loop
and queued refreshes mutate the registry. Scope
"don't ask again" to an individual action instead
of its whole plugin.
2026-07-13 14:28:05 +08:00
Andrew 35d189f1c7 Add right-click menu to reorder or unpin favs
Right-clicking a fav tile now opens a small
context menu with Move left, Move right, and
Unpin, instead of relying on drag-only reorder.

- speeddial.js: oncontextmenu handler, the
  menu build/position/dismiss logic, and an
  Escape-key close.
- style.css: .ctx-menu/.ctx-item styling.
- ActionRegistry: reorder_favourites persists
  the new bar order to AppConfig.
- SpeedDialDialog: routes the new
  reorder_favourites command from the page.
2026-07-10 17:18:00 +08:00
Andrew 7c9fa801fb Remove dead always-true runnable action field
runnable was hardcoded true on every action,
and only loaded+enabled capabilities ever
reach the registry, so every JS === false
branch was unreachable. Drop the field, its
JSON, the guards, and the orphan .disabled
CSS rule.
2026-07-10 17:12:52 +08:00
Andrew 4626f328e4 Route the speed dial popup through the ActionRegistry 2026-07-10 14:33:25 +08:00
Andrew 6463b3d976 Add ActionRegistry as the speed dial's action source of truth 2026-07-09 16:21:54 +08:00