Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): edge case where entity isn't visible until interacting with canvas #7099

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

psychedelicious
Copy link
Collaborator

@psychedelicious psychedelicious commented Oct 11, 2024

Summary

To trigger the edge case:

  • Have an empty layer and non-empty layer
  • Select the non-empty layer
  • Refresh the page
  • Select to the empty layer without doing any other action
  • You may be unable to draw on the layer
  • Zoom in/out slightly
  • You can now draw on it

The problem was not syncing visibility when a layer is selected, leaving the layer hidden. This indirectly disabled interactions.

The fix is to listen for changes to the layer's selected status and sync visibility when that changes.

Also extracted common layer intersection logic to a method.

Related Issues / Discussions

n/a

QA Instructions

n/a

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)

@github-actions github-actions bot added the frontend PRs that change frontend files label Oct 11, 2024
…canvas

To trigger the edge case:
- Have an empty layer and non-empty layer
- Select the non-empty layer
- Refresh the page
- Select to the empty layer without doing any other action
- You may be unable to draw on the layer
- Zoom in/out slightly
- You can now draw on it

The problem was not syncing visibility when a layer is selected, leaving the layer hidden. This indirectly disabled interactions.

The fix is to listen for changes to the layer's selected status and sync visibility when that changes.
@psychedelicious psychedelicious force-pushed the psyche/fix/ui/visibility-edge-case branch from cae59fe to 888a124 Compare October 11, 2024 05:22
@hipsterusername hipsterusername merged commit 56f0845 into main Oct 11, 2024
14 checks passed
@hipsterusername hipsterusername deleted the psyche/fix/ui/visibility-edge-case branch October 11, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants