Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

### Fixes

* Pasting a widget now pastes it after the focused widget, instead of before.
* Add missing Pages manager shortcuts list helper.
* Improve the `isEmpty` method of the rich text widget to take into account the HTML blocks (`<figure>` and `<table>`) that are not empty but do not contain any plain text.

Expand Down
25 changes: 22 additions & 3 deletions modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
/>
</template>
</div>
<div class="apos-areas-widgets-list">
<TransitionGroup
name="apos-widget-list"
tag="div"
>
<AposAreaWidget
v-for="(widget, i) in next"
:key="widget._id"
Expand Down Expand Up @@ -74,7 +77,7 @@
@add="add"
@paste="paste"
/>
</div>
</TransitionGroup>
</div>
</template>

Expand Down Expand Up @@ -337,7 +340,7 @@ export default {
return;
}

this.paste(Math.max(this.focusedWidgetIndex, 0));
this.paste(Math.max(this.focusedWidgetIndex + 1, 0));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before we can merge this I need to update the cypress tests

},
handleRemove() {
if (
Expand Down Expand Up @@ -816,4 +819,20 @@ function cancelRefresh(refreshOptions) {
}
}

.apos-widget-list-enter-active,
.apos-widget-list-leave-active {
@include apos-transition($duration:0.3s);

& {
transform: scale(1);
opacity: 1;
}
}

.apos-widget-list-enter-from,
.apos-widget-list-leave-to {
opacity: 0;
transform: scale(0.96);
}

</style>