Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
e95f491
Refactor canvas elements: registry-driven controls
hatton Jan 26, 2026
9b8d5fc
Add agent skill for working with canvas elements
hatton Feb 11, 2026
607e54e
Refactor CanvasElementManager: extract creation/clipboard/duplication
hatton Feb 12, 2026
b2c28d9
Toolbox bundling safety: type-only CanvasElementManager imports
hatton Feb 12, 2026
0afca7b
Refactor CanvasElementManager: extract selection UI controller
hatton Feb 12, 2026
7bdf0eb
Refactor CanvasElementManager: extract mouse drag handlers
hatton Feb 12, 2026
f920c76
Refactor canvas handle drag interactions
hatton Feb 12, 2026
81892a3
Refactor canvas alternates and draggables
hatton Feb 12, 2026
0d1b34c
Refactor canvas editing suspension
hatton Feb 12, 2026
d3cb86e
Refactor canvas resize adjustments
hatton Feb 12, 2026
3b723a5
Refactor canvas background image pipeline
hatton Feb 12, 2026
1f75388
Move canvas files under canvasElementManager
hatton Feb 12, 2026
1ada6f7
Move canvas e2e suite and update test wiring
hatton Feb 12, 2026
229d865
All tests passing
hatton Feb 12, 2026
da92850
wip
hatton Feb 13, 2026
f09f811
Port master Canvas fixes into refactored manager modules
hatton Feb 13, 2026
cee437d
Paste error should show error in browser, not messagebox
hatton Feb 13, 2026
d56b44f
Merge remote-tracking branch 'origin/master' into BL-15770RefactorCanvas
hatton Feb 13, 2026
1d66cd9
canvas test refactoring
hatton Feb 13, 2026
569a70e
Convert winforms messageBox to browser dlg (didn't like the format of…
hatton Feb 14, 2026
45e78c8
More canvas e2e tests
hatton Feb 14, 2026
b7d99b7
A single source for commands a menus for canvas items
hatton Feb 14, 2026
37c2950
more canvas tests
hatton Feb 14, 2026
d868707
PR fixes
hatton Feb 14, 2026
86e9799
update chat prompts
hatton Feb 14, 2026
54bacfc
canvas-controls-plan
hatton Feb 19, 2026
0c171a6
New declarative canvas control system
hatton Feb 19, 2026
ba86ec8
More e2e tests
hatton Feb 19, 2026
d3b0f7b
wip
hatton Feb 19, 2026
993adcc
Fix mp3 label regex in canvas controls
hatton Feb 19, 2026
6559cc0
Enable duplicate and delete for book link grid
hatton Feb 19, 2026
70aab3e
Align canvas menu/toolbar behavior with review feedback
hatton Feb 19, 2026
b237fc8
align checkboxes in canvas tools
hatton Feb 19, 2026
ce640cf
Refine canvas control architecture docs and fix typed eslint issues
hatton Feb 20, 2026
f9e6370
Fix canvas help-row submenu subtitle mapping
hatton Feb 20, 2026
efef81f
Set default canvas textHasAudio to false
hatton Feb 20, 2026
9ec361f
Fail fast when selected page is not canvas for e2e
hatton Feb 20, 2026
c348692
Disable unstable canvas e2e workflows with TODOs
hatton Feb 20, 2026
5f977e7
Fix canvas e2e lint errors
hatton Feb 20, 2026
93afa20
Refactor canvas controls and relax typed eslint pre-commit strictness
hatton Feb 20, 2026
452ce64
wip
hatton Mar 3, 2026
07252ba
plan for catching up with master
hatton Mar 3, 2026
a80ddc8
BL-15770 item 17: port toolbox paste infrastructure
hatton Mar 3, 2026
d9767ad
BL-15770 item 18: port toolbox bootstrap paste init
hatton Mar 3, 2026
6acd7f5
BL-15770 item 19: port isXmatter custom-page arg
hatton Mar 3, 2026
f23b354
BL-15770 item 21: port editMode.css additions
hatton Mar 3, 2026
079af7f
BL-15770 item 13: update page list iframe URL on rename
hatton Mar 3, 2026
958b80c
BL-15770 item 14: migrate top bar browser-click hookups
hatton Mar 4, 2026
8882523
BL-15770 item 15: mark blocked pending license type dependency
hatton Mar 4, 2026
9496eb7
BL-15770 item 1: port custom cover API endpoints
hatton Mar 4, 2026
403f035
BL-15770 item 20: add custom page layout files
hatton Mar 4, 2026
b728209
BL-15770 item 6: port custom-page canvas tool gating
hatton Mar 4, 2026
135063a
BL-15770 item 22: port bloomVideo comment update
hatton Mar 4, 2026
f74b01d
BL-15770 item 7: port origami canvas structure
hatton Mar 4, 2026
f37fa63
BL-15770 item 8: harden background image setup and sizing
hatton Mar 4, 2026
f97abc4
BL-15770 item 2: wire custom page layout menu setup
hatton Mar 4, 2026
258274e
BL-15770 item 11: restore paste side-effects and delay wrapping
hatton Mar 4, 2026
2ccf090
BL-15770 item 12: recompute source bubbles and qtip cleanup
hatton Mar 4, 2026
63ddaf4
BL-15770 item 23: apply bloomEditing lint-safety cleanups
hatton Mar 4, 2026
1ba4911
BL-15770 item 3: restore language submenu for custom pages
hatton Mar 4, 2026
acedcc4
BL-15770 item 4: restore field type submenu for custom pages
hatton Mar 4, 2026
bcf4b1d
BL-15770 item 5: restore image field type and become-background behavior
hatton Mar 4, 2026
4b15a16
BL-15770 item 10: include derived text in color targeting
hatton Mar 4, 2026
78d85c1
BL-15770 item 9: keep drag-drop coordinates consistent
hatton Mar 4, 2026
df64f84
BL-15770 item 15: port license info migration compatibly
hatton Mar 4, 2026
9e72e9d
Merge master into BL-15770RefactorCanvas
hatton Mar 4, 2026
8c715cb
Fix post-merge LicenseInfo and top bar compile errors
hatton Mar 4, 2026
9f45700
Bump config-r to alpha.19 to restore UI bundle build
hatton Mar 4, 2026
5269643
Fix Become Background menu no-op
hatton Mar 4, 2026
9ea71fc
more fixes
hatton Mar 4, 2026
7ada8d7
remove unused CanvasElementKeyHints
hatton Mar 5, 2026
82db789
fixes
hatton Mar 5, 2026
4005f40
undo incorrect xlf changes
hatton Mar 9, 2026
6d3de40
Better name for CanvasElementControlRegistry
hatton Mar 9, 2026
8540965
add prompt to open Visual Studio with the local solution
hatton Mar 9, 2026
06ba187
Review fixes
hatton Mar 10, 2026
a8fc455
pr fixes
hatton Mar 11, 2026
e06137b
some cleanup in e2e tests
hatton Mar 11, 2026
0f982b3
pr fixes
hatton Mar 11, 2026
7cc5c9f
Merge remote-tracking branch 'origin/master' into BL-15770RefactorCanvas
hatton Mar 11, 2026
b20370c
Clarify canvas bridge and resize modules
hatton Mar 11, 2026
5f30f10
working around the demise of CURRENTPAGE
hatton Mar 12, 2026
14bc2df
another fix for single browser merge
hatton Mar 12, 2026
4ab6d29
pr fixes
hatton Mar 12, 2026
2bb8a72
Flatten thin canvas manager wrappers for review comment 3933016845
hatton Mar 12, 2026
ea7ec1c
Acknowledge review comment 3932937498 after prior resize cleanup
hatton Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Project Memory

Instructions here apply to this project and are shared with team members.

## Context

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
mode: agent
description: setup ui tests
---
We have a test system explained at src/BloomBrowserUI/react_components/component-tester/README.md.
Expand All @@ -21,6 +20,6 @@ Sometimes the top level component is not readily testable. In that case it might
## Guidelines for writing the tests
* If you want to make a mock, stop and ask me.
* Avoid using timed waits like page.waitForTimeout(1000). If there is no other way, you must discuss it with me first and then if I approve, document why it is necessary in a comment.
* Feel free to add test-id attributes to elements in the component under test to make them easier to find. Avoid using css to finding things.
* Feel free to add data-test-id attributes to elements in the component under test to make them easier to find. Avoid using css to finding things.
* Keep the tests well factored with common code going to a test-helpers.ts file.

1 change: 0 additions & 1 deletion .github/prompts/bloom-l10.prompt.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
mode: agent
description: make a string localizable
---

Expand Down
40 changes: 40 additions & 0 deletions .github/prompts/bloom-make-pr-comment-plan.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
description: create a document to help in process large numbers of pr comments
---
1) if I didn't tell you the name of the document, use the askQuestions tool to ask me. Always include the option "append or create pr-comments.md". If there is already a "pr-comments.md", then also offer one with a unique name that we don't have yet, like "pr-comments-2.md". Do this quickly so that I can leave while you work on the rest.
2) Find the pr. Use the gh tool to determine the PR associated with the current branch.
3) Collect up comments that do that have a reply. Do not rely only on native GitHub review threads. Also inspect the PR's reviews and review bodies for Reviewable-imported comments or discussion summaries, because those may not appear in `reviewThreads` even when the review says it contains many unresolved comments. Treat those Reviewable comments as part of the PR feedback you need to process.

4) for each issue, add some lines like this:

----------------------
## Fred Flintstone review 3918647127

### 1. foo should be bar

Link: <https://reviewable.io/reviews/BloomBooks/BloomDesktop/7621#-On-YsWVBDGHZLABoBtc:-On3jl8a-ol2j7BjS4fE:b-nlm6k9>
Relevant code locations: bedrock.ts, line 52.

What they said:
| The foo here should be bar, shouldn't it? <-- verbatim quote. Do not paraphrase.

Evaluation:
Bar would't be bad, and we can make this change cheaply. The complication is that we already have a bar.

Action Proposals:
1. Change foo to baz <-- proposed
2. Change foo to bar2
3. Say that <this user> prefers to stick with foo.

- Proposed Reply: "[model name]: It turns out "bar" is already in use, so I've changed to "baz". <--- do not be chatty, just state what you did (or would do)

User Decision: <-- user will fill this in later
Reply:

- [ ] Reply successfully posted (check off when posted to github or Reviewable):

-------------------

Leave the "decision:" and "reply" lines there for a future step in our process.

When you answer, prefix your response with the name of your model, e.g. [hall9000].
7 changes: 7 additions & 0 deletions .github/prompts/bloom-open-solution-in-VS.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
description: open Visual Studio with the solution of this workspace
model: Claude Haiku 4.5
agent: agent
---

Open "Visual Studio" with the path to "Bloom.sln" in this workspace.
8 changes: 8 additions & 0 deletions .github/prompts/bloom-process-pr-comments.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: read and process comments in a pr
---

Use the gh tool to determine the PR associated with the current branch. If you cannot find one, use the askQuestions tool to ask the user for a url.
Read the unresolved pr comments and either answer them or handle the problem they call out and then answer them.
Do not rely only on native GitHub review threads. Also inspect the PR's reviews and review bodies for Reviewable-imported comments or discussion summaries, because those may not appear in `reviewThreads` even when the review says it contains many unresolved comments. Treat those Reviewable comments as part of the PR feedback you need to process.
When you answer, prefix your response with the name of your model, e.g. [hall9000].
1 change: 1 addition & 0 deletions .github/prompts/bloom-process-pr-feedback.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ description: read and process comments in a pr. Only appropriate to use in the r

Use the gh tool to determine the PR associated with the current branch. If you cannot find one, use the askQuestions tool to ask the user for a url.
Read the unresolved pr comments and either answer them or handle the problem they call out and then answer them.
Do not rely only on native GitHub review threads. Also inspect the PR's reviews and review bodies for Reviewable-imported comments or discussion summaries, because those may not appear in `reviewThreads` even when the review says it contains many unresolved comments. Treat those Reviewable comments as part of the PR feedback you need to process.
When you answer, prefix your response with the name of your model, e.g. [hall9000].
99 changes: 99 additions & 0 deletions .github/skills/bloom-canvas-e2e-testing/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
name: bloom-canvas-e2e-testing
description: build and run automated Playwright end-to-end tests for Canvas Tool behavior on CURRENTPAGE.
---

## Scope
Use this skill when the user wants automated Playwright tests (not manual devtools reproduction) for Canvas Tool behavior.

This skill is for:
- creating and maintaining `bookEdit/canvas-e2e-tests` tests
- verifying drag/drop and canvas interactions with real mouse gestures
- running focused Canvas E2E checks against Bloom Edit Tab

This skill is not for:
- manual-only reproduction (use the manual canvas tool testing skill)
- component-harness tests under `react_components/*/*.uitest.ts`

## Required context
- Bloom is running and serving Edit Tab at `http://localhost:8089/bloom/CURRENTPAGE`
- Current page includes `.bloom-canvas`
- Canvas tool is available in toolbox
- Playwright runtime dependencies are installed in:
- `src/BloomBrowserUI`

## Primary URL
- `http://localhost:8089/bloom/CURRENTPAGE`

## Runtime and command model
Use the `src/BloomBrowserUI` package and run the canvas suite via the root e2e script.

1) Install once (or when deps change):
- `cd src/BloomBrowserUI`
- `yarn install`

2) Run one canvas test:
- `cd src/BloomBrowserUI`
- `yarn e2e canvas specs/01-toolbox-drag-to-canvas.spec.ts`

3) Run the full canvas suite:
- `cd src/BloomBrowserUI`
- `yarn e2e canvas`

## Frame model (critical)
Bloom Edit Tab has multiple iframes. Use frame names first:

- Toolbox frame:
- name: `toolbox`
- URL usually includes `toolboxContent`
- Editable page frame:
- name: `page`
- URL usually includes `page-memsim-...htm`
- Do not treat top `CURRENTPAGE` frame as editable page content.

## Reliable selectors and activation
- Canvas tool tab header: `h3[data-toolid="canvasTool"]`
- Canvas tool root: `#canvasToolControls`
- Canvas surface: `.bloom-canvas`
- Created elements: `.bloom-canvas-element`
- Speech/comic palette item: `img[src*="comic-icon.svg"]`

Before clicking the canvas tool header, first check whether `#canvasToolControls` is already visible.

## Drag/drop requirements
- Use real Playwright mouse gestures (`page.mouse.down/move/up`), not synthetic dispatched drag events.
- Prefer distinct drop points.
- Verify outcomes semantically:
- element count increase (`.bloom-canvas-element`)
- position/rect checks where relevant

## Critical safety rule (Image Toolbox)
- Do **not** run any action that opens the native Image Toolbox window.
- In Canvas context menus/toolbars, never invoke commands that route to `doImageCommand(..., "change")`.
- In practice, do not click:
- `Choose image from your computer...`
- `Change image`
- Do **not** invoke native video capture/file-picker commands either.
- In practice, do not click:
- `Choose Video from your Computer...`
- `Record yourself...`
- If coverage needs those commands, verify command presence/enabled state only (do not invoke).

## Minimal proof recipe
A valid non-trivial proof test should:
1. Open `CURRENTPAGE`
2. Resolve toolbox + page frames
3. Ensure Canvas tool active
4. Drag a palette item onto `.bloom-canvas`
5. Assert `.bloom-canvas-element` count increased

## Troubleshooting
- If test says "No tests found": verify path filter is relative to the config `testDir`.
- If command says `playwright: not found`: run `yarn install` in `src/BloomBrowserUI`.
- If canvas waits time out: confirm you selected the `page` frame, not top frame.
- If canvas tab click times out: check whether Canvas controls are already visible and skip click in that case.


## Pointers
- Avoid time-based waiting; use DOM-based checks when possible. Feel free to add data-test-ids attributes or other hooks in the app code if needed for reliable testing.

39 changes: 39 additions & 0 deletions .github/skills/bloom-canvas-tool-testing/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: bloom-canvas-tool-manual-testing
description: explore, reproduce, and verify Canvas Element behaviors manually via chrome-devtools-mcp, not in a playwright test.
---

## Scope
Use this skill when the user reports a regression involving Canvas Tool interactions (especially drag/drop from the toolbox onto the page) and asks you to reproduce and verify fixes using a browser.

This skill assumes:
- Bloom is running locally and serving the Edit Tab
- The current page has an element with class `.bloom-canvas`
- The current page has the Canvas Tool tab available in the toolbox
- The user has started the vite dev server for the frontend code

## Primary test URL
- `http://localhost:8089/bloom/CURRENTPAGE`

## Reproduction approach (required)
When testing or verifying a UI regression:
- Do not rely only on synthetic JS event dispatch.
- Use browser automation/tools to perform an actual drag/drop gesture.

## Finding things
1. If your task involves the toolbox, identify that the toolbox iframe (often `.../toolboxContent`) and confirm the Canvas Tool tab is selected.
2. The page we are editing is in an iframe (a `page-memsim-...htm`)
3. On the page, you can locate the canvas we are editing as an element with the `.bloom-canvas` class.


## If you are performing drag/drop
1. Perform a drag from the toolbox item onto a distinct point on the page (test with multiple drop points).
2. Verify outcome by measuring:
- The intended drop point (clientX/clientY over the page frame)
- The created element’s bounding rect and/or `style.left/top`
- The delta between drop point and element location
- Test with multiple zoom levels and page scaling to confirm consistent behavior

## Notes
- Bloom’s edit UI uses multiple iframes; coordinate systems (screen/client/page) often differ between frames.
- Page scaling (`transform: scale(...)`) can affect `getBoundingClientRect()` values; prefer consistent coordinate spaces when comparing.
Loading