From 58744387054379d5b4a3e26666708f841ab1ac76 Mon Sep 17 00:00:00 2001 From: dharini Date: Fri, 15 Oct 2021 12:08:34 -0700 Subject: [PATCH 01/23] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20sessions=20toolbar?= =?UTF-8?q?=20implement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/actions/en-us.yaml | 2 ++ .../addon/components/rose/toolbar/index.hbs | 6 +++++ .../addon/components/rose/toolbar/index.js | 8 ++++++ .../components/rose/toolbar/index.stories.mdx | 27 +++++++++++++++++++ .../addon/styles/rose/components/_index.scss | 1 + .../rose/components/toolbar/_index.scss | 9 +++++++ .../rose/components/toolbar/_toolbar.scss | 0 addons/rose/app/components/rose/toolbar.js | 1 + .../components/rose/toolbar-test.js | 21 +++++++++++++++ .../scopes/scope/sessions/index.js | 13 +++++++++ .../templates/scopes/scope/sessions/index.hbs | 20 ++++++++++++++ 11 files changed, 108 insertions(+) create mode 100644 addons/rose/addon/components/rose/toolbar/index.hbs create mode 100644 addons/rose/addon/components/rose/toolbar/index.js create mode 100644 addons/rose/addon/components/rose/toolbar/index.stories.mdx create mode 100644 addons/rose/addon/styles/rose/components/toolbar/_index.scss create mode 100644 addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss create mode 100644 addons/rose/app/components/rose/toolbar.js create mode 100644 addons/rose/tests/integration/components/rose/toolbar-test.js create mode 100644 ui/admin/app/controllers/scopes/scope/sessions/index.js diff --git a/addons/core/translations/actions/en-us.yaml b/addons/core/translations/actions/en-us.yaml index 144ced636..49cd11a23 100644 --- a/addons/core/translations/actions/en-us.yaml +++ b/addons/core/translations/actions/en-us.yaml @@ -35,3 +35,5 @@ close: Close toggle-secret: Toggle secret visibility minimize: Minimize fullscreen: Fullscreen +filter: + status: status diff --git a/addons/rose/addon/components/rose/toolbar/index.hbs b/addons/rose/addon/components/rose/toolbar/index.hbs new file mode 100644 index 000000000..5f9a6388a --- /dev/null +++ b/addons/rose/addon/components/rose/toolbar/index.hbs @@ -0,0 +1,6 @@ +
+ {{yield (hash + search=(component "rose/anonymous") + filter=(component "rose/anonymous" class="rose-toolbar-search") + )}} +
\ No newline at end of file diff --git a/addons/rose/addon/components/rose/toolbar/index.js b/addons/rose/addon/components/rose/toolbar/index.js new file mode 100644 index 000000000..1ae2378ca --- /dev/null +++ b/addons/rose/addon/components/rose/toolbar/index.js @@ -0,0 +1,8 @@ +import Component from '@glimmer/component'; +import { generateComponentID } from '../../../utilities/component-auto-id'; + +export default class RoseToolbarComponent extends Component { + // =attributes + + id = generateComponentID(); +} diff --git a/addons/rose/addon/components/rose/toolbar/index.stories.mdx b/addons/rose/addon/components/rose/toolbar/index.stories.mdx new file mode 100644 index 000000000..042a7a96c --- /dev/null +++ b/addons/rose/addon/components/rose/toolbar/index.stories.mdx @@ -0,0 +1,27 @@ +import { Meta, Story, Preview } from '@storybook/addon-docs/blocks'; +import { hbs } from 'ember-cli-htmlbars'; +import { action } from '@storybook/addon-actions'; + + + +# Toolbar + +A toolbar component that allows two distinct sections to be configured: search, filter + +```htmlbars + + + + +``` + + + {{ + template: hbs` + + Search + Filter + + `, + }} + \ No newline at end of file diff --git a/addons/rose/addon/styles/rose/components/_index.scss b/addons/rose/addon/styles/rose/components/_index.scss index dd936e77a..f8161a2c6 100644 --- a/addons/rose/addon/styles/rose/components/_index.scss +++ b/addons/rose/addon/styles/rose/components/_index.scss @@ -18,3 +18,4 @@ @import 'message'; @import 'link-button'; @import 'badge'; +@import 'toolbar'; diff --git a/addons/rose/addon/styles/rose/components/toolbar/_index.scss b/addons/rose/addon/styles/rose/components/toolbar/_index.scss new file mode 100644 index 000000000..d75d0bd61 --- /dev/null +++ b/addons/rose/addon/styles/rose/components/toolbar/_index.scss @@ -0,0 +1,9 @@ +.rose-toolbar { + background-color: #fbfbfc; + .rose-form { + display: flex; + } + .rose-dropdown { + margin-left: auto; + } +} diff --git a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss new file mode 100644 index 000000000..e69de29bb diff --git a/addons/rose/app/components/rose/toolbar.js b/addons/rose/app/components/rose/toolbar.js new file mode 100644 index 000000000..bfd066fe9 --- /dev/null +++ b/addons/rose/app/components/rose/toolbar.js @@ -0,0 +1 @@ +export { default } from 'rose/components/rose/toolbar'; diff --git a/addons/rose/tests/integration/components/rose/toolbar-test.js b/addons/rose/tests/integration/components/rose/toolbar-test.js new file mode 100644 index 000000000..dbdd09da2 --- /dev/null +++ b/addons/rose/tests/integration/components/rose/toolbar-test.js @@ -0,0 +1,21 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render, find } from '@ember/test-helpers'; +import hbs from 'htmlbars-inline-precompile'; + +module('Integration | Component | rose/toolbar', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + await render(hbs``); + assert.ok(find('div')); + assert.ok(find('.rose-toolbar')); + }); + + test('it renders with filter', async function (assert) { + await render(hbs` + + `); + assert.ok(find('.rose-toolbar-search')); + }); +}); diff --git a/ui/admin/app/controllers/scopes/scope/sessions/index.js b/ui/admin/app/controllers/scopes/scope/sessions/index.js new file mode 100644 index 000000000..15c3461a5 --- /dev/null +++ b/ui/admin/app/controllers/scopes/scope/sessions/index.js @@ -0,0 +1,13 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class ScopesScopeSessionsController extends Controller { + // =services + @service store; + + // =attributes + + get availableSessions() { + return this.store.peekAll('session'); + } +} diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index 297c68a70..36f4d45cb 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -15,7 +15,27 @@ {{#if @model}} + + + + + {{#each this.availableSessions as |session|}} + + + + {{/each}} + + + + From 684aa4a9f645e9a1cbf40aa2c25016185549c7f1 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 18 Oct 2021 09:29:47 -0700 Subject: [PATCH 02/23] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20flext=20to=20?= =?UTF-8?q?toolbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/addon/styles/rose/components/toolbar/_index.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/rose/addon/styles/rose/components/toolbar/_index.scss b/addons/rose/addon/styles/rose/components/toolbar/_index.scss index d75d0bd61..ea4521d0f 100644 --- a/addons/rose/addon/styles/rose/components/toolbar/_index.scss +++ b/addons/rose/addon/styles/rose/components/toolbar/_index.scss @@ -1,5 +1,6 @@ .rose-toolbar { background-color: #fbfbfc; + display: flex; .rose-form { display: flex; } From 2b7d3a327ac2d1b036fffcc119b88dd78d71ac3f Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 18 Oct 2021 10:18:38 -0700 Subject: [PATCH 03/23] =?UTF-8?q?test:=20=F0=9F=92=8D=20fix=20classnames?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/addon/components/rose/toolbar/index.hbs | 4 ++-- .../addon/styles/rose/components/toolbar/_index.scss | 11 +---------- .../styles/rose/components/toolbar/_toolbar.scss | 10 ++++++++++ .../integration/components/rose/toolbar-test.js | 12 ++++++++++++ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/addons/rose/addon/components/rose/toolbar/index.hbs b/addons/rose/addon/components/rose/toolbar/index.hbs index 5f9a6388a..15977f7c9 100644 --- a/addons/rose/addon/components/rose/toolbar/index.hbs +++ b/addons/rose/addon/components/rose/toolbar/index.hbs @@ -1,6 +1,6 @@
{{yield (hash - search=(component "rose/anonymous") - filter=(component "rose/anonymous" class="rose-toolbar-search") + search=(component "rose/anonymous" class="rose-toolbar-search") + filter=(component "rose/anonymous" class="rose-toolbar-filter") )}}
\ No newline at end of file diff --git a/addons/rose/addon/styles/rose/components/toolbar/_index.scss b/addons/rose/addon/styles/rose/components/toolbar/_index.scss index ea4521d0f..c72d1654c 100644 --- a/addons/rose/addon/styles/rose/components/toolbar/_index.scss +++ b/addons/rose/addon/styles/rose/components/toolbar/_index.scss @@ -1,10 +1 @@ -.rose-toolbar { - background-color: #fbfbfc; - display: flex; - .rose-form { - display: flex; - } - .rose-dropdown { - margin-left: auto; - } -} +@import 'toolbar'; diff --git a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss index e69de29bb..9d1c18372 100644 --- a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss +++ b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss @@ -0,0 +1,10 @@ +.rose-toolbar { + background-color: var(--ui-gray-subtler-6); + display: flex; + .rose-form { + display: flex; + } + .rose-dropdown { + margin-left: auto; + } +} diff --git a/addons/rose/tests/integration/components/rose/toolbar-test.js b/addons/rose/tests/integration/components/rose/toolbar-test.js index dbdd09da2..5fd567fba 100644 --- a/addons/rose/tests/integration/components/rose/toolbar-test.js +++ b/addons/rose/tests/integration/components/rose/toolbar-test.js @@ -12,10 +12,22 @@ module('Integration | Component | rose/toolbar', function (hooks) { assert.ok(find('.rose-toolbar')); }); + test('it renders with attributes', async function (assert) { + await render(hbs``); + assert.ok(find('#toolbar')); + }); + test('it renders with filter', async function (assert) { await render(hbs` `); + assert.ok(find('.rose-toolbar-filter')); + }); + + test('it renders with search', async function (assert) { + await render(hbs` + + `); assert.ok(find('.rose-toolbar-search')); }); }); From 116f86b51d3a4bf8ddf38a4fdd03415693f71896 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 18 Oct 2021 10:30:25 -0700 Subject: [PATCH 04/23] =?UTF-8?q?test:=20=F0=9F=92=8D=20fix=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/addon/components/rose/toolbar/index.stories.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/rose/addon/components/rose/toolbar/index.stories.mdx b/addons/rose/addon/components/rose/toolbar/index.stories.mdx index 042a7a96c..bddb5a006 100644 --- a/addons/rose/addon/components/rose/toolbar/index.stories.mdx +++ b/addons/rose/addon/components/rose/toolbar/index.stories.mdx @@ -19,8 +19,8 @@ A toolbar component that allows two distinct sections to be configured: search, {{ template: hbs` - Search - Filter + Search + Filter `, }} From f4b3b4a2050b571efd42f3c6234f52744d65cb03 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 18 Oct 2021 12:11:55 -0700 Subject: [PATCH 05/23] =?UTF-8?q?fix:=20=F0=9F=90=9B=20simplifying=20toolb?= =?UTF-8?q?ar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rose/addon/components/rose/toolbar/index.hbs | 5 +---- .../components/rose/toolbar/index.stories.mdx | 6 +----- .../integration/components/rose/toolbar-test.js | 14 -------------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/addons/rose/addon/components/rose/toolbar/index.hbs b/addons/rose/addon/components/rose/toolbar/index.hbs index 15977f7c9..084353050 100644 --- a/addons/rose/addon/components/rose/toolbar/index.hbs +++ b/addons/rose/addon/components/rose/toolbar/index.hbs @@ -1,6 +1,3 @@
- {{yield (hash - search=(component "rose/anonymous" class="rose-toolbar-search") - filter=(component "rose/anonymous" class="rose-toolbar-filter") - )}} + {{yield}}
\ No newline at end of file diff --git a/addons/rose/addon/components/rose/toolbar/index.stories.mdx b/addons/rose/addon/components/rose/toolbar/index.stories.mdx index bddb5a006..b086f11a4 100644 --- a/addons/rose/addon/components/rose/toolbar/index.stories.mdx +++ b/addons/rose/addon/components/rose/toolbar/index.stories.mdx @@ -9,9 +9,7 @@ import { action } from '@storybook/addon-actions'; A toolbar component that allows two distinct sections to be configured: search, filter ```htmlbars - - - + ``` @@ -19,8 +17,6 @@ A toolbar component that allows two distinct sections to be configured: search, {{ template: hbs` - Search - Filter `, }} diff --git a/addons/rose/tests/integration/components/rose/toolbar-test.js b/addons/rose/tests/integration/components/rose/toolbar-test.js index 5fd567fba..3a9166ef7 100644 --- a/addons/rose/tests/integration/components/rose/toolbar-test.js +++ b/addons/rose/tests/integration/components/rose/toolbar-test.js @@ -16,18 +16,4 @@ module('Integration | Component | rose/toolbar', function (hooks) { await render(hbs``); assert.ok(find('#toolbar')); }); - - test('it renders with filter', async function (assert) { - await render(hbs` - - `); - assert.ok(find('.rose-toolbar-filter')); - }); - - test('it renders with search', async function (assert) { - await render(hbs` - - `); - assert.ok(find('.rose-toolbar-search')); - }); }); From f8bb1aa6056e3e0f4b782e9963ccaf6e6e92318f Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Mon, 18 Oct 2021 12:14:36 -0700 Subject: [PATCH 06/23] Update index.stories.mdx --- addons/rose/addon/components/rose/toolbar/index.stories.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/rose/addon/components/rose/toolbar/index.stories.mdx b/addons/rose/addon/components/rose/toolbar/index.stories.mdx index b086f11a4..f6c686a06 100644 --- a/addons/rose/addon/components/rose/toolbar/index.stories.mdx +++ b/addons/rose/addon/components/rose/toolbar/index.stories.mdx @@ -6,7 +6,7 @@ import { action } from '@storybook/addon-actions'; # Toolbar -A toolbar component that allows two distinct sections to be configured: search, filter +renders a gray bar ```htmlbars @@ -20,4 +20,4 @@ A toolbar component that allows two distinct sections to be configured: search, `, }} - \ No newline at end of file + From 1603aff862f9383da3b82eedc5166a65e469eaaa Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 18 Oct 2021 12:31:18 -0700 Subject: [PATCH 07/23] =?UTF-8?q?fix:=20=F0=9F=90=9B=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/addon/components/rose/toolbar/index.stories.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/rose/addon/components/rose/toolbar/index.stories.mdx b/addons/rose/addon/components/rose/toolbar/index.stories.mdx index b086f11a4..c19e463c4 100644 --- a/addons/rose/addon/components/rose/toolbar/index.stories.mdx +++ b/addons/rose/addon/components/rose/toolbar/index.stories.mdx @@ -9,7 +9,7 @@ import { action } from '@storybook/addon-actions'; A toolbar component that allows two distinct sections to be configured: search, filter ```htmlbars - + ``` From 8f5c60768c3e1dc8cfded94561c3fe56ea66f042 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 18 Oct 2021 13:25:14 -0700 Subject: [PATCH 08/23] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20height?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/addon/components/rose/toolbar/index.stories.mdx | 2 +- addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/rose/addon/components/rose/toolbar/index.stories.mdx b/addons/rose/addon/components/rose/toolbar/index.stories.mdx index efe448c4a..829091fbf 100644 --- a/addons/rose/addon/components/rose/toolbar/index.stories.mdx +++ b/addons/rose/addon/components/rose/toolbar/index.stories.mdx @@ -9,7 +9,7 @@ import { action } from '@storybook/addon-actions'; renders a gray bar ```htmlbars - + ``` diff --git a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss index 9d1c18372..12e16ab8c 100644 --- a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss +++ b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss @@ -1,6 +1,7 @@ .rose-toolbar { background-color: var(--ui-gray-subtler-6); display: flex; + height: 46px; .rose-form { display: flex; } From 093019ba33e3e694a5c12ede77f3a7da61ad1d09 Mon Sep 17 00:00:00 2001 From: dharini Date: Sat, 23 Oct 2021 22:18:20 -0700 Subject: [PATCH 09/23] move store logic to route --- .../app/controllers/scopes/scope/sessions/index.js | 13 ------------- ui/admin/app/routes/scopes/scope/sessions/index.js | 8 +++++++- .../app/templates/scopes/scope/sessions/index.hbs | 2 ++ 3 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 ui/admin/app/controllers/scopes/scope/sessions/index.js diff --git a/ui/admin/app/controllers/scopes/scope/sessions/index.js b/ui/admin/app/controllers/scopes/scope/sessions/index.js deleted file mode 100644 index 15c3461a5..000000000 --- a/ui/admin/app/controllers/scopes/scope/sessions/index.js +++ /dev/null @@ -1,13 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeSessionsController extends Controller { - // =services - @service store; - - // =attributes - - get availableSessions() { - return this.store.peekAll('session'); - } -} diff --git a/ui/admin/app/routes/scopes/scope/sessions/index.js b/ui/admin/app/routes/scopes/scope/sessions/index.js index e475a9c6f..074685a6e 100644 --- a/ui/admin/app/routes/scopes/scope/sessions/index.js +++ b/ui/admin/app/routes/scopes/scope/sessions/index.js @@ -1,3 +1,9 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeSessionsIndexRoute extends Route {} +export default class ScopesScopeSessionsIndexRoute extends Route { +setupController(controller) { + const availableSessions = this.store.peekAll('session'); + super.setupController(...arguments); + controller.setProperties({ availableSessions }); + } +} diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index 36f4d45cb..99c0c44da 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -22,7 +22,9 @@ @ignoreClickInside={{true}} as |dropdown| > + {{{log this.availableSessions 'dddd'}}} + {{{log this.availableSessions 'dddd'}}} {{#each this.availableSessions as |session|}} Date: Sun, 24 Oct 2021 16:19:29 -0700 Subject: [PATCH 10/23] =?UTF-8?q?fix:=20=F0=9F=90=9B=20move=20store=20logi?= =?UTF-8?q?c=20to=20route,=20replace=20height=20with=20padding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/addon/components/rose/toolbar/index.stories.mdx | 3 ++- .../rose/addon/styles/rose/components/toolbar/_toolbar.scss | 2 +- ui/admin/app/routes/scopes/scope/sessions/index.js | 4 ++-- ui/admin/app/templates/scopes/scope/sessions/index.hbs | 3 --- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/addons/rose/addon/components/rose/toolbar/index.stories.mdx b/addons/rose/addon/components/rose/toolbar/index.stories.mdx index 829091fbf..dd9dbb015 100644 --- a/addons/rose/addon/components/rose/toolbar/index.stories.mdx +++ b/addons/rose/addon/components/rose/toolbar/index.stories.mdx @@ -6,7 +6,7 @@ import { action } from '@storybook/addon-actions'; # Toolbar -renders a gray bar +renders a toolbar ```htmlbars @@ -17,6 +17,7 @@ renders a gray bar {{ template: hbs` + toolbar `, }} diff --git a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss index 12e16ab8c..f858eac3f 100644 --- a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss +++ b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss @@ -1,7 +1,7 @@ .rose-toolbar { background-color: var(--ui-gray-subtler-6); display: flex; - height: 46px; + padding: 5px; .rose-form { display: flex; } diff --git a/ui/admin/app/routes/scopes/scope/sessions/index.js b/ui/admin/app/routes/scopes/scope/sessions/index.js index 074685a6e..5434962a0 100644 --- a/ui/admin/app/routes/scopes/scope/sessions/index.js +++ b/ui/admin/app/routes/scopes/scope/sessions/index.js @@ -1,9 +1,9 @@ import Route from '@ember/routing/route'; export default class ScopesScopeSessionsIndexRoute extends Route { -setupController(controller) { + setupController(controller) { const availableSessions = this.store.peekAll('session'); super.setupController(...arguments); controller.setProperties({ availableSessions }); - } + } } diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index 99c0c44da..452180f70 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -22,9 +22,7 @@ @ignoreClickInside={{true}} as |dropdown| > - {{{log this.availableSessions 'dddd'}}} - {{{log this.availableSessions 'dddd'}}} {{#each this.availableSessions as |session|}} {{/each}} - From 085e901512731ae240909c04353cd757b7ebffa4 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 26 Oct 2021 09:14:46 -0700 Subject: [PATCH 11/23] =?UTF-8?q?fix:=20=F0=9F=90=9B=20use=20sizing=20vari?= =?UTF-8?q?able?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../addon/styles/rose/components/toolbar/_toolbar.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss index f858eac3f..4bac655a9 100644 --- a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss +++ b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss @@ -1,7 +1,12 @@ +@use '../../variables/sizing'; + +$xxs: sizing.rems(xxs); // 4 +$xxxxs: sizing.rems(xxxxs); // 1 + .rose-toolbar { background-color: var(--ui-gray-subtler-6); display: flex; - padding: 5px; + padding: $xxs + $xxxxs; .rose-form { display: flex; } From 81a381b1e72c48176b23badb6709bd20de6fa32e Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 26 Oct 2021 10:42:28 -0700 Subject: [PATCH 12/23] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20feature=20f?= =?UTF-8?q?lag=20for=20filter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/scopes/scope/sessions/index.hbs | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index 452180f70..c3653a062 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -15,26 +15,28 @@ {{#if @model}} - - - - - {{#each this.availableSessions as |session|}} - - - - {{/each}} - - - - + {{#if (feature-flag 'filter')}} + + + + + {{#each this.availableSessions as |session|}} + + + + {{/each}} + + + + + {{/if}} From 6645eca25d01f51facb4b79c7c92c9fed4aa1ff1 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 27 Oct 2021 10:33:55 -0700 Subject: [PATCH 13/23] =?UTF-8?q?chore:=20=F0=9F=A4=96=20enable=20feature?= =?UTF-8?q?=20flags=20in=20dev=20n=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/config/environment.js | 2 ++ ui/desktop/config/environment.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ui/admin/config/environment.js b/ui/admin/config/environment.js index b515fc76a..771068764 100644 --- a/ui/admin/config/environment.js +++ b/ui/admin/config/environment.js @@ -132,6 +132,7 @@ module.exports = function (environment) { // Enable features in development ENV.featureFlags['capabilities'] = true; + ENV.featureFlags['filter'] = true; } if (environment === 'test') { @@ -157,6 +158,7 @@ module.exports = function (environment) { // Enable tests for development features ENV.featureFlags['capabilities'] = true; + ENV.featureFlags['filter'] = true; } if (environment === 'production') { diff --git a/ui/desktop/config/environment.js b/ui/desktop/config/environment.js index 9c9f67b6e..f794097d2 100644 --- a/ui/desktop/config/environment.js +++ b/ui/desktop/config/environment.js @@ -81,6 +81,7 @@ module.exports = function (environment) { // Enable features in development ENV.featureFlags['capabilities'] = true; + ENV.featureFlags['filter'] = true; } if (environment === 'test') { @@ -106,6 +107,7 @@ module.exports = function (environment) { // Enable tests for development features ENV.featureFlags['capabilities'] = true; + ENV.featureFlags['filter'] = true; } if (environment === 'production') { From 4328b4c6dadf6609a1b32ccb8154b90fdbc43622 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 27 Oct 2021 17:23:18 -0400 Subject: [PATCH 14/23] tweak filter i18n label --- addons/core/translations/actions/en-us.yaml | 2 -- ui/admin/app/templates/scopes/scope/sessions/index.hbs | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/core/translations/actions/en-us.yaml b/addons/core/translations/actions/en-us.yaml index 49cd11a23..144ced636 100644 --- a/addons/core/translations/actions/en-us.yaml +++ b/addons/core/translations/actions/en-us.yaml @@ -35,5 +35,3 @@ close: Close toggle-secret: Toggle secret visibility minimize: Minimize fullscreen: Fullscreen -filter: - status: status diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index c3653a062..e3fa0e32b 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -19,7 +19,7 @@ @@ -125,4 +125,4 @@ - \ No newline at end of file + From dfb2673c91ae9799b22249d8f3e56fe65aafa966 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 27 Oct 2021 14:27:42 -0700 Subject: [PATCH 15/23] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20refactoring=20?= =?UTF-8?q?toolbar=20style=20using=20grid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rose/components/toolbar/_toolbar.scss | 26 +++++++++++--- .../templates/scopes/scope/sessions/index.hbs | 36 ++++++++++--------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss index 4bac655a9..4fb4bb416 100644 --- a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss +++ b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss @@ -1,16 +1,32 @@ @use '../../variables/sizing'; +@use '../../variables/media'; $xxs: sizing.rems(xxs); // 4 $xxxxs: sizing.rems(xxxxs); // 1 .rose-toolbar { background-color: var(--ui-gray-subtler-6); - display: flex; - padding: $xxs + $xxxxs; + .rose-form { display: flex; - } - .rose-dropdown { - margin-left: auto; + display: grid; + padding: $xxs + $xxxxs; + grid-template-areas: + 'search filter'; + grid-template-columns: auto; + + .rose-filter { + grid-area: filter; + } + } +} + + +@media (max-width: media.width(small)) { + .rose-toolbar { + grid-template-columns: auto; + grid-template-areas: + 'search' + 'filter' } } diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index c3653a062..7c5bb511f 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -17,23 +17,25 @@ {{#if @model}} {{#if (feature-flag 'filter')}} - - - - {{#each this.availableSessions as |session|}} - - - - {{/each}} - - + +
+ + + {{#each this.availableSessions as |session|}} + + + + {{/each}} + + +
{{/if}} From ca03aca886201ad0c6c5b2eedc96d48c29f3463f Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 27 Oct 2021 17:35:00 -0400 Subject: [PATCH 16/23] =?UTF-8?q?chore:=20=F0=9F=A4=96=20tweak=20tests=20a?= =?UTF-8?q?nd=20remove=20unused=20class=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/addon/components/rose/toolbar/index.js | 8 -------- .../tests/integration/components/rose/toolbar-test.js | 3 ++- ui/admin/app/templates/scopes/scope/sessions/index.hbs | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 addons/rose/addon/components/rose/toolbar/index.js diff --git a/addons/rose/addon/components/rose/toolbar/index.js b/addons/rose/addon/components/rose/toolbar/index.js deleted file mode 100644 index 1ae2378ca..000000000 --- a/addons/rose/addon/components/rose/toolbar/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import Component from '@glimmer/component'; -import { generateComponentID } from '../../../utilities/component-auto-id'; - -export default class RoseToolbarComponent extends Component { - // =attributes - - id = generateComponentID(); -} diff --git a/addons/rose/tests/integration/components/rose/toolbar-test.js b/addons/rose/tests/integration/components/rose/toolbar-test.js index 3a9166ef7..9c91e6c7a 100644 --- a/addons/rose/tests/integration/components/rose/toolbar-test.js +++ b/addons/rose/tests/integration/components/rose/toolbar-test.js @@ -7,12 +7,13 @@ module('Integration | Component | rose/toolbar', function (hooks) { setupRenderingTest(hooks); test('it renders', async function (assert) { + assert.expect(1); await render(hbs``); - assert.ok(find('div')); assert.ok(find('.rose-toolbar')); }); test('it renders with attributes', async function (assert) { + assert.expect(1); await render(hbs``); assert.ok(find('#toolbar')); }); diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index e3fa0e32b..31f079f2e 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -125,4 +125,4 @@
- + \ No newline at end of file From 1518b32a43ec06d0f65952b1a53a5ee91c6e10a0 Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Wed, 27 Oct 2021 15:00:54 -0700 Subject: [PATCH 17/23] Update _toolbar.scss --- addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss index 4fb4bb416..a4b0505f8 100644 --- a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss +++ b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss @@ -8,7 +8,6 @@ $xxxxs: sizing.rems(xxxxs); // 1 background-color: var(--ui-gray-subtler-6); .rose-form { - display: flex; display: grid; padding: $xxs + $xxxxs; grid-template-areas: From 324c5dd98cde9183ffaa9c2ed4659ae02b8a2844 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Thu, 28 Oct 2021 11:53:31 -0400 Subject: [PATCH 18/23] chore: fix formatting and update yarn lock --- .../app/templates/scopes/scope/sessions/index.hbs | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index e6714ecef..31f079f2e 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -17,7 +17,7 @@ {{#if @model}} {{#if (feature-flag 'filter')}} - + Date: Thu, 28 Oct 2021 09:10:31 -0700 Subject: [PATCH 19/23] =?UTF-8?q?fix:=20=F0=9F=90=9B=20remove=20grid=20lay?= =?UTF-8?q?out?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rose/components/toolbar/_toolbar.scss | 19 ------------------- .../templates/scopes/scope/sessions/index.hbs | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss index 4fb4bb416..cf6bd1491 100644 --- a/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss +++ b/addons/rose/addon/styles/rose/components/toolbar/_toolbar.scss @@ -8,25 +8,6 @@ $xxxxs: sizing.rems(xxxxs); // 1 background-color: var(--ui-gray-subtler-6); .rose-form { - display: flex; - display: grid; padding: $xxs + $xxxxs; - grid-template-areas: - 'search filter'; - grid-template-columns: auto; - - .rose-filter { - grid-area: filter; - } - } -} - - -@media (max-width: media.width(small)) { - .rose-toolbar { - grid-template-columns: auto; - grid-template-areas: - 'search' - 'filter' } } diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index 7c5bb511f..daf883cc4 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -18,7 +18,7 @@ {{#if (feature-flag 'filter')}} -
+
Date: Thu, 28 Oct 2021 12:46:56 -0400 Subject: [PATCH 20/23] chore: linting --- ui/admin/app/templates/scopes/scope/sessions/index.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index e3fa0e32b..31f079f2e 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -125,4 +125,4 @@ - + \ No newline at end of file From 97d0d9057bb3cbed0bc116fc7806c5805dcf9c55 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Thu, 28 Oct 2021 11:47:28 -0700 Subject: [PATCH 21/23] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Missed=20yarn.lock?= =?UTF-8?q?=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We miss to run `yarn install` at root level after deps change so did not reflect changes on yarn.lock --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index c3824f22a..931bbdb30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7670,7 +7670,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001157, caniuse-lite@^1.0.30001271: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001157, caniuse-lite@^1.0.30001265: version "1.0.30001271" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001271.tgz#0dda0c9bcae2cf5407cd34cac304186616cc83e8" integrity sha512-BBruZFWmt3HFdVPS8kceTBIguKxu4f99n5JNp06OlPD/luoAMIaIK5ieV5YjnBLH3Nysai9sxj9rpJj4ZisXOA== @@ -9510,10 +9510,10 @@ electron-rebuild@^2.0.3: tar "^6.0.5" yargs "^16.0.0" -electron-to-chromium@^1.3.878: - version "1.3.878" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.878.tgz#baa9fb5c24b9b580f08fb245cbb52a22f8fc8fa8" - integrity sha512-O6yxWCN9ph2AdspAIszBnd9v8s11hQx8ub9w4UGApzmNRnoKhbulOWqbO8THEQec/aEHtvy+donHZMlh6l1rbA== +electron-to-chromium@^1.3.867: + version "1.3.883" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.883.tgz#cc409921469b3aa6ab6efd65cc2a4375128bb703" + integrity sha512-goyjNx4wB9j911PBteb+AXNbErug7rJVkmDXWdw5SCVn2JlARBwsqucPkvp1h5mXWxHUbBRK3bwXTrqSxSiAIQ== element-resize-detector@^1.2.2: version "1.2.3" @@ -17059,7 +17059,7 @@ node-pre-gyp@^0.11.0: semver "^5.3.0" tar "^4" -node-releases@^2.0.1: +node-releases@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== From bdde9cc21d980ffb4bc525347480093b17a15836 Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 28 Oct 2021 12:45:02 -0700 Subject: [PATCH 22/23] =?UTF-8?q?chore:=20=F0=9F=A4=96=20branch=20out=20se?= =?UTF-8?q?ssions=20int=20logiv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/routes/scopes/scope/sessions/index.js | 8 +------ .../templates/scopes/scope/sessions/index.hbs | 23 +------------------ ui/admin/config/environment.js | 2 -- ui/desktop/config/environment.js | 2 -- 4 files changed, 2 insertions(+), 33 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/sessions/index.js b/ui/admin/app/routes/scopes/scope/sessions/index.js index 5434962a0..e475a9c6f 100644 --- a/ui/admin/app/routes/scopes/scope/sessions/index.js +++ b/ui/admin/app/routes/scopes/scope/sessions/index.js @@ -1,9 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeSessionsIndexRoute extends Route { - setupController(controller) { - const availableSessions = this.store.peekAll('session'); - super.setupController(...arguments); - controller.setProperties({ availableSessions }); - } -} +export default class ScopesScopeSessionsIndexRoute extends Route {} diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index 31f079f2e..297c68a70 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -15,28 +15,7 @@ {{#if @model}} - {{#if (feature-flag 'filter')}} - - - - - {{#each this.availableSessions as |session|}} - - - - {{/each}} - - - - - {{/if}} + diff --git a/ui/admin/config/environment.js b/ui/admin/config/environment.js index 771068764..b515fc76a 100644 --- a/ui/admin/config/environment.js +++ b/ui/admin/config/environment.js @@ -132,7 +132,6 @@ module.exports = function (environment) { // Enable features in development ENV.featureFlags['capabilities'] = true; - ENV.featureFlags['filter'] = true; } if (environment === 'test') { @@ -158,7 +157,6 @@ module.exports = function (environment) { // Enable tests for development features ENV.featureFlags['capabilities'] = true; - ENV.featureFlags['filter'] = true; } if (environment === 'production') { diff --git a/ui/desktop/config/environment.js b/ui/desktop/config/environment.js index f794097d2..9c9f67b6e 100644 --- a/ui/desktop/config/environment.js +++ b/ui/desktop/config/environment.js @@ -81,7 +81,6 @@ module.exports = function (environment) { // Enable features in development ENV.featureFlags['capabilities'] = true; - ENV.featureFlags['filter'] = true; } if (environment === 'test') { @@ -107,7 +106,6 @@ module.exports = function (environment) { // Enable tests for development features ENV.featureFlags['capabilities'] = true; - ENV.featureFlags['filter'] = true; } if (environment === 'production') { From 35e0e969e2499fa3d3a49f868ddd39b2f4e957ef Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 1 Nov 2021 12:05:09 -0700 Subject: [PATCH 23/23] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20integrate=20toolba?= =?UTF-8?q?r=20onto=20session=20admin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/templates/scopes/scope/sessions/index.hbs | 12 ++++++++++++ ui/admin/config/environment.js | 2 ++ ui/desktop/config/environment.js | 2 ++ 3 files changed, 16 insertions(+) diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index 297c68a70..01aa8f737 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -15,6 +15,18 @@ {{#if @model}} + {{#if (feature-flag 'filter')}} + + +
+ +
+
+
+ {{/if}} diff --git a/ui/admin/config/environment.js b/ui/admin/config/environment.js index b515fc76a..771068764 100644 --- a/ui/admin/config/environment.js +++ b/ui/admin/config/environment.js @@ -132,6 +132,7 @@ module.exports = function (environment) { // Enable features in development ENV.featureFlags['capabilities'] = true; + ENV.featureFlags['filter'] = true; } if (environment === 'test') { @@ -157,6 +158,7 @@ module.exports = function (environment) { // Enable tests for development features ENV.featureFlags['capabilities'] = true; + ENV.featureFlags['filter'] = true; } if (environment === 'production') { diff --git a/ui/desktop/config/environment.js b/ui/desktop/config/environment.js index 9c9f67b6e..f794097d2 100644 --- a/ui/desktop/config/environment.js +++ b/ui/desktop/config/environment.js @@ -81,6 +81,7 @@ module.exports = function (environment) { // Enable features in development ENV.featureFlags['capabilities'] = true; + ENV.featureFlags['filter'] = true; } if (environment === 'test') { @@ -106,6 +107,7 @@ module.exports = function (environment) { // Enable tests for development features ENV.featureFlags['capabilities'] = true; + ENV.featureFlags['filter'] = true; } if (environment === 'production') {