From 50002f93c63c7cdf1efb11d546330cdbc75e4765 Mon Sep 17 00:00:00 2001 From: "Barrett K. Harber" Date: Tue, 31 Jan 2017 15:33:55 -0500 Subject: [PATCH 1/4] Add provider domain information --- docs/osf/preprint_providers.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/osf/preprint_providers.rst b/docs/osf/preprint_providers.rst index 5410336..cf09f99 100644 --- a/docs/osf/preprint_providers.rst +++ b/docs/osf/preprint_providers.rst @@ -9,7 +9,7 @@ New preprint providers must have the following: * A name * A square logo * A rectangular/wide logo -* 3 unique colors +* 3 unique colors (consider contrast ratios for accessibility) * A list of acceptable subjects (taxonomies) * A list of acceptable licenses * Emails for: @@ -51,6 +51,7 @@ You'll need to add a entry to the ``PREPRINT_PROVIDERS`` list in ``scripts/popul 'name': 'provider_name', 'logo_name': 'provider_id-logo.png', 'description': 'The description of the preprint provider', + 'domain': 'provider.org', # Optional 'banner_name': 'provider_id-banner.png', 'external_url': 'http://provider-url.org', 'example': 'abc12', # An example guid for this provider (Will have to be updated after the provider is up) @@ -86,7 +87,7 @@ You'll need to add a entry to the ``PREPRINT_PROVIDERS`` list in ``scripts/popul ], }, -Run the script locally to ensure that it works: ``python -m scripts.populate_preprint_providers``. If it's working, commit the changes +Run the script locally to ensure that it works: ``docker-compose run --rm web python -m scripts.populate_preprint_providers``. If it's working, commit the changes. Put a note in the PR to have others re-run this script. ember-preprints Updates ----------------------- @@ -122,6 +123,7 @@ object to that ``providers`` array. { id: 'provider_id', // This must match the ID in the OSF Repo + domain: 'provider.org', // If not present, you must use http://localhost:5000/preprints/provider logoSharing: { // T path: '/assets/img/provider_logos/provider_id-sharing.png', // The path to the provider's sharing logo type: 'image/png', // The mime type of the image @@ -131,6 +133,7 @@ object to that ``providers`` array. permissionLanguage: 'provider_permission_language' } +If using the provider domain, run ``sudo ./scripts/add-domains.js`` to update your local ``/etc/hosts``. You should be able to restart ember-preprints and go to http://local.provider.org:4200/ Adding permission language to the footer text ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 3ec4114fd8be04d894f0caeadb13a22910e6bcb8 Mon Sep 17 00:00:00 2001 From: "Barrett K. Harber" Date: Wed, 1 Feb 2017 15:34:14 -0500 Subject: [PATCH 2/4] Example fix --- docs/osf/preprint_providers.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/osf/preprint_providers.rst b/docs/osf/preprint_providers.rst index cf09f99..15f04d5 100644 --- a/docs/osf/preprint_providers.rst +++ b/docs/osf/preprint_providers.rst @@ -167,16 +167,16 @@ The basic stylesheet must be named ``app/styles/brands/provider_id.scss`` and co @import 'brand'; @include brand( - #ABCDEF, // Color, theme color #1 (header backgrounds, hover backgrounds) - white, // Color, theme color #2 (text color mostly, usually white or black) - #012345, // Color, theme color #3 (navbar color, preferably a dark color) - #6789AB, // Color, theme color #4 (used in link colors) - black, // Color, theme color #5 (text color that contrasts with #2, usually black or white) - $logo-dir + 'engrxiv-small.png', // String, path to the rectangular provider logo - $logo-dir + 'engrxiv-square-small.png', // String, path to the square provider logo - true, // Boolean, whether to use the white share logo or not - false, // Boolean, whether to use theme color 4 or theme color 2 for the navbar link color - true // Boolean, whether to use the contracts link color (theme color 4) + #ABCDEF, // Color, theme color #1 (header backgrounds, hover backgrounds) + white, // Color, theme color #2 (text color mostly, usually white or black) + #012345, // Color, theme color #3 (navbar color, preferably a dark color) + #6789AB, // Color, theme color #4 (used in link colors) + black, // Color, theme color #5 (text color that contrasts with #2, usually black or white) + $logo-dir + 'provider_id-small.png', // String, path to the rectangular provider logo + $logo-dir + 'provider_id-square-small.png', // String, path to the square provider logo + true, // Boolean, whether to use the white share logo or not + false, // Boolean, whether to use theme color 4 or theme color 2 for the navbar link color + true // Boolean, whether to use the contracts link color (theme color 4) ); // Add any custom styles or overrides here From e7fe0b178164546264cb27399746989c4381b7da Mon Sep 17 00:00:00 2001 From: "Barrett K. Harber" Date: Mon, 13 Feb 2017 12:26:40 -0500 Subject: [PATCH 3/4] Update PR instructions for preprint providers --- docs/osf/preprint_providers.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/osf/preprint_providers.rst b/docs/osf/preprint_providers.rst index 15f04d5..7960954 100644 --- a/docs/osf/preprint_providers.rst +++ b/docs/osf/preprint_providers.rst @@ -185,5 +185,7 @@ You may need to manipulate the colors and options to get them to look good. Avoi Open Pull Requests ------------------ -Open pull requests against osf.io and ember-preprints with your changes. Be sure to cross-reference in the PR description that it requires the other PR. -Add notes for QA that include screenshots of the newly added provider +Open pull requests (PRs) against osf.io and ember-preprints with your changes. Be sure to cross-reference in the PR description that it requires the other PR. +Add notes for QA that include screenshots of the newly added provider. + +In your PR against osf.io, add a section called "Notes for Deployment" with a reminder to request an API key from SHARE. This is necessary, because the provider's preprints will not be indexed by SHARE without the API Key. \ No newline at end of file From e1b559b25fd645ad639ca1783a0ec08b6de45caa Mon Sep 17 00:00:00 2001 From: "Barrett K. Harber" Date: Mon, 13 Mar 2017 11:07:33 -0400 Subject: [PATCH 4/4] Update preprint provider instructions for domains --- docs/osf/preprint_providers.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/osf/preprint_providers.rst b/docs/osf/preprint_providers.rst index c6ff578..eebe0f2 100644 --- a/docs/osf/preprint_providers.rst +++ b/docs/osf/preprint_providers.rst @@ -52,8 +52,9 @@ You'll need to add a entry to the ``PREPRINT_PROVIDERS`` list in ``scripts/popul 'logo_name': 'provider_id-logo.png', 'description': 'The description of the preprint provider', 'banner_name': 'provider_id-banner.png', + 'domain': 'provider.org' # Delete this line and add a comment if not using a domain 'external_url': 'http://provider-url.org', - 'example': 'abc12', # An example guid for this provider (Will have to be updated after the provider is up) + 'example': 'abc12', # An example guid for this provider (Will have to be updated after the provider is up) # Advisory board should be valid html string in triple quotes 'advisory_board': '''
@@ -118,11 +119,14 @@ Adding an entry in the config In ``config/environment.js``, there will be a ``PREPRINTS`` object and a ``providers`` array. You will need to add another object to that ``providers`` array. +If adding a provider domain, you'll need to run ``sudo ./scripts/add-domains.js`` + .. code-block:: javascript { id: 'provider_id', // This must match the ID in the OSF Repo - logoSharing: { // T + domain: 'provider.org', // If using a domain. Otherwise, delete this line + logoSharing: { path: '/assets/img/provider_logos/provider_id-sharing.png', // The path to the provider's sharing logo type: 'image/png', // The mime type of the image width: 1500, // minimum 200, 1500 preferred (this is the width of the image, in pixels) @@ -183,6 +187,7 @@ You may need to manipulate the colors and options to get them to look good. Avoi Open Pull Requests ------------------ Open pull requests against osf.io and ember-preprints with your changes. Be sure to cross-reference in the PR description that it requires the other PR. +If the PR includes adding a domain, Add a "Notes for Reviewers" section with a reminder to run the add-domains script. Add notes for QA that include screenshots of the newly added provider In your PR against osf.io, add a section called "Notes for Deployment" with a reminder to request an API key from SHARE. This is necessary, because the provider's preprints will not be indexed by SHARE without the API Key. @@ -210,3 +215,7 @@ Resources To Provide 2. The default, black and colored logo images (if available). 3. Preferred CSS background color: the main background color of the home page. 4. OSF domain and external domain: e.g. ``osf.io/preprints/psyarxiv/`` and ``preprints.psyarxiv.org/`` + +DevOps +====== +If the provider is using a domain, create a DevOps ticket to update the proxy redirects and for them to contact the domain admin to get the domain pointed at the correct IP address. Include the contact information from the product team.