Skip to content

fix(frontend): toggle hide-region class on main canvas#5160

Open
bobbai00 wants to merge 1 commit into
apache:mainfrom
bobbai00:fix/5120-region-canvas-toggle
Open

fix(frontend): toggle hide-region class on main canvas#5160
bobbai00 wants to merge 1 commit into
apache:mainfrom
bobbai00:fix/5120-region-canvas-toggle

Conversation

@bobbai00
Copy link
Copy Markdown
Contributor

@bobbai00 bobbai00 commented May 22, 2026

What changes were proposed in this PR?

Makes toggleRegion() in menu.component.ts toggle the hide-region CSS class on the main paper element, in addition to the existing body/visibility attribute flip. Follows the same pattern as the neighbouring toggleNumWorkers() / toggleStatus() toggles.

The main editor permanently carries hide-region, whose SCSS rule display: nones every .region child, so the existing body/visibility attribute change had no effect on the main canvas — only on the mini-map (which doesn't carry the class). With this change, the class is added/removed in sync with showRegion, and the existing attribute flip continues to drive the mini-map.

Any related issues, documentation, discussions?

Closes #5120

Regression from #4495.

How was this PR tested?

Not manually browser-tested by the author yet — would appreciate a reviewer running the repro from #5120:

  1. Open a workflow with at least two connected operators.
  2. Run it so the backend emits region updates.
  3. Toggle View → Regions on — hulls should now appear on the main canvas (previous behaviour: only on the mini-map).
  4. Toggle off — hulls should disappear on both surfaces.

No unit tests added: toggleRegion() mutates DOM/JointJS state and the surrounding toggles (toggleNumWorkers, toggleStatus) are similarly untested.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Opus 4.7 (1M context)

@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI labels May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Region layer renders on mini-map but not on main workflow canvas

1 participant