From b441d88c29e4492a544c8037f410f649bb590e10 Mon Sep 17 00:00:00 2001 From: Michaela Robosova Date: Tue, 15 Oct 2024 12:35:27 +0200 Subject: [PATCH] Implement the default loading skeletons count --- docs/pages/kcard.vue | 8 -------- docs/pages/kcardgrid.vue | 20 +++++++------------- lib/cards/useGridLoading.js | 10 ++++++---- 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/docs/pages/kcard.vue b/docs/pages/kcard.vue index c5f6d75b1..fdf1b514a 100644 --- a/docs/pages/kcard.vue +++ b/docs/pages/kcard.vue @@ -744,7 +744,6 @@ skeletonsConfig1: [ { breakpoints: [0, 1, 2, 3, 4, 5, 6, 7], - count: 1, orientation: 'vertical', thumbnailDisplay: 'large', height: '490px', @@ -763,7 +762,6 @@ skeletonsConfig2: [ { breakpoints: [0, 1, 2, 3, 4, 5, 6, 7], - count: 3, orientation: 'vertical', thumbnailDisplay: 'large', height: '490px', @@ -776,7 +774,6 @@ skeletonsConfig3: [ { breakpoints: [0, 1, 2, 3, 4, 5, 6, 7], - count: 2, orientation: 'horizontal', thumbnailDisplay: 'large', thumbnailAlign: 'left', @@ -790,7 +787,6 @@ skeletonsConfig4: [ { breakpoints: [0, 1, 2, 3, 4, 5, 6, 7], - count: 3, height: '290px', }, { @@ -801,7 +797,6 @@ skeletonsConfig5: [ { breakpoints: [0, 1, 2, 3, 4, 5, 6, 7], - count: 1, orientation: 'horizontal', thumbnailDisplay: 'large', thumbnailAlign: 'left', @@ -815,7 +810,6 @@ skeletonsConfig6: [ { breakpoints: [0, 1, 2, 3, 4, 5, 6, 7], - count: 1, orientation: 'vertical', thumbnailDisplay: 'large', height: '460px', @@ -834,7 +828,6 @@ skeletonsConfig7: [ { breakpoints: [0, 1, 2, 3, 4, 5, 6, 7], - count: 1, orientation: 'vertical', thumbnailDisplay: 'large', height: '460px', @@ -853,7 +846,6 @@ skeletonsConfig8: [ { breakpoints: [0, 1, 2, 3, 4, 5, 6, 7], - count: 2, orientation: 'vertical', thumbnailDisplay: 'large', height: '400px', diff --git a/docs/pages/kcardgrid.vue b/docs/pages/kcardgrid.vue index e809baec6..8ea282b15 100644 --- a/docs/pages/kcardgrid.vue +++ b/docs/pages/kcardgrid.vue @@ -602,6 +602,10 @@

Use the buttons in the example below to preview.

+

Number of loading skeletons

+ +

By default, the number of loading skeletons corresponds to the number of cards in a single grid row if it were full. This behavior can be overridden via the count attribute (below), however do not override it unless indicated in the designs.

+

Loading skeletons configuration

Use the skeletonsConfig prop to configure skeleton cards to match the expected visual output of loaded cards on all screen sizes. Preview the layout and height of cards with loaded data and adjust skeletonsConfig accordingly.

@@ -610,8 +614,8 @@