-
Notifications
You must be signed in to change notification settings - Fork 615
Fix widget paste index, add widget render transitions #4984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
23d3626
4e913cf
9eee001
8497f0b
c2c96ce
96a9ffc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
|
||
| <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
|
||
| :key="widget._id" | ||
|
Check warning on line 47 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
|
||
| :area-id="areaId" | ||
|
Check warning on line 48 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
|
||
| :widget="widget" | ||
|
Check warning on line 49 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
|
||
| :meta="meta[widget._id]" | ||
|
Check warning on line 50 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
|
||
| :generation="generation" | ||
|
Check warning on line 51 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
|
||
| :i="i" | ||
|
Check warning on line 52 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
|
||
| :options="options" | ||
|
Check warning on line 53 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
|
||
| :next="next" | ||
|
Check warning on line 54 in modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue
|
||
| :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> | ||
|
|
||
|
|
@@ -337,7 +337,7 @@ | |
| return; | ||
| } | ||
| this.paste(Math.max(this.focusedWidgetIndex, 0)); | ||
| this.paste(Math.max(this.focusedWidgetIndex + 1, 0)); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 ( | ||
|
|
@@ -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> | ||
Uh oh!
There was an error while loading. Please reload this page.