New attempt to fix layout issued on Masonry view modes.

This commit is contained in:
mateuswetah 2024-10-30 14:05:07 -03:00
parent c7f6474074
commit fba3693337
6 changed files with 12 additions and 13 deletions

View File

@ -10,10 +10,6 @@
#metadata-checkbox-list {
margin: 8px 12px 18px 12px; }
#metadata-checkbox-list .components-base-control__help {
margin-left: 33px;
font-size: 0.75rem;
color: var(--tainacan-block-gray4, #505253); }
.wp-block-tainacan-item-submission-form {
margin: 2em auto; }

File diff suppressed because one or more lines are too long

View File

@ -124,7 +124,7 @@ export default {
},
immediate: true
},
isFiltersMenuCompressed: {
filtersModalStateHasChanged: {
handler() {
if (this.masonry !== false)
this.masonry.layout();

View File

@ -177,7 +177,7 @@ export default {
},
immediate: true
},
isFiltersMenuCompressed: {
filtersModalStateHasChanged: {
handler() {
if (this.masonry !== false)
this.masonry.layout();

View File

@ -18,9 +18,9 @@ export const viewModesMixin = {
},
isLoading: false,
totalItems: Number,
isFiltersMenuCompressed: Boolean,
enabledViewModes: Array,
containerId: String
containerId: String,
filtersModalStateHasChanged: false
},
computed: {
queries() {

View File

@ -454,7 +454,7 @@
v-else
id="filters-modal"
ref="filters-modal"
v-model="isFiltersModalActive"
v-model="isFiltersModalActive"
role="region"
:width="736"
:auto-focus="filtersAsModal"
@ -462,7 +462,9 @@
full-screen
:custom-class="'tainacan-modal tainacan-form filters-menu' + (filtersAsModal ? ' filters-menu-modal' : '') + (displayFiltersHorizontally ? ' horizontal-filters' : '')"
:can-cancel="hideHideFiltersButton || !filtersAsModal ? ['x', 'outside'] : ['x', 'escape', 'outside']"
:close-button-aria-label="$i18n.get('close')">
:close-button-aria-label="$i18n.get('close')"
@after-leave="filtersModalStateHasChanged = !filtersModalStateHasChanged"
@after-enter="filtersModalStateHasChanged = !filtersModalStateHasChanged">
<!-- JS-side hook for extra form content -->
<div
@ -646,7 +648,7 @@
:displayed-metadata="displayedMetadata"
:should-hide-items-thumbnail="hideItemsThumbnail"
:items="items"
:is-filters-menu-compressed="!hideFilters && !isFiltersModalActive"
:filters-modal-state-has-changed="filtersModalStateHasChanged"
:total-items="totalItems"
:is-loading="showLoading"
:enabled-view-modes="enabledViewModes"
@ -815,7 +817,8 @@
itemsListBottomIntersectionObserver: null,
latestPerPageAfterViewModeWithoutPagination: 12,
latestPageAfterViewModeWithoutPagination: 1,
hooks: {}
hooks: {},
filtersModalStateHasChanged: false
}
},
computed: {