From 2629667647a39d19796d228e4078e9cfa1ac2a7a Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Thu, 15 Feb 2024 17:01:14 +0000 Subject: [PATCH 1/4] make sidebar content slightly wider --- addon/styles/components/es-sidebar.css | 7 ++++++- addon/styles/sidebar-container.css | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addon/styles/components/es-sidebar.css b/addon/styles/components/es-sidebar.css index 4dc5248e..b502fed5 100644 --- a/addon/styles/components/es-sidebar.css +++ b/addon/styles/components/es-sidebar.css @@ -13,7 +13,12 @@ border-right: 2px solid var(--color-gray-300); } -@media (max-width: 844px) { +.es-sidebar { + padding: var(--spacing-4) var(--spacing-2); + background-color: var(--color-gray-200); +} + +@media (width <= 844px) { .es-sidebar-toggle { position: fixed; z-index: 1; diff --git a/addon/styles/sidebar-container.css b/addon/styles/sidebar-container.css index 02af886e..23dd8155 100644 --- a/addon/styles/sidebar-container.css +++ b/addon/styles/sidebar-container.css @@ -1,5 +1,5 @@ :root { - --sidebar-width: 18.5rem; + --sidebar-width: 21rem; } .sidebar-container { From f486b46edc64f42e427d57efc87ea82c46426704 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Thu, 15 Feb 2024 17:09:17 +0000 Subject: [PATCH 2/4] fix sidebar style test --- tests/integration/components/es-sidebar-test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/components/es-sidebar-test.js b/tests/integration/components/es-sidebar-test.js index 0d5932ed..741ba3e6 100644 --- a/tests/integration/components/es-sidebar-test.js +++ b/tests/integration/components/es-sidebar-test.js @@ -36,7 +36,7 @@ module('Integration | Component | es-sidebar', function (hooks) { `); assert.dom('.sidebar-container .es-sidebar').hasStyle({ - width: '296px', + width: '300px', }); await render(hbs` @@ -47,10 +47,10 @@ module('Integration | Component | es-sidebar', function (hooks) { `); assert.dom('[data-test-content-left]').hasStyle({ - width: '644px', + width: '604px', }); assert.dom('.sidebar-container .es-sidebar').hasStyle({ - width: '296px', + width: '300px', margin: '0px', }); @@ -62,11 +62,11 @@ module('Integration | Component | es-sidebar', function (hooks) { `); assert.dom('.sidebar-container .es-sidebar').hasStyle({ - width: '296px', + width: '300px', margin: '0px', }); assert.dom('[data-test-content-right]').hasStyle({ - width: '644px', + width: '604px', }); }); }); From 762b61ba0374b92ea8fb70310fbb2b58632fd007 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Thu, 22 Feb 2024 16:36:33 +0000 Subject: [PATCH 3/4] add consistent padding for sidebar container --- addon/styles/components/es-sidebar.css | 1 - addon/styles/sidebar-container.css | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addon/styles/components/es-sidebar.css b/addon/styles/components/es-sidebar.css index b502fed5..0911bc1f 100644 --- a/addon/styles/components/es-sidebar.css +++ b/addon/styles/components/es-sidebar.css @@ -14,7 +14,6 @@ } .es-sidebar { - padding: var(--spacing-4) var(--spacing-2); background-color: var(--color-gray-200); } diff --git a/addon/styles/sidebar-container.css b/addon/styles/sidebar-container.css index 23dd8155..c5f12d4a 100644 --- a/addon/styles/sidebar-container.css +++ b/addon/styles/sidebar-container.css @@ -11,6 +11,10 @@ padding: var(--spacing-6) var(--grid-margin); } +.sidebar-container > *:not(.es-sidebar-toggle) { + padding: var(--spacing-4) var(--spacing-2); +} + .sidebar-container > *:not(.es-sidebar):not(.es-sidebar-toggle) { grid-column: 1 / span 2; } From abeaf35ed56af0e11aaddc8a770620864d6844d3 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Thu, 22 Feb 2024 16:42:33 +0000 Subject: [PATCH 4/4] delete test that is covered by percy --- .../integration/components/es-sidebar-test.js | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/tests/integration/components/es-sidebar-test.js b/tests/integration/components/es-sidebar-test.js index 741ba3e6..59812cda 100644 --- a/tests/integration/components/es-sidebar-test.js +++ b/tests/integration/components/es-sidebar-test.js @@ -27,46 +27,4 @@ module('Integration | Component | es-sidebar', function (hooks) { await click('.es-sidebar-close'); assert.dom('.es-sidebar').hasAttribute('aria-expanded', 'false'); }); - - test('it has the correct styles when in a .sidebar-container', async function (assert) { - await render(hbs` - - `); - - assert.dom('.sidebar-container .es-sidebar').hasStyle({ - width: '300px', - }); - - await render(hbs` - - `); - - assert.dom('[data-test-content-left]').hasStyle({ - width: '604px', - }); - assert.dom('.sidebar-container .es-sidebar').hasStyle({ - width: '300px', - margin: '0px', - }); - - await render(hbs` - - `); - - assert.dom('.sidebar-container .es-sidebar').hasStyle({ - width: '300px', - margin: '0px', - }); - assert.dom('[data-test-content-right]').hasStyle({ - width: '604px', - }); - }); });