verbb / vizy

A flexible visual editor for Craft CMS
Other
43 stars 8 forks source link

When reordering with disabled blocks, block shows wrong status. #146

Closed mattbloomfield closed 1 year ago

mattbloomfield commented 2 years ago

Description

Imagine a scenario where you've added 4 blocks. We'll call them block 1, 2, 3, & 4.

Currently, these blocks are effectively in slots in the vizy. We'll call them slot A, B, C, and D.

Now, disable block 3. Save.

You should now have this:

Slot Block Status Layout
A 1 Enabled Expanded
B 2 Enabled Expanded
C 3 Disabled Collapsed
D 4 Enabled Expanded

Drag block 2 below block 3.

You would expect to get this:

Slot Block Status Layout
A 1 Enabled Expanded
B 3 Disabled Collapsed
C 2 Enabled Expanded
D 4 Enabled Expanded

But instead, you will get this:

Slot Block Status Layout
A 1 Enabled Expanded
B 3 Enabled Collapsed
C 2 Disabled Expanded
D 4 Enabled Expanded

Now, save. You'll now get:

Slot Block Status Layout
A 1 Enabled Expanded
B 3 Disabled Collapsed
C 2 Enabled Expanded
D 4 Enabled Expanded

Additional info

Additional context

engram-design commented 2 years ago

I'll look into what we can do here, but almost sure this is an issue due to Vue 2/Tiptap and how views and re-used, which I do have some handling for, but in Vue 3 (Vizy 2) it shouldn't be an issue.

Regardless, will look into this in case it's something different.

engram-design commented 1 year ago

Fixed in 2.1.0