Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
84 changes: 50 additions & 34 deletions modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,40 +41,40 @@
/>
</template>
</div>
<div class="apos-areas-widgets-list">
<TransitionGroup name="apos-widget-list" tag="div">

Check warning on line 44 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

'tag' should be on a new line

Check warning on line 44 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

'tag' should be on a new line

Check warning on line 44 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

'tag' should be on a new line

Check warning on line 44 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

'tag' should be on a new line

Check warning on line 44 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

'tag' should be on a new line

Check warning on line 44 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

'tag' should be on a new line

Check warning on line 44 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

'tag' should be on a new line

Check warning on line 44 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

'tag' should be on a new line

Check warning on line 44 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

'tag' should be on a new line
<AposAreaWidget
v-for="(widget, i) in next"
:key="widget._id"
:area-id="areaId"
:widget="widget"
:meta="meta[widget._id]"
:generation="generation"
:i="i"
:options="options"
:next="next"
:following-values="followingValues"
:doc-id="docId"
:context-menu-options="contextMenuOptions"
:field-id="fieldId"
:field="field"
:disabled="field && field.readOnly"
:widget-hovered="hoveredWidget"
:non-foreign-widget-hovered="hoveredNonForeignWidget"
:widget-focused="focusedWidget"
:max-reached="maxReached"
:rendering="rendering(widget)"
@up="up"
@down="down"
@remove="remove"
@cut="cut"
@copy="copy"
@edit="edit"
@clone="clone"
@update="update"
@add="add"
@paste="paste"
/>
</div>
v-for="(widget, i) in next"

Check warning on line 46 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 46 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 46 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 46 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 46 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 46 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 46 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 46 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 46 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected indentation of 8 spaces but found 10 spaces
:key="widget._id"

Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected indentation of 8 spaces but found 10 spaces
:area-id="areaId"

Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected indentation of 8 spaces but found 10 spaces
:widget="widget"

Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected indentation of 8 spaces but found 10 spaces
:meta="meta[widget._id]"

Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected indentation of 8 spaces but found 10 spaces
:generation="generation"

Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected indentation of 8 spaces but found 10 spaces
:i="i"

Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected indentation of 8 spaces but found 10 spaces
:options="options"

Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected indentation of 8 spaces but found 10 spaces
:next="next"

Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (22, 6)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 8)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (18, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 7)

Expected indentation of 8 spaces but found 10 spaces

Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue

View workflow job for this annotation

GitHub Actions / build (20, 6)

Expected indentation of 8 spaces but found 10 spaces
:following-values="followingValues"
:doc-id="docId"
:context-menu-options="contextMenuOptions"
:field-id="fieldId"
:field="field"
:disabled="field && field.readOnly"
:widget-hovered="hoveredWidget"
:non-foreign-widget-hovered="hoveredNonForeignWidget"
:widget-focused="focusedWidget"
:max-reached="maxReached"
:rendering="rendering(widget)"
@up="up"
@down="down"
@remove="remove"
@cut="cut"
@copy="copy"
@edit="edit"
@clone="clone"
@update="update"
@add="add"
@paste="paste"
/>
</TransitionGroup>
</div>
</template>

Expand Down Expand Up @@ -337,7 +337,7 @@
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 +816,20 @@
}
}
.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>