-
-
+ {{t 'node.registrations.registrations'}}
+ {{#if this.node.userHasReadPermission}}
+
+ {{t 'node.registrations.draft_registrations'}}
+
+ {{/if}}
+
+
-
+
{{#if this.node.userHasReadPermission}}
-
+
-
+
{{/if}}
-
+
{{#if this.node.userHasAdminPermission}}
diff --git a/package.json b/package.json
index fca7fde25e2..b3bb019f129 100644
--- a/package.json
+++ b/package.json
@@ -112,6 +112,7 @@
"ember-ajax": "^5.0.0",
"ember-angle-bracket-invocation-polyfill": "^2.0.2",
"ember-animated": "^0.9.0",
+ "ember-aria-tabs": "^4.0.0",
"ember-auto-import": "^1.11.2",
"ember-bootstrap": "^4.6.3",
"ember-bootstrap-datepicker": "^2.0.9",
diff --git a/tests/acceptance/guid-node/registrations-test.ts b/tests/acceptance/guid-node/registrations-test.ts
index b7677c70982..28039c43f1e 100644
--- a/tests/acceptance/guid-node/registrations-test.ts
+++ b/tests/acceptance/guid-node/registrations-test.ts
@@ -42,7 +42,7 @@ module('Acceptance | guid-node/registrations', hooks => {
'There have been no completed registrations of this project.',
);
- assert.dom('[data-test-registrations-container] a[href="#drafts"]').doesNotExist(
+ assert.dom('[data-test-drafts-tab]').doesNotExist(
'Logged out users cannot access draft registrations tab',
);
});
@@ -91,11 +91,11 @@ module('Acceptance | guid-node/registrations', hooks => {
assert.dom('[data-test-node-card]').exists({ count: 1 }, 'One registration card shown');
- assert.dom('[data-test-registrations-container] a[href="#drafts"]').exists(
+ assert.dom('[data-test-drafts-tab]').exists(
'read-permission contributors can see drafts tab',
);
- await untrackedClick('[data-test-registrations-container] a[href="#drafts"]');
+ await untrackedClick('[data-test-drafts-tab]');
assert.dom('[data-test-registrations-pane]').isNotVisible();
@@ -139,7 +139,7 @@ module('Acceptance | guid-node/registrations', hooks => {
assert.dom('[data-test-node-card]').exists({ count: 1 });
- await untrackedClick('[data-test-registrations-container] a[href="#drafts"]');
+ await untrackedClick('[data-test-drafts-tab]');
assert.dom('[data-test-registrations-pane]').isNotVisible();
assert.dom('[data-test-draft-registrations-pane]').isVisible();
@@ -177,7 +177,7 @@ module('Acceptance | guid-node/registrations', hooks => {
assert.dom('[data-test-new-registration-button]').exists();
- await untrackedClick('[data-test-registrations-container] a[href="#drafts"]');
+ await untrackedClick('[data-test-drafts-tab]');
assert.dom('[data-test-registrations-pane]').isNotVisible();
assert.dom('[data-test-draft-registrations-pane]').isVisible();
@@ -227,7 +227,7 @@ module('Acceptance | guid-node/registrations', hooks => {
assert.dom('[data-test-node-card-body]').includesText(registrationSchemaName);
- await untrackedClick('[data-test-registrations-container] a[href="#drafts"]');
+ await untrackedClick('[data-test-drafts-tab]');
assert.dom('[data-test-registrations-pane]').isNotVisible();
assert.dom('[data-test-draft-registrations-pane]').isVisible();
@@ -272,7 +272,7 @@ module('Acceptance | guid-node/registrations', hooks => {
assert.dom('[data-test-node-card]').includesText(node.title);
- await untrackedClick('[data-test-registrations-container] a[href="#drafts"]');
+ await untrackedClick('[data-test-drafts-tab]');
assert.dom('[data-test-registrations-pane]').isNotVisible();
assert.dom('[data-test-draft-registrations-pane]').isVisible();
@@ -320,7 +320,7 @@ module('Acceptance | guid-node/registrations', hooks => {
assert.dom('[data-test-new-registration-button]').exists({ count: 1 });
- await untrackedClick('[data-test-registrations-container] a[href="#drafts"]');
+ await untrackedClick('[data-test-drafts-tab]');
assert.dom('[data-test-draft-registrations-pane]').isVisible();
@@ -355,7 +355,7 @@ module('Acceptance | guid-node/registrations', hooks => {
assert.dom('[data-test-new-registration-button]').exists({ count: 1 });
- await untrackedClick('[data-test-registrations-container] a[href="#drafts"]');
+ await untrackedClick('[data-test-drafts-tab]');
assert.dom('[data-test-draft-registrations-pane]').isVisible();
diff --git a/yarn.lock b/yarn.lock
index 0407830de5a..5e5ecb111bb 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4328,7 +4328,7 @@ babel-plugin-ember-modules-api-polyfill@^3.2.0:
dependencies:
ember-rfc176-data "^0.3.16"
-babel-plugin-ember-modules-api-polyfill@^3.5.0:
+babel-plugin-ember-modules-api-polyfill@^3.3.0, babel-plugin-ember-modules-api-polyfill@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-3.5.0.tgz#27b6087fac75661f779f32e60f94b14d0e9f6965"
integrity sha512-pJajN/DkQUnStw0Az8c6khVcMQHgzqWr61lLNtVeu0g61LRW0k9jyK7vaedrHDWGe/Qe8sxG5wpiyW9NsMqFzA==
@@ -7929,6 +7929,15 @@ ember-animated@^0.9.0:
ember-maybe-import-regenerator "^0.1.5"
ember-named-arguments-polyfill "^1.0.0"
+ember-aria-tabs@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/ember-aria-tabs/-/ember-aria-tabs-4.0.0.tgz#01f9aaf98468ff21e254fdfaff7747972228cadc"
+ integrity sha512-hqQEXdzUMRA0RD6oMYJfkZzWngZfcFgYFBwbL4WSudBgnPSz0DrJgMtwvys0qjcP0Gs/16Jr1VAUQW8Y//lyQw==
+ dependencies:
+ ember-cached-decorator-polyfill "^0.1.1"
+ ember-cli-babel "7.24.0"
+ ember-cli-htmlbars "^5.3.1"
+
ember-asset-loader@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/ember-asset-loader/-/ember-asset-loader-0.6.1.tgz#2eb81221406164d19127eba5b3d10f908df89a17"
@@ -8061,7 +8070,7 @@ ember-bootstrap@^4.6.3:
silent-error "^1.0.1"
tracked-toolbox "^1.2.1"
-ember-cache-primitive-polyfill@^1.0.0:
+ember-cache-primitive-polyfill@^1.0.0, ember-cache-primitive-polyfill@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ember-cache-primitive-polyfill/-/ember-cache-primitive-polyfill-1.0.1.tgz#a27075443bd87e5af286c1cd8a7df24e3b9f6715"
integrity sha512-hSPcvIKarA8wad2/b6jDd/eU+OtKmi6uP+iYQbzi5TQpjsqV6b4QdRqrLk7ClSRRKBAtdTuutx+m+X+WlEd2lw==
@@ -8071,6 +8080,16 @@ ember-cache-primitive-polyfill@^1.0.0:
ember-compatibility-helpers "^1.2.1"
silent-error "^1.1.1"
+ember-cached-decorator-polyfill@^0.1.1:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/ember-cached-decorator-polyfill/-/ember-cached-decorator-polyfill-0.1.4.tgz#f1e2c65cc78d0d9c4ac0e047e643af477eb85ace"
+ integrity sha512-JOK7kBCWsTVCzmCefK4nr9BACDJk0owt9oIUaVt6Q0UtQ4XeAHmoK5kQ/YtDcxQF1ZevHQFdGhsTR3JLaHNJgA==
+ dependencies:
+ "@glimmer/tracking" "^1.0.4"
+ ember-cache-primitive-polyfill "^1.0.1"
+ ember-cli-babel "^7.21.0"
+ ember-cli-babel-plugin-helpers "^1.1.1"
+
ember-changeset-validations@^3.14.2:
version "3.14.2"
resolved "https://registry.yarnpkg.com/ember-changeset-validations/-/ember-changeset-validations-3.14.2.tgz#bb2a326d03a11d1dc3347c35c455d2e091a88176"
@@ -8113,6 +8132,39 @@ ember-cli-babel-plugin-helpers@^1.0.0, ember-cli-babel-plugin-helpers@^1.1.0, em
resolved "https://registry.yarnpkg.com/ember-cli-babel-plugin-helpers/-/ember-cli-babel-plugin-helpers-1.1.1.tgz#5016b80cdef37036c4282eef2d863e1d73576879"
integrity sha512-sKvOiPNHr5F/60NLd7SFzMpYPte/nnGkq/tMIfXejfKHIhaiIkYFqX8Z9UFTKWLLn+V7NOaby6niNPZUdvKCRw==
+ember-cli-babel@7.24.0:
+ version "7.24.0"
+ resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.24.0.tgz#d58670d0f214c63a46f44f86e7c407799d77fc45"
+ integrity sha512-IpqMqOS1VI2wVLIREdEXG9WG05YBulg20t0K27yl2aBjmShvLMRIodcNiKataTgf/dDiU0EWQBGl7VLBLBkFgQ==
+ dependencies:
+ "@babel/core" "^7.12.0"
+ "@babel/helper-compilation-targets" "^7.12.0"
+ "@babel/plugin-proposal-class-properties" "^7.10.4"
+ "@babel/plugin-proposal-decorators" "^7.10.5"
+ "@babel/plugin-transform-modules-amd" "^7.10.5"
+ "@babel/plugin-transform-runtime" "^7.12.0"
+ "@babel/plugin-transform-typescript" "^7.12.0"
+ "@babel/polyfill" "^7.11.5"
+ "@babel/preset-env" "^7.12.0"
+ "@babel/runtime" "^7.12.0"
+ amd-name-resolver "^1.3.1"
+ babel-plugin-debug-macros "^0.3.4"
+ babel-plugin-ember-data-packages-polyfill "^0.1.2"
+ babel-plugin-ember-modules-api-polyfill "^3.3.0"
+ babel-plugin-module-resolver "^3.2.0"
+ broccoli-babel-transpiler "^7.8.0"
+ broccoli-debug "^0.6.4"
+ broccoli-funnel "^2.0.2"
+ broccoli-source "^2.1.2"
+ clone "^2.1.2"
+ ember-cli-babel-plugin-helpers "^1.1.1"
+ ember-cli-version-checker "^4.1.0"
+ ensure-posix-path "^1.0.2"
+ fixturify-project "^1.10.0"
+ resolve-package-path "^3.1.0"
+ rimraf "^3.0.1"
+ semver "^5.5.0"
+
ember-cli-babel@7.5.0:
version "7.5.0"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.5.0.tgz#af654dcef23630391d2efe85aaa3bdf8b6ca17b7"
From 70b7f6fffd6842d18e77f2a5b95656deae84d3e7 Mon Sep 17 00:00:00 2001
From: "Brian J. Geiger"
Date: Wed, 20 Oct 2021 12:19:51 -0400
Subject: [PATCH 10/27] [ENG-3206] No link if no wiki (#1283)
- Ticket: [ENG-3206](https://openscience.atlassian.net/browse/ENG-3206)
- Feature flag: n/a
## Purpose
Hide the wiki link if there's no wiki on a registration so that we don't have a bad link on the page
## Summary of Changes
1. Add wikiEnabled to model and mirage
2. Use wikiEnabled to determine if we should show the wiki link
3. Test
## Side Effects
No, this is fairly isolated
## QA Notes
To test, make a project, disable its wiki in the settings, and make a registration of that project. Then visit the registration's page to verify that there's no wiki link. Also verify that registrations with wikis have wiki links.
---
app/models/registration.ts | 1 +
lib/registries/addon/overview/template.hbs | 11 +++++++++--
mirage/factories/registration.ts | 1 +
.../registries/acceptance/overview/index-test.ts | 16 +++++++++++++++-
4 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/app/models/registration.ts b/app/models/registration.ts
index 498e6e41e24..94247c50f1d 100644
--- a/app/models/registration.ts
+++ b/app/models/registration.ts
@@ -82,6 +82,7 @@ export default class RegistrationModel extends NodeModel.extend(Validations) {
@attr('fixstring') reviewsState?: RegistrationReviewStates;
@attr('fixstring') iaUrl?: string;
@attr('array') providerSpecificMetadata!: ProviderMetadata[];
+ @attr('boolean') wikiEnabled!: boolean;
// Write-only attributes
@attr('array') includedNodeIds?: string[];
diff --git a/lib/registries/addon/overview/template.hbs b/lib/registries/addon/overview/template.hbs
index d60a23c3090..04ff17af53a 100644
--- a/lib/registries/addon/overview/template.hbs
+++ b/lib/registries/addon/overview/template.hbs
@@ -62,8 +62,15 @@
@models={{array this.registration.id}} @icon='home' @label={{t 'registries.overview.title'}} />
-
+ {{#if this.registration.wikiEnabled}}
+
+ {{/if}}
({
registeredFrom: association(),
registeredBy: association(),
reviewsState: RegistrationReviewStates.Accepted,
+ wikiEnabled: true,
index(i: number) {
return i;
diff --git a/tests/engines/registries/acceptance/overview/index-test.ts b/tests/engines/registries/acceptance/overview/index-test.ts
index e5d265e010b..8373cbfe22d 100644
--- a/tests/engines/registries/acceptance/overview/index-test.ts
+++ b/tests/engines/registries/acceptance/overview/index-test.ts
@@ -86,7 +86,7 @@ module('Registries | Acceptance | overview.index', hooks => {
selector: '[data-analytics-name="Files"]',
href: `/${this.registration.id}/files/`,
}, {
- selector: '[data-analytics-name="Wiki"]',
+ selector: '[data-test-wiki-link]',
href: `/${this.registration.id}/wiki/`,
}];
@@ -97,6 +97,20 @@ module('Registries | Acceptance | overview.index', hooks => {
}
});
+ test('wiki link hidden if wiki not enabled', async function(this: OverviewTestContext, assert: Assert){
+ this.set('registration', server.create('registration', {
+ archiving: false,
+ withdrawn: false,
+ wikiEnabled: false,
+ registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'),
+ provider: server.create('registration-provider'),
+ }, 'withContributors', 'currentUserAdmin'));
+
+ await visit(`/${this.registration.id}`);
+
+ assert.dom('[data-test-wiki-link]').doesNotExist('Wiki link hidden because wiki disabled');
+ });
+
test('withdrawn tombstone', async function(this: OverviewTestContext, assert: Assert) {
this.set('registration', server.create('registration', {
registrationSchema: server.schema.registrationSchemas.find('prereg_challenge'),
From 4815771af404db220b384bf9bbdc32ea1ef499c7 Mon Sep 17 00:00:00 2001
From: "Brian J. Geiger"
Date: Tue, 26 Oct 2021 16:05:35 -0400
Subject: [PATCH 11/27] Make registries landing page more accessible (#1284)
- Tickets:
[ENG-3176](https://openscience.atlassian.net/browse/ENG-3176)
[ENG-3177](https://openscience.atlassian.net/browse/ENG-3177)
[ENG-2903](https://openscience.atlassian.net/browse/ENG-2903)
- Feature flag: n/a
## Purpose
Make the registries landing page more accessible. Two of the items from ENG-3176 should have been handled already by ENG-2969 as mentioned in the ticket.
## Summary of Changes
1. Darken 'See more' link color
2. Darken background of registry services section
3. Add aria-labels to the registry services
4. Trace outline of registry service logos in white
5. Remove RIDIE from registry services list
## Side Effects
No, these are pretty isolated, unless the images were being used somewhere else for some reason.
## QA Notes
These just need to be run through the accessibility checks again.
---
.../registries-recent-list/styles.scss | 4 ++++
.../registries-services-list/styles.scss | 6 +-----
.../registries-services-list/template.hbs | 13 ++++---------
.../public/assets/img/index-tool-bg.jpg | Bin 18617 -> 29544 bytes
.../EGAP_evidence_logo_white_0.jpg | Bin 98831 -> 0 bytes
.../EGAP_evidence_logo_white_0.png | Bin 0 -> 100729 bytes
.../assets/img/provider_logos/RIDIE.png | Bin 17575 -> 0 bytes
.../assets/img/provider_logos/prereg.png | Bin 73359 -> 135347 bytes
translations/en-us.yml | 2 ++
9 files changed, 11 insertions(+), 14 deletions(-)
delete mode 100755 lib/registries/public/assets/img/provider_logos/EGAP_evidence_logo_white_0.jpg
create mode 100644 lib/registries/public/assets/img/provider_logos/EGAP_evidence_logo_white_0.png
delete mode 100755 lib/registries/public/assets/img/provider_logos/RIDIE.png
diff --git a/lib/registries/addon/components/registries-recent-list/styles.scss b/lib/registries/addon/components/registries-recent-list/styles.scss
index 6e30377e6b9..15f359afcbf 100644
--- a/lib/registries/addon/components/registries-recent-list/styles.scss
+++ b/lib/registries/addon/components/registries-recent-list/styles.scss
@@ -11,6 +11,10 @@
margin-bottom: 0.5em;
margin-top: 0.5em;
}
+
+ a {
+ color: $color-link-dark;
+ }
}
.SeeMore {
diff --git a/lib/registries/addon/components/registries-services-list/styles.scss b/lib/registries/addon/components/registries-services-list/styles.scss
index 68a5dc47c6c..5bb4391a8ce 100644
--- a/lib/registries/addon/components/registries-services-list/styles.scss
+++ b/lib/registries/addon/components/registries-services-list/styles.scss
@@ -26,12 +26,8 @@
background-repeat: no-repeat;
background-position: center;
- &.provider-ridie {
- background-image: url('img/provider_logos/RIDIE.png');
- }
-
&.provider-egap {
- background-image: url('img/provider_logos/EGAP_evidence_logo_white_0.jpg');
+ background-image: url('img/provider_logos/EGAP_evidence_logo_white_0.png');
}
&.provider-prereg {
diff --git a/lib/registries/addon/components/registries-services-list/template.hbs b/lib/registries/addon/components/registries-services-list/template.hbs
index 6b2ad3e81ea..003418d0d70 100644
--- a/lib/registries/addon/components/registries-services-list/template.hbs
+++ b/lib/registries/addon/components/registries-services-list/template.hbs
@@ -8,18 +8,13 @@