Commit Graph

12 Commits

Author SHA1 Message Date
Mateus S. Pereira
7219800183 fix: workspace shifts when deleting a block (#8666)
* fix: workspace shifts when deleting a block

* fix: awaiting for block rerender

* fix: create reusable method to prevent marking method as async
2024-12-04 09:25:01 -08:00
Christopher Allen
7ccdcc5cef refactor(events): introduce EventType enum in separate module (#8530)
* refactor(events): Use "export ... from" where applicable

* refactor(events): Introduce EventType enum

  Introduce an enum for the event .type values.  We can't actually
  use it as the type of the .type property on Abstract events,
  because we want to allow developers to add their own custom
  event types inheriting from this type, but at least this way we
  can be reasonably sure that all of our own event subclasses have
  distinct .type values—plus consistent use of enum syntax
  (EventType.TYPE_NAME) is probably good for readability overall.

  Put it in a separate module from the rest of events/utils.ts
  because it would be helpful if event utils could use

      event instanceof SomeEventType

  for type narrowing but but at the moment most events are in
  modules that depend on events/utils.ts for their .type
  constant, and although circular ESM dependencies should work
  in principle there are various restrictions and this
  particular circularity causes issues at the moment.

  A few of the event classes also depend on utils.ts for fire()
  or other functions, which will be harder to deal with, but at
  least this commit is win in terms of reducing the complexity
  of our dependencies, making most of the Abstract event subclass
  module dependent on type.ts, which has no imports, rather than
  on utils.ts which has multiple imports.
2024-08-20 08:36:33 +01:00
Christopher Allen
ce22f42868 chore: Organise imports (#8527)
* chore(deps): Add pretter-plugin-organize-imports

* chore: Remove insignificant blank lines in import sections

  Since prettier-plugin-organize-imports sorts imports within
  sections separated by blank lines, but preserves the section
  divisions, remove any blank lines that are not dividing imports
  into meaningful sections.

  Do not remove blank lines separating side-effect-only imports
  from main imports.

* chore: Remove unneded eslint-disable directives

* chore: Organise imports
2024-08-15 03:16:14 +01:00
ℍ𝕠𝕝𝕝𝕠𝕨 𝕄𝕒𝕟
504de6a98c fix: drag strategy only clear group id set by us (#8355)
Add a condition check so that we don't unset
the group ID that is not set by us. Otherwise the
multi-select plugin undo/redo will be broken (apply
individually instead of all together)

Signed-off-by: Hollow Man <hollowman@opensuse.org>
2024-07-25 22:09:10 +01:00
Beka Westberg
dc91c3ab54 fix: c-blocks disappearing (#8203) 2024-06-11 11:21:48 -07:00
Beka Westberg
6e4ba00be5 fix: dragging and disposing of shadows (#8172)
* Revert "fix: dragging blocks by shadows to delete (#8138)"

This reverts commit 3fd749205f.

* fix: dragging shadows
2024-05-28 10:28:16 -07:00
Beka Westberg
3fd749205f fix: dragging blocks by shadows to delete (#8138)
* Revert "fix: dragging shadow blocks (#7992)"

This reverts commit c0e6e6745f.

* fix: dragging by shadow not being deletable

* fix: unselecting shadows

* fix: revert changes to select and unselect
2024-05-17 13:22:53 -07:00
Beka Westberg
3e1e9b5ddc fix: blocks not being returned to the correct layer if their drag is reverted with no parent (#7998)
* fix: blocks not being returned to the correct drag layer if their drag is reverted with no parent

* fix: delete test code
2024-04-08 09:44:31 -07:00
Beka Westberg
c0e6e6745f fix: dragging shadow blocks (#7992)
* fix: dragging shadow blocks

* fix: dragging shadows not reverting them to their original position

* fix: shadow parents not being deselected
2024-04-04 18:30:41 +00:00
Beka Westberg
ed403d0b77 feat!: change gestures to look at selected when dragging (#7991)
* feat: change gestures to look at selected when dragging

* chore: fix tests

* chore: format

* chore: PR comments
2024-04-04 08:52:43 -07:00
Beka Westberg
75fc4704da feat: have block use drag strategy (#7971) 2024-03-28 17:15:36 -07:00
Beka Westberg
8b6e9d8cad feat: add block drag strategy (#7970)
* feat: add the block drag strategy

* chore: remove underscores

* chore: make crazy condition clearer?

* chore: rename var
2024-03-28 16:05:04 -07:00