From 36cdf827ccab7c833f9515ab301b46de9b097a68 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Mon, 22 Nov 2021 14:27:32 -0500 Subject: [PATCH 1/7] Better color contrast for create button --- app/styles/_variables.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/styles/_variables.scss b/app/styles/_variables.scss index ee6d4f67c99..4bf6af1cb6a 100644 --- a/app/styles/_variables.scss +++ b/app/styles/_variables.scss @@ -31,7 +31,7 @@ $brand-warning: #f0ad4e !default; $brand-danger: #d9534f; /* overrides with darkened colors for a11y contrast */ -$brand-success: darken($brand-success, 10%); +$brand-success: darken($brand-success, 20%); $brand-info: darken($brand-info, 15%); // no override needed for brand-warning (will use dark text instead) $brand-danger: darken($brand-danger, 15%); From 98aaecb13cc4d21fe1e37d791dabd761f3ac27d0 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Mon, 22 Nov 2021 14:40:47 -0500 Subject: [PATCH 2/7] Wording changes --- translations/en-us.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translations/en-us.yml b/translations/en-us.yml index e85d784de25..84ea7df494e 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -601,7 +601,7 @@ node_card: options: Options view_button: 'View' update_button: 'Update' - view_changes_button: 'View changes' + view_changes_button: 'Continue update' schema_response_error: 'Updates irretreivable.' forks: @@ -1608,7 +1608,7 @@ registries: modalBodyFirst: 'Updates to registration responses can be updated by clicking “Next”.
Edits to metadata including Description, Category, License, Publication DOI, and Tags are done on the registration by clicking the ' modalBodySecond: ' icon.' modalBodyNoUpdates: 'The {registryName} does not allow updates for this registration template.
Contact their registy if you have any questions.' - learnMore: 'Click here to learn more' + learnMore: 'Click here to learn more.' next: Next cancel_update: 'Cancel update' meetings: From 592ea73fadb060ce60e1040297d4bc99ecd7708a Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Mon, 22 Nov 2021 16:08:48 -0500 Subject: [PATCH 3/7] Another wording change --- translations/en-us.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/en-us.yml b/translations/en-us.yml index 84ea7df494e..d474ce76353 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -581,7 +581,7 @@ node_card: statuses: revision_pending_moderation: 'Update pending moderation' revision_in_progress: 'Update in progress' - revision_unapproved: 'Update pending unapproved' + revision_unapproved: 'Update pending approval' pending_registration_approval: 'Pending registration approval' pending_embargo_approval: 'Pending embargo' pending: 'Pending moderation' From 9e35eff89dd5f7a099e76980dee09aaadf9bca8e Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Mon, 22 Nov 2021 16:59:04 -0500 Subject: [PATCH 4/7] Close dropdown when choosing revision in dropdown --- .../components/registries/update-dropdown/component.ts | 7 +++++++ .../registries/update-dropdown/list-item/template.hbs | 7 ++++++- .../components/registries/update-dropdown/template.hbs | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/osf-components/addon/components/registries/update-dropdown/component.ts b/lib/osf-components/addon/components/registries/update-dropdown/component.ts index 3b4d03a7c45..b2bd21f0c49 100644 --- a/lib/osf-components/addon/components/registries/update-dropdown/component.ts +++ b/lib/osf-components/addon/components/registries/update-dropdown/component.ts @@ -93,6 +93,13 @@ export default class UpdateDropdown extends Component { this.showModal = false; } + @action + onRevisionSelect(callback: () => void) { + this.router.on('routeDidChange', () => { + callback(); + }); + } + @task @waitFor async getRevisionList() { diff --git a/lib/osf-components/addon/components/registries/update-dropdown/list-item/template.hbs b/lib/osf-components/addon/components/registries/update-dropdown/list-item/template.hbs index 49e24b7378c..953e750c0e0 100644 --- a/lib/osf-components/addon/components/registries/update-dropdown/list-item/template.hbs +++ b/lib/osf-components/addon/components/registries/update-dropdown/list-item/template.hbs @@ -1,7 +1,12 @@ {{#if this.shouldShow}}
{{!-- Using LinkTo instead of OsfLink due to how queryParams are buggy for setting active state --}} - + Date: Mon, 22 Nov 2021 20:46:53 -0500 Subject: [PATCH 5/7] Add data-test selectors to delete-modal --- .../addon/components/delete-button/template.hbs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/osf-components/addon/components/delete-button/template.hbs b/lib/osf-components/addon/components/delete-button/template.hbs index d40871a28ce..cddbf645e07 100644 --- a/lib/osf-components/addon/components/delete-button/template.hbs +++ b/lib/osf-components/addon/components/delete-button/template.hbs @@ -43,11 +43,11 @@ @onHide={{action this._cancel}} as |modal| > - +

{{this.modalTitle}}

- + {{#if (has-block)}} {{yield}} {{else}} @@ -68,7 +68,7 @@ {{/if}} - + Date: Tue, 23 Nov 2021 10:46:06 -0500 Subject: [PATCH 6/7] Add quick test for delete-button --- .../delete-button/component-test.ts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/integration/components/delete-button/component-test.ts diff --git a/tests/integration/components/delete-button/component-test.ts b/tests/integration/components/delete-button/component-test.ts new file mode 100644 index 00000000000..5493da7bb59 --- /dev/null +++ b/tests/integration/components/delete-button/component-test.ts @@ -0,0 +1,27 @@ +import { click, render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; +import { setupRenderingTest } from 'ember-qunit'; +import { module, test } from 'qunit'; + +module('Integration | Component | delete-button', hooks => { + setupRenderingTest(hooks); + + test('it renders', async function(assert) { + await render(hbs` + + `); + assert.dom('[data-test-delete-button]').hasText('Button here!'); + await click('[data-test-delete-button]'); + assert.dom('[data-test-delete-modal-header]').containsText('Head'); + assert.dom('[data-test-delete-modal-body]').hasText('Shoulders'); + assert.dom('[data-test-cancel-delete]').hasText('Knees'); + assert.dom('[data-test-confirm-delete]').hasText('Toes'); + await click('[data-test-confirm-delete]'); + }); +}); From 08ed5626cd4fe9a803c08ff07c7a65cebb7da994 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Tue, 23 Nov 2021 14:21:05 -0500 Subject: [PATCH 7/7] Remove redundant label for registrations needing moderation --- lib/osf-components/addon/components/node-card/template.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/osf-components/addon/components/node-card/template.hbs b/lib/osf-components/addon/components/node-card/template.hbs index 54709635a4f..9939711eb50 100644 --- a/lib/osf-components/addon/components/node-card/template.hbs +++ b/lib/osf-components/addon/components/node-card/template.hbs @@ -42,7 +42,7 @@ {{else if (eq @node.revisionState 'in_progress')}} {{t 'node_card.registration.statuses.revision_in_progress'}} | {{else if (eq @node.revisionState 'pending_moderation')}} - {{#if (not-eq @node.reviewsState 'pending_moderation')}} + {{#if (not-eq @node.reviewsState 'pending')}} {{t 'node_card.registration.statuses.revision_pending_moderation'}} | {{/if}} {{/if}}