Skip to content

Commit c4e6a8c

Browse files
authored
Additional tweaks for Revision workflow (#1360)
* Wording changes for revision submission toast * Replace bad fix for accessibility color changes * Update test
1 parent a62d10f commit c4e6a8c

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

app/styles/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $brand-warning: #f0ad4e !default;
3131
$brand-danger: #d9534f;
3232

3333
/* overrides with darkened colors for a11y contrast */
34-
$brand-success: darken($brand-success, 20%);
34+
$brand-success: darken($brand-success, 10%);
3535
$brand-info: darken($brand-info, 15%);
3636
// no override needed for brand-warning (will use dark text instead)
3737
$brand-danger: darken($brand-danger, 15%);

lib/osf-components/addon/components/button/styles.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@
5959
}
6060

6161
.CreateButton {
62-
background-color: $brand-success;
62+
background-color: darken($brand-success, 10%);
6363
color: $color-text-white;
6464

6565
&:hover:not([disabled]) {
66-
background-color: darken($brand-success, 15%);
66+
background-color: darken($brand-success, 25%);
6767
}
6868
}
6969

lib/registries/addon/edit-revision/-components/submit-and-decide/component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ export default class SubmitAndDecide extends Component {
5858
});
5959
await schemaResponseAction.save();
6060
await this.revisionManager.revision.reload();
61-
this.toast.success(this.intl.t('registries.edit_revision.review.action_submit_success'));
61+
let successMessage = this.intl.t('registries.edit_revision.review.action_submit_success');
62+
if (actionTrigger === SchemaResponseActionTrigger.SubmitRevision) {
63+
successMessage = this.intl.t('registries.edit_revision.review.submit_success');
64+
}
65+
this.toast.success(successMessage);
6266
} catch (e) {
6367
const errorMessage = this.intl.t('registries.edit_revision.review.action_submit_failed');
6468
captureException(e, { errorMessage });

tests/engines/registries/acceptance/edit-revision/revision-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ module('Registries | Acceptance | registries revision', hooks => {
499499
await visit(`/registries/revisions/${revision.id}/review`);
500500
await click('[data-test-submit-revision]');
501501
assert.dom('#toast-container', document as any).hasTextContaining(t(
502-
'registries.edit_revision.review.action_submit_success',
502+
'registries.edit_revision.review.submit_success',
503503
), 'Toast message shown after initial submit');
504504
assert.dom('[data-test-submit-revision]').doesNotExist('Submit button no longer shown');
505505
assert.dom('[data-test-goto-previous-page]').doesNotExist('There is no turning back from this');

translations/en-us.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,7 @@ registries:
12111211
decision_recorded_notice: 'Decision recorded. Pending decisions from other Admin contributors.'
12121212
pending_admin_notice: 'Pending decisions from admin(s).'
12131213
pending_moderation_notice: 'Pending decisions from moderators.'
1214+
submit_success: 'Submitted for Admin approval'
12141215
action_submit_success: 'Your decision was recorded'
12151216
action_submit_failed: 'Your decision was not recorded'
12161217
non_admin_warning: 'Only admins can submit an update.'

0 commit comments

Comments
 (0)