## Description
Pure renaming, nothing else.
## Code Review
- [ ] hi @TrySound , I need you to do
- conceptual review (architecture, feature-correctness)
- detailed review (read every line)
- test it on preview
## Before requesting a review
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
## Before merging
- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
One less pubsub event replaced with clickCanvas.
Added store for sidebar active panel to manage from commands.
## Steps for reproduction
1. close breakpoints menu by clicking on canvas
2. close sidebar panel by clicking on canvas
Here improved instance selection by using pointerdown and pointerup.
This solves issues with libraries like radix preventing firing mouse
events.
Though there is a problem. Pointer events do not support event.detail to
inform about double clicks. So here I implemented multiple clicks
detection. For this I track time between latest pointerup and next
pointerdown events.
Here I removed "rich-text" type from components. Instead "container" can
be edited when has only text or rich text children.
And any time user can drop into editablle container which will wrap all
text and rich text children into "Span" component.
Had to implement position adjustment to consider text children which do
not have representation in navigator tree and canvas dnd.
Span has temporary SpanContainer name to not conflict with existinig
Span for styled text in rich text. Will rename in other PR when remove
no longer necessary components.
Ref https://github.com/webstudio-is/webstudio-builder/issues/1545
All complex use cases already switched to get meta from arguments and
from atom.
Here migrated the last cases and dropped legacy meta register in
react-sdk package. Now we ready to split components into separate
packages.
## Description
- Canvas behavior should be exactly as in Webflow now - responsive
canvas.
- No constraints for resizing, you can switch to different breakpoints
when you change the canvas width just like in preview
## Not done in this PR
- [ ] breakpoints dropdown menu redesign
- [ ] on-canvas resizable handles
- [ ] flash-animate breakpoints list when breakpoint is switched through
resize
- [ ] flash-animate left and right borders when breakpoint is switched
- [ ] gravity of resize handle dragging when reaching next breakpoint
- [ ] vertical labels with @media example that matches current
breakpoint
- [ ] migrate min-width 0 breakpoints to base?
- [ ] hide outline while changing size
- [ ] ensure there is never both min and max in one media
## Todo
- [x] draggable positioning calc
- [x] shortcuts for zoom
- [x] sync width and selected breakpoint
- [x] remove scale
- [x] fix mobile-first breakpoints
- [x] tabbable toolbar items
- [x] icon for base
- [x] fix flicker
- [x] After breakpoint delete/add CascadeIndicator doesn't refresh
- [x] fix when there is no base, min-width 0 should have still a full
width
## Steps for reproduction
1. click button
3. expect xyz
## Code Review
- [ ] hi @TrySound, @istarkov , I need you to do
- conceptual review (architecture, feature-correctness)
- detailed review (read every line)
- test it on preview
## Before requesting a review
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
## Before merging
- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
The last piece to address instances by selectors
- the mode is represented as text editing instance selector
- reset editing mode along with selection on user input instead of
ssubscribing to selected store
- moved enter/esc shortcuts to shared between builder and canvas
- got rid of legacy subscriptions to stores
Label again started flickering because hovered instance and hovered
outline store changes have delay in between. Solution as before is to
provide all info with outline. Here I just passed both label and
component to get the shape for getInstanceLabel.
Removed react hook from instance hovering and refactored with instance
selectors.
"Click" based implemention had aa few important bugs. Selecting other
instance was not possible when some text was selected in editing mode.
This is consequence of a fix when other instance is selected user select
text and move cursor outside of editor while still selecting.
Here's how all solved. We track both mousedown and mouseup. When their
targets are different we do nothing because this is most likely text
selection or drag'n'drop.
Editing state a little simplified by just looing for closest
contenteditable instead of editing id comparison.
Instance address now computed by traversing dom.