From 3508b0eb7816a33abd492f703906a02c894e825c Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Fri, 22 Oct 2021 13:42:17 -0400 Subject: [PATCH 1/8] Refine update-dropdown for moderator mode --- .../registries/update-dropdown/component.ts | 23 +++++++++++++------ .../registries/update-dropdown/template.hbs | 2 +- .../update-dropdown/update-label/component.ts | 7 +++--- .../make-decision-dropdown/styles.scss | 1 + .../addon/edit-revision/template.hbs | 12 +++++----- .../acceptance/edit-revision/revision-test.ts | 1 + 6 files changed, 29 insertions(+), 17 deletions(-) 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 02196129d78..3b4d03a7c45 100644 --- a/lib/osf-components/addon/components/registries/update-dropdown/component.ts +++ b/lib/osf-components/addon/components/registries/update-dropdown/component.ts @@ -1,29 +1,32 @@ import { action } from '@ember/object'; +import RouterService from '@ember/routing/router-service'; import { inject as service } from '@ember/service'; import { waitFor } from '@ember/test-waiters'; import Store from '@ember-data/store'; import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; import { task } from 'ember-concurrency'; +import { taskFor } from 'ember-concurrency-ts'; import Intl from 'ember-intl/services/intl'; -import { QueryHasManyResult } from 'ember-osf-web/models/osf-model'; +import Media from 'ember-responsive'; +import Toast from 'ember-toastr/services/toast'; +import { QueryHasManyResult } from 'ember-osf-web/models/osf-model'; import RegistrationModel, { RegistrationReviewStates } from 'ember-osf-web/models/registration'; import SchemaResponseModel, { RevisionReviewStates } from 'ember-osf-web/models/schema-response'; import CurrentUserService from 'ember-osf-web/services/current-user'; -import Toast from 'ember-toastr/services/toast'; import captureException, { getApiErrorMessage } from 'ember-osf-web/utils/capture-exception'; -import RouterService from '@ember/routing/router-service'; -import { taskFor } from 'ember-concurrency-ts'; -import { tracked } from '@glimmer/tracking'; interface Args { registration: RegistrationModel; selectedRevisionId: string; + isModeratorMode: boolean; } export default class UpdateDropdown extends Component { @service currentUser!: CurrentUserService; @service intl!: Intl; + @service media!: Media; @service toast!: Toast; @service store!: Store; @service router!: RouterService; @@ -42,6 +45,10 @@ export default class UpdateDropdown extends Component { taskFor(this.getRevisionList).perform(); } + get isDesktop(): boolean { + return this.media.isDesktop || this.media.isJumbo; + } + get hasMore() { return this.currentPage <= this.totalPage; } @@ -53,7 +60,8 @@ export default class UpdateDropdown extends Component { } get shouldShowCreateButton(): boolean { - return this.args.registration.userHasAdminPermission + return Boolean(this.revisions.length) && !this.args.isModeratorMode + && this.args.registration.userHasAdminPermission && [ RegistrationReviewStates.Accepted, RegistrationReviewStates.Embargo, @@ -62,7 +70,8 @@ export default class UpdateDropdown extends Component { } get shouldShowUpdateLink(): boolean { - return this.args.registration.userHasReadPermission + return Boolean(this.revisions.length) && !this.args.isModeratorMode + && this.args.registration.userHasReadPermission && [ RegistrationReviewStates.Accepted, RegistrationReviewStates.Embargo, diff --git a/lib/osf-components/addon/components/registries/update-dropdown/template.hbs b/lib/osf-components/addon/components/registries/update-dropdown/template.hbs index 06abe74ba0e..a2352bdfc95 100644 --- a/lib/osf-components/addon/components/registries/update-dropdown/template.hbs +++ b/lib/osf-components/addon/components/registries/update-dropdown/template.hbs @@ -1,7 +1,7 @@ { get label() { const { totalRevisions, index } = this.args; const revisionNumber = totalRevisions - index; + let labelString = this.intl.t('registries.update_dropdown.updates_list_label', { revisionNumber }); if (index === totalRevisions) { - return this.intl.t('registries.update_dropdown.updates_list_label_original'); + labelString = this.intl.t('registries.update_dropdown.updates_list_label_original'); } if (index === 0) { - return this.intl.t('registries.update_dropdown.latest'); + labelString = this.intl.t('registries.update_dropdown.latest'); } - return this.intl.t('registries.update_dropdown.updates_list_label', { revisionNumber }); + return labelString; } } diff --git a/lib/registries/addon/components/make-decision-dropdown/styles.scss b/lib/registries/addon/components/make-decision-dropdown/styles.scss index b94c2090c1f..64c38b7ad15 100644 --- a/lib/registries/addon/components/make-decision-dropdown/styles.scss +++ b/lib/registries/addon/components/make-decision-dropdown/styles.scss @@ -34,5 +34,6 @@ } .SubmitButton { + margin: 10px 0; float: right; } diff --git a/lib/registries/addon/edit-revision/template.hbs b/lib/registries/addon/edit-revision/template.hbs index 77cbbdd2a7f..57a75a6d597 100644 --- a/lib/registries/addon/edit-revision/template.hbs +++ b/lib/registries/addon/edit-revision/template.hbs @@ -16,15 +16,15 @@
- {{#if revisionManager.node}} + {{#if revisionManager.registration}} - {{revisionManager.node.title}} > + {{revisionManager.registration.title}} > {{/if}}

diff --git a/tests/engines/registries/acceptance/edit-revision/revision-test.ts b/tests/engines/registries/acceptance/edit-revision/revision-test.ts index 579a0c47a80..772aa479327 100644 --- a/tests/engines/registries/acceptance/edit-revision/revision-test.ts +++ b/tests/engines/registries/acceptance/edit-revision/revision-test.ts @@ -173,6 +173,7 @@ module('Registries | Acceptance | registries revision', hooks => { // justification page assert.equal(currentRouteName(), 'registries.edit-revision.justification', 'Starts at justification page'); + assert.dom('[data-test-link-back-to-registration]').exists('Link back to registration is shown'); assert.dom('[data-test-link="justification"] > [data-test-icon]') .hasClass('fa-dot-circle', 'justification page is current page'); assert.dom('[data-test-link="1-first-page-of-test-schema"] > [data-test-icon]') From 9645a3a5367654820e635cac0e773d013f47693d Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Fri, 22 Oct 2021 13:52:54 -0400 Subject: [PATCH 2/8] Update wording for registration states --- .../components/registries-states/component.ts | 5 ++- translations/en-us.yml | 32 +++++++++++++------ 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/lib/registries/addon/components/registries-states/component.ts b/lib/registries/addon/components/registries-states/component.ts index c0081b6864a..de0373dfb4c 100644 --- a/lib/registries/addon/components/registries-states/component.ts +++ b/lib/registries/addon/components/registries-states/component.ts @@ -10,6 +10,7 @@ import pathJoin from 'ember-osf-web/utils/path-join'; import { layout } from 'ember-osf-web/decorators/component'; import RegistrationModel, { RegistrationReviewStates } from 'ember-osf-web/models/registration'; +import { RevisionReviewStates } from 'ember-osf-web/models/schema-response'; import styles from './styles'; import template from './template'; @@ -44,7 +45,7 @@ export default class RegistriesStates extends Component { /* eslint-disable max-len */ @computed( 'isModeratorMode', 'projectUrl', - 'registration.{embargoEndDate,pendingEmbargoApproval,pendingRegistrationApproval,reviewsState,userHasAdminPermission}', + 'registration.{embargoEndDate,pendingEmbargoApproval,pendingRegistrationApproval,reviewsState,revisionState,userHasAdminPermission}', 'stateIcon', ) /* eslint-enable max-len */ @@ -57,6 +58,8 @@ export default class RegistriesStates extends Component { stateKey = 'pendingRegistrationApproval'; } else if (this.registration.pendingEmbargoApproval) { stateKey = 'pendingEmbargoApproval'; + } else if (this.registration.revisionState !== RevisionReviewStates.Approved) { + stateKey = camelize(this.registration.revisionState); } else { stateKey = camelize(this.registration.reviewsState); } diff --git a/translations/en-us.yml b/translations/en-us.yml index e357914e971..18a0967b2d5 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -1386,15 +1386,15 @@ registries: please_note: 'Please note:' email_support: 'Changes to any files (1) in the projects or components being registered, (2) uploaded or selected as prompt responses, including those connected through add-ons during archiving will result in archiving failure and loss of your registration timestamp. Please do not modify your files until after you have received email confirmation of archiving completion. If this registration has been archiving for more than 72 hours, please email {supportEmail} for assistance.' pendingRegistrationApproval: - text: 'Pending registration' + text: 'Pending approval' short_description: 'Pending registration approval' - long_description: 'This is a pending registration of this project, awaiting approval from project administrators. This registration will be final when all project administrators approve the registration or 48 hours pass, whichever comes first.' + long_description: 'This registration is waiting for approval from its contributors.' pendingEmbargoApproval: - text: 'Pending registration' + text: 'Pending approval' short_description: 'Pending embargo approval' - long_description: 'This registration is pending approval. It will be final and enter an embargo period when all project administrators approve the registration or 48 hours pass, whichever comes first. The embargo will keep the registration private until the embargo period ends.' + long_description: 'This registration is waiting for approval from its contributors. Once approved, the embargo will keep the registration private until {embargoEndDate}.' pending: - text: 'Pending registration' + text: 'Pending moderation' short_description: 'Pending moderator approval' long_description: 'This registration is awaiting a decision by the registry moderators. An email will notify all registration contributors of the decision.' accepted: @@ -1413,15 +1413,27 @@ registries: pendingEmbargoTermination: text: 'Embargoed registration' short_description: 'Pending embargo termination' - long_description: 'This registration is embargoed. It will remain private until {embargoEndDate}. A request to make this registration public is pending.' + long_description: 'This registration is waiting for approval from its contributors to terminate its embargo and be made public.' pendingWithdrawRequest: - text: 'Public registration' + text: 'Pending withdrawal' short_description: 'Pending withdraw request' - long_description: 'This registration will be withdrawn when all project administrators approve the withdrawal.' + long_description: 'This registration is waiting for approval to be withdrawn by its contributors.' pendingWithdraw: - text: 'Public registration' + text: 'Pending withdrawal' short_description: 'Pending withdrawal moderation' - long_description: 'This registration is awaiting a withdrawal decision by the registry moderators. An email will notify all registration contributors of the decision.' + long_description: 'This registration is waiting for approval to be withdrawn by registry moderators.' + unapproved: + text: 'Update pending' + short_description: 'Update pending approval' + long_description: 'This registration has an update that is waiting for approval from its contributors. Updates will be made available once approved.' + inProgress: + text: 'Update in progress' + short_description: 'Updates being made' + long_description: 'This registration is currently being updated by its contributors. Updates will be made available once approved.' + pendingModeration: + text: 'Update pending review' + short_description: 'Update pending moderator approval' + long_description: 'This registration has an update that is waiting for moderation. Updates will be made available once approved.' bookmark: add: text: Bookmark From f37a9ae9f7726a54195c1e26257a0cfe4ebb9fa1 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Fri, 22 Oct 2021 17:48:16 -0400 Subject: [PATCH 3/8] Tweak embargo language --- 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 18a0967b2d5..8e4407fa76a 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -1392,7 +1392,7 @@ registries: pendingEmbargoApproval: text: 'Pending approval' short_description: 'Pending embargo approval' - long_description: 'This registration is waiting for approval from its contributors. Once approved, the embargo will keep the registration private until {embargoEndDate}.' + long_description: 'This registration is waiting for approval from its contributors. Once approved, the registration will remain private until the embargo ends.' pending: text: 'Pending moderation' short_description: 'Pending moderator approval' From 3e0dc90606f3ea475a4e1ee315430a90cf35b1d2 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Mon, 25 Oct 2021 11:46:58 -0400 Subject: [PATCH 4/8] Add loading state logic for revisionstate --- lib/registries/addon/components/registries-states/component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/registries/addon/components/registries-states/component.ts b/lib/registries/addon/components/registries-states/component.ts index de0373dfb4c..eb76d2b4a58 100644 --- a/lib/registries/addon/components/registries-states/component.ts +++ b/lib/registries/addon/components/registries-states/component.ts @@ -50,7 +50,7 @@ export default class RegistriesStates extends Component { ) /* eslint-enable max-len */ get stateText() { - if (!this.registration || !this.registration.reviewsState) { + if (!this.registration || !this.registration.reviewsState || !this.registration.revisionState) { return undefined; } let stateKey; From 1f114d61b858d3a2daef3b16a6d7639313865968 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Mon, 25 Oct 2021 14:15:25 -0400 Subject: [PATCH 5/8] Tests --- .../acceptance/overview/topbar-test.ts | 57 ++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/tests/engines/registries/acceptance/overview/topbar-test.ts b/tests/engines/registries/acceptance/overview/topbar-test.ts index 8a08f0e352c..1777841566b 100644 --- a/tests/engines/registries/acceptance/overview/topbar-test.ts +++ b/tests/engines/registries/acceptance/overview/topbar-test.ts @@ -1,3 +1,4 @@ +import { camelize } from '@ember/string'; import { triggerEvent } from '@ember/test-helpers'; import { ModelInstance } from 'ember-cli-mirage'; import { setupMirage } from 'ember-cli-mirage/test-support'; @@ -12,6 +13,7 @@ import { RegistrationReviewStates } from 'ember-osf-web/models/registration'; import { click, visit } from 'ember-osf-web/tests/helpers'; import { setupEngineApplicationTest } from 'ember-osf-web/tests/helpers/engines'; import stripHtmlTags from 'ember-osf-web/utils/strip-html-tags'; +import { RevisionReviewStates } from 'ember-osf-web/models/schema-response'; const registrationStates: Record = { + approved: { + revisionState: RevisionReviewStates.Approved, + translationKey: RegistrationReviewStates.Accepted, + }, + unapproved: { + revisionState: RevisionReviewStates.Unapproved, + translationKey: RevisionReviewStates.Unapproved, + }, + inProgress: { + revisionState: RevisionReviewStates.RevisionInProgress, + translationKey: camelize(RevisionReviewStates.RevisionInProgress), + }, + revisionPendingModeration: { + revisionState: RevisionReviewStates.RevisionPendingModeration, + translationKey: camelize(RevisionReviewStates.RevisionPendingModeration), + }, +}; + module('Registries | Acceptance | overview.topbar', hooks => { setupEngineApplicationTest(hooks, 'registries'); setupMirage(hooks); @@ -199,10 +223,11 @@ module('Registries | Acceptance | overview.topbar', hooks => { assert.ok(Boolean(reg.forkIds.length)); }); - test('state description has correct text', async assert => { + test('reviews state description has correct text', async assert => { for (const [state, stateInfo] of Object.entries(registrationStates)) { const reg = server.create('registration', { registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + revisionState: RevisionReviewStates.Approved, currentUserPermissions: Object.values(Permission), }, stateInfo.trait); await visit(`/${reg.id}/`); @@ -235,6 +260,36 @@ module('Registries | Acceptance | overview.topbar', hooks => { } }); + test('revision state description has correct text', async assert => { + for (const stateInfo of Object.values(revisionStates)) { + const reg = server.create('registration', { + registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + currentUserPermissions: Object.values(Permission), + revisionState: stateInfo.revisionState, + }, 'isPublic'); + await visit(`/${reg.id}/`); + assert.dom('[data-test-state-button]').hasText( + t(`registries.overview.${stateInfo.translationKey}.text`).toString(), + ); + + await click('[data-test-state-button]'); + assert.dom('[data-test-state-admin-actions]').isVisible(); + assert.dom('[data-test-state-description-short]').exists(); + assert.dom('[data-test-state-description-short]').hasText( + t(`registries.overview.${stateInfo.translationKey}.short_description`).toString(), + ); + + assert.dom('[data-test-state-description-long]').hasText( + stripHtmlTags( + t(`registries.overview.${stateInfo.translationKey}.long_description`, { + projectUrl: 'fake.url', + }).toString(), + ), + ); + assert.dom('[data-test-state-icon]').hasClass('fa-eye'); + } + }); + test('non-moderators cannot see moderator top-bar', async assert => { const reg = server.create('registration', { From d8b5559d0ea1ac489c7dbf53ce089263bb661df9 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Mon, 25 Oct 2021 17:31:14 -0400 Subject: [PATCH 6/8] Fix moderator mode tests --- .../addon/components/registries-states/component.ts | 13 +++++++++++-- mirage/views/review-action.ts | 2 ++ .../acceptance/overview/moderator-mode-test.ts | 8 ++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/registries/addon/components/registries-states/component.ts b/lib/registries/addon/components/registries-states/component.ts index eb76d2b4a58..240cee98e24 100644 --- a/lib/registries/addon/components/registries-states/component.ts +++ b/lib/registries/addon/components/registries-states/component.ts @@ -58,8 +58,17 @@ export default class RegistriesStates extends Component { stateKey = 'pendingRegistrationApproval'; } else if (this.registration.pendingEmbargoApproval) { stateKey = 'pendingEmbargoApproval'; - } else if (this.registration.revisionState !== RevisionReviewStates.Approved) { - stateKey = camelize(this.registration.revisionState); + } else if ( + [ + RegistrationReviewStates.Embargo, + RegistrationReviewStates.Accepted, + ].includes(this.registration.reviewsState) + ) { + if (this.registration.revisionState !== RevisionReviewStates.Approved) { + stateKey = camelize(this.registration.revisionState); + } else { + stateKey = camelize(this.registration.reviewsState); + } } else { stateKey = camelize(this.registration.reviewsState); } diff --git a/mirage/views/review-action.ts b/mirage/views/review-action.ts index d2d4c7ef2e4..37407f46a99 100644 --- a/mirage/views/review-action.ts +++ b/mirage/views/review-action.ts @@ -1,6 +1,7 @@ import { HandlerContext, NormalizedRequestAttrs, Request, Schema } from 'ember-cli-mirage'; import { RegistrationReviewStates } from 'ember-osf-web/models/registration'; import ReviewActionModel, { ReviewActionTrigger } from 'ember-osf-web/models/review-action'; +import { RevisionReviewStates } from 'ember-osf-web/models/schema-response'; export function createReviewAction(this: HandlerContext, schema: Schema, request: Request) { const attrs = this.normalizedRequestAttrs('review-action') as Partial>; @@ -22,6 +23,7 @@ export function createReviewAction(this: HandlerContext, schema: Schema, request case ReviewActionTrigger.AcceptSubmission: case ReviewActionTrigger.RejectWithdrawal: registration.reviewsState = RegistrationReviewStates.Accepted; + registration.revisionState = RevisionReviewStates.Approved; break; case ReviewActionTrigger.RejectSubmission: registration.reviewsState = RegistrationReviewStates.Rejected; diff --git a/tests/engines/registries/acceptance/overview/moderator-mode-test.ts b/tests/engines/registries/acceptance/overview/moderator-mode-test.ts index f0b4ea8f065..b0f9ee34f6b 100644 --- a/tests/engines/registries/acceptance/overview/moderator-mode-test.ts +++ b/tests/engines/registries/acceptance/overview/moderator-mode-test.ts @@ -38,6 +38,7 @@ module('Registries | Acceptance | overview.moderator-mode', hooks => { const registration = server.create('registration', { currentUserPermissions: Object.values(Permission), registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + revisionState: RevisionReviewStates.RevisionPendingModeration, provider: this.provider, id: 'stayc', }, 'isPending', 'withReviewActions'); @@ -86,6 +87,7 @@ module('Registries | Acceptance | overview.moderator-mode', hooks => { const registration = server.create('registration', { currentUserPermissions: Object.values(Permission), registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + revisionState: RevisionReviewStates.RevisionPendingModeration, provider: this.provider, id: 'stayc', }, 'isPending', 'withReviewActions'); @@ -107,6 +109,7 @@ module('Registries | Acceptance | overview.moderator-mode', hooks => { const registration = server.create('registration', { currentUserPermissions: Object.values(Permission), registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + revisionState: RevisionReviewStates.Approved, provider: this.provider, id: 'stayc', }, 'isPendingWithdrawRequest', 'withReviewActions'); @@ -144,6 +147,7 @@ module('Registries | Acceptance | overview.moderator-mode', hooks => { const registration = server.create('registration', { currentUserPermissions: Object.values(Permission), registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + revisionState: RevisionReviewStates.Approved, provider: this.provider, id: 'stayc', }, 'isPendingWithdraw', 'withReviewActions'); @@ -185,6 +189,7 @@ module('Registries | Acceptance | overview.moderator-mode', hooks => { const registration = server.create('registration', { currentUserPermissions: Object.values(Permission), registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + revisionState: RevisionReviewStates.Approved, provider: this.provider, id: 'stayc', }, 'isPendingWithdraw', 'withReviewActions'); @@ -209,6 +214,7 @@ module('Registries | Acceptance | overview.moderator-mode', hooks => { const registration = server.create('registration', { currentUserPermissions: Object.values(Permission), registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + revisionState: RevisionReviewStates.Approved, provider: this.provider, id: 'stayc', }, 'isPublic', 'withReviewActions'); @@ -247,6 +253,7 @@ module('Registries | Acceptance | overview.moderator-mode', hooks => { const registration = server.create('registration', { currentUserPermissions: Object.values(Permission), registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + revisionState: RevisionReviewStates.Approved, provider: this.provider, id: 'stayc', }, 'isEmbargo', 'withReviewActions'); @@ -289,6 +296,7 @@ module('Registries | Acceptance | overview.moderator-mode', hooks => { const registration = server.create('registration', { currentUserPermissions: Object.values(Permission), registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'), + revisionState: RevisionReviewStates.Approved, provider: this.provider, id: 'stayc', }, 'isPendingEmbargoTermination', 'withReviewActions'); From e56c9588ba6b5b01328b596c368b83db04bff59d Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Mon, 25 Oct 2021 20:07:31 -0400 Subject: [PATCH 7/8] Revert uunneeded pdate-label logic changes --- .../registries/update-dropdown/update-label/component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/osf-components/addon/components/registries/update-dropdown/update-label/component.ts b/lib/osf-components/addon/components/registries/update-dropdown/update-label/component.ts index f1b34e657fc..981434431de 100644 --- a/lib/osf-components/addon/components/registries/update-dropdown/update-label/component.ts +++ b/lib/osf-components/addon/components/registries/update-dropdown/update-label/component.ts @@ -13,13 +13,12 @@ export default class UpdateLabel extends Component { get label() { const { totalRevisions, index } = this.args; const revisionNumber = totalRevisions - index; - let labelString = this.intl.t('registries.update_dropdown.updates_list_label', { revisionNumber }); if (index === totalRevisions) { - labelString = this.intl.t('registries.update_dropdown.updates_list_label_original'); + return this.intl.t('registries.update_dropdown.updates_list_label_original'); } if (index === 0) { - labelString = this.intl.t('registries.update_dropdown.latest'); + return this.intl.t('registries.update_dropdown.latest'); } - return labelString; + return this.intl.t('registries.update_dropdown.updates_list_label', { revisionNumber }); } } From 6984ccf9da9ddbb2cdd47f878a03e7d19fd6c154 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Fri, 29 Oct 2021 13:34:14 -0400 Subject: [PATCH 8/8] 50 cents worth of changes --- .../addon/components/registries-states/component.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/registries/addon/components/registries-states/component.ts b/lib/registries/addon/components/registries-states/component.ts index 240cee98e24..e862f4955e6 100644 --- a/lib/registries/addon/components/registries-states/component.ts +++ b/lib/registries/addon/components/registries-states/component.ts @@ -42,13 +42,6 @@ export default class RegistriesStates extends Component { } } - /* eslint-disable max-len */ - @computed( - 'isModeratorMode', 'projectUrl', - 'registration.{embargoEndDate,pendingEmbargoApproval,pendingRegistrationApproval,reviewsState,revisionState,userHasAdminPermission}', - 'stateIcon', - ) - /* eslint-enable max-len */ get stateText() { if (!this.registration || !this.registration.reviewsState || !this.registration.revisionState) { return undefined;