From 43ad5ca083c1761c94d1e32890b43cf37a862afd Mon Sep 17 00:00:00 2001 From: soupette Date: Thu, 23 Sep 2021 07:44:09 +0200 Subject: [PATCH] Fix pageSize compo Signed-off-by: soupette --- .../tests/__snapshots__/index.test.js.snap | 335 ++++++++++-------- .../pages/Users/ListPage/tests/index.test.js | 312 +++++++++------- .../components/FilterPopoverURLQuery/index.js | 4 +- .../src/components/PageSizeURLQuery/index.js | 23 +- .../PageSizeURLQuery/tests/index.test.js | 124 ++++--- .../App/components/tests/ListView.test.js | 253 +++++++------ 6 files changed, 617 insertions(+), 434 deletions(-) diff --git a/packages/core/admin/admin/src/pages/SettingsPage/pages/Users/ListPage/PaginationFooter/tests/__snapshots__/index.test.js.snap b/packages/core/admin/admin/src/pages/SettingsPage/pages/Users/ListPage/PaginationFooter/tests/__snapshots__/index.test.js.snap index 70c85dab0c..ad84b467ed 100644 --- a/packages/core/admin/admin/src/pages/SettingsPage/pages/Users/ListPage/PaginationFooter/tests/__snapshots__/index.test.js.snap +++ b/packages/core/admin/admin/src/pages/SettingsPage/pages/Users/ListPage/PaginationFooter/tests/__snapshots__/index.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DynamicTable renders and matches the snapshot 1`] = ` -.c24 { +.c28 { border: 0; -webkit-clip: rect(0 0 0 0); clip: rect(0 0 0 0); @@ -13,21 +13,14 @@ exports[`DynamicTable renders and matches the snapshot 1`] = ` width: 1px; } -.c4 { +.c23 { font-weight: 500; font-size: 0.75rem; line-height: 1.33; color: #32324d; } -.c10 { - font-weight: 400; - font-size: 0.875rem; - line-height: 1.43; - color: #32324d; -} - -.c22 { +.c26 { font-weight: 400; font-size: 0.75rem; line-height: 1.33; @@ -38,15 +31,6 @@ exports[`DynamicTable renders and matches the snapshot 1`] = ` padding-top: 24px; } -.c9 { - padding-right: 16px; - padding-left: 16px; -} - -.c11 { - padding-left: 12px; -} - .c1 { display: -webkit-box; display: -webkit-flex; @@ -65,6 +49,111 @@ exports[`DynamicTable renders and matches the snapshot 1`] = ` align-items: flex-end; } +.c16 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.c20 { + border: 0; + -webkit-clip: rect(0 0 0 0); + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +.c17 > * + * { + margin-left: 4px; +} + +.c24 { + line-height: revert; +} + +.c18 { + padding: 12px; + border-radius: 4px; + -webkit-text-decoration: none; + text-decoration: none; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} + +.c21 { + padding: 12px; + border-radius: 4px; + box-shadow: 0px 1px 4px rgba(33,33,52,0.1); + -webkit-text-decoration: none; + text-decoration: none; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} + +.c22 { + color: #271fe0; + background: #ffffff; +} + +.c22:hover { + box-shadow: 0px 1px 4px rgba(33,33,52,0.1); +} + +.c25 { + color: #32324d; +} + +.c25:hover { + box-shadow: 0px 1px 4px rgba(33,33,52,0.1); +} + +.c19 { + font-size: 0.7rem; + pointer-events: none; +} + +.c19 svg path { + fill: #c0c0cf; +} + +.c19:focus svg path, +.c19:hover svg path { + fill: #c0c0cf; +} + +.c27 { + font-size: 0.7rem; +} + +.c27 svg path { + fill: #666687; +} + +.c27:focus svg path, +.c27:hover svg path { + fill: #4a4a6a; +} + +.c14 { + padding-left: 8px; +} + .c2 { display: -webkit-box; display: -webkit-flex; @@ -79,7 +168,38 @@ exports[`DynamicTable renders and matches the snapshot 1`] = ` align-items: center; } -.c7 { +.c5 { + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; + width: 100%; + background: transparent; + border: none; +} + +.c5:focus { + outline: none; +} + +.c10 { + font-weight: 400; + font-size: 0.875rem; + line-height: 1.43; + color: #32324d; +} + +.c9 { + padding-right: 16px; + padding-left: 16px; +} + +.c11 { + padding-left: 12px; +} + +.c6 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -97,16 +217,18 @@ exports[`DynamicTable renders and matches the snapshot 1`] = ` align-items: center; } -.c17 { - border: 0; - -webkit-clip: rect(0 0 0 0); - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; +.c8 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; } .c3 { @@ -125,10 +247,10 @@ exports[`DynamicTable renders and matches the snapshot 1`] = ` } .c3 > * + * { - margin-top: 4px; + margin-top: 0px; } -.c5 { +.c4 { position: relative; border: 1px solid #dcdce4; padding-right: 12px; @@ -137,7 +259,7 @@ exports[`DynamicTable renders and matches the snapshot 1`] = ` overflow: hidden; } -.c5:focus-within { +.c4:focus-within { border: 1px solid #4945ff; } @@ -170,98 +292,15 @@ exports[`DynamicTable renders and matches the snapshot 1`] = ` width: 0.375rem; } -.c14 > * + * { - margin-left: 4px; -} - -.c20 { - line-height: revert; +.c7 { + min-height: 2.5rem; } .c15 { - padding: 12px; - border-radius: 4px; - -webkit-text-decoration: none; - text-decoration: none; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; -} - -.c18 { - padding: 12px; - border-radius: 4px; - box-shadow: 0px 1px 4px rgba(33,33,52,0.1); - -webkit-text-decoration: none; - text-decoration: none; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; -} - -.c19 { - color: #271fe0; - background: #ffffff; -} - -.c19:hover { - box-shadow: 0px 1px 4px rgba(33,33,52,0.1); -} - -.c21 { - color: #32324d; -} - -.c21:hover { - box-shadow: 0px 1px 4px rgba(33,33,52,0.1); -} - -.c16 { - font-size: 0.7rem; - pointer-events: none; -} - -.c16 svg path { - fill: #c0c0cf; -} - -.c16:focus svg path, -.c16:hover svg path { - fill: #c0c0cf; -} - -.c23 { - font-size: 0.7rem; -} - -.c23 svg path { - fill: #666687; -} - -.c23:focus svg path, -.c23:hover svg path { - fill: #4a4a6a; -} - -.c6 { - position: absolute; - left: 0; - right: 0; - bottom: 0; - top: 0; - width: 100%; - background: transparent; - border: none; -} - -.c6:focus { - outline: none; -} - -.c8 { - min-height: 2.5rem; + font-weight: 400; + font-size: 0.875rem; + line-height: 1.43; + color: #666687; }
@@ -278,30 +317,24 @@ exports[`DynamicTable renders and matches the snapshot 1`] = `
- - Entries per page -
+
+ +