diff --git a/.editorconfig b/.editorconfig index ed0175c31..e7ceb3f17 100644 --- a/.editorconfig +++ b/.editorconfig @@ -23,6 +23,6 @@ insert_final_newline = false [*.{diff,md}] trim_trailing_whitespace = false -[{package.json,.travis.yml}] +[{package.json}] indent_style = space indent_size = 2 diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 000000000..c14fbfbe0 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,50 @@ +name: CI + +on: + pull_request: + push: + branches: + - develop + - master + - 'release/*' + - 'hotfix/*' +env: + CI: true + +jobs: + fetch-dependencies: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'skip ci')" + steps: + - uses: actions/checkout@v2 + - uses: volta-cli/action@v1 + - name: fetch and cache npm dependencies + id: cache-node-modules + uses: actions/cache@v2 + with: + path: ./node_modules + key: cached_node_modules_${{ hashFiles('**/yarn.lock') }} + restore-keys: cached_node_modules_ + - if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: yarn --prefer-offline --frozen-lockfile --ignore-engines + + test-with-coverage: + runs-on: ubuntu-latest + needs: fetch-dependencies + timeout-minutes: 10 + steps: + - uses: actions/checkout@v2 + - uses: volta-cli/action@v1 + - id: cache-node-modules + uses: actions/cache@v2 + with: + path: ./node_modules + key: cached_node_modules_${{ hashFiles('**/yarn.lock') }} + restore-keys: cached_node_modules_ + + - run: yarn bower install --config.interactive=false + - run: yarn test:cover + - name: Send coverage report to coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 16815fee0..ab29c4752 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,8 @@ /libpeerconnection.log npm-debug.log testem.log +.yalc +yalc.lock # idea .idea diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6b7bdf97c..000000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: node_js - -sudo: required -dist: trusty -addons: - chrome: stable - firefox: latest - -env: - global: - - SUPPRESS_NO_CONFIG_WARNING=true - -cache: - yarn: true - directories: - - node_modules - - $HOME/.cache # includes bowers cache - -install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - - yarn --prefer-offline --frozen-lockfile --ignore-engines - - ./node_modules/.bin/bower install --config.interactive=false - -script: - - yarn test:cover - -after_success: - - cat ./coverage/lcov.info | ./node_modules/.bin/coveralls diff --git a/CHANGELOG.md b/CHANGELOG.md index ea6209587..bb97b669b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,530 +1,741 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.137.0] - 2021-10-19 + +### Fixed +- Accessibility fixes + +### Changed +- Switch to Github Actions for CI + ## [0.136.0] - 2021-05-10 + ### Fixed -- Show users full name (including middle name) for preprints detail page + +- Show users full name (including middle name) for preprints detail page ## [0.135.0] - 2021-04-26 + ### Changed -- email validation regex to remove hard-coded allowed domains and use a more generalized email validation regex + +- email validation regex to remove hard-coded allowed domains and use a more generalized email validation regex ## [0.134.1] - 2021-03-30 + ### Fixed -- `withdrawal.pre_moderation_notice_accepted` language typo + +- `withdrawal.pre_moderation_notice_accepted` language typo ## [0.134.0] - 2021-03-30 + ### Changed -- Update preprint withdrawal language + +- Update preprint withdrawal language ## [0.133.3] - 2020-10-08 + ### Fixed -- preprints/hypothes.is integration in Chrome + +- preprints/hypothes.is integration in Chrome ## [0.133.2] - 2020-09-22 + ### Fixed -- wrong placeholder text for 'no' prereg links - sloan author assertions + +- wrong placeholder text for 'no' prereg links - sloan author assertions ## [0.133.1] - 2020-09-15 + ### Fixed -- only show providers that allow submissions on preprint submit page + +- only show providers that allow submissions on preprint submit page ## [0.133.0] - 2020-09-09 + ### Fixed -- broken user gravatar + +- broken user gravatar ### Added -- test selectors to sloan fields + +- test selectors to sloan fields ## [0.132.3] - 2020-07-22 + ### Removed -- Keen analytics logging + +- Keen analytics logging ## [0.132.2] - 2020-07-15 + ### Changed -- Update assets + +- Update assets ## [0.132.1] - 2020-07-14 + ### Changed -- Update assets + +- Update assets ## [0.132.0] - 2020-06-03 + ### Added -- support for `public data links` and `preregistration links` (Sloan Phase II) + +- support for `public data links` and `preregistration links` (Sloan Phase II) ## [0.131.3] - 2020-05-06 + ### Changed -- Update assets + +- Update assets ## [0.131.2] - 2020-05-05 + ### Changed -- Update assets + +- Update assets ## [0.131.1] - 2020-04-20 + ### Changed -- Upgrade ember-osf to `0.30.1` + +- Upgrade ember-osf to `0.30.1` ## [0.131.0] - 2020-04-20 + ### Added -- Sloan COI input and display -- pin node@10.18.1 and yarn@1.21.1 with volta + +- Sloan COI input and display +- pin node@10.18.1 and yarn@1.21.1 with volta ### Changed -- Configure nvm to to use Node 10. + +- Configure nvm to to use Node 10. ## [0.130.4] - 2020-03-27 + ## Changed -- update assets + +- update assets ## [0.130.3] - 2020-02-14 + ## Fixed -- add `swiss` to list of TLDs in email regex in unregistered-contributor-form component + +- add `swiss` to list of TLDs in email regex in unregistered-contributor-form component ## [0.130.2] - 2020-01-03 + ## Fixed -- removed errant text regarding updated preprint file needing to have the same name + +- removed errant text regarding updated preprint file needing to have the same name ## [0.130.1] - 2020-01-02 + ### Changed -- skip probalistic file uploader tests + +- skip probalistic file uploader tests ## [0.130.0] - 2019-12-27 + ## Changed -- enable uploading of a preprint with different name and extension -- remove `whiteListedProviders` from the config since it now comes from the API -- remove the upload bar on preprints submission unless the file is in the process of being uploaded -- add beta label to Chronos widget -- add waffle for Chronos widget -- use ember-osf@0.27.0 + +- enable uploading of a preprint with different name and extension +- remove `whiteListedProviders` from the config since it now comes from the API +- remove the upload bar on preprints submission unless the file is in the process of being uploaded +- add beta label to Chronos widget +- add waffle for Chronos widget +- use ember-osf@0.27.0 ## Fixed -- do not close panel after preupload + +- do not close panel after preupload ## [0.129.1] - 2019-12-23 + ### Changed -- update assets + +- update assets ## [0.129.0] - 2019-11-04 -- add Plaudit widget and use on overview page after meta tags are ready -- update language and link for product roadmap link + +- add Plaudit widget and use on overview page after meta tags are ready +- update language and link for product roadmap link ## [0.128.0] - 2019-07-30 + ## Changed -- use ember-osf@0.26.0 -- add version as custom dimension 5 + +- use ember-osf@0.26.0 +- add version as custom dimension 5 ## [0.127.0] - 2019-07-25 + ## Changed -- use ember-osf@0.25.0 -- modify preprint status banner to show corresponding statuses and reviewer comments -- synchronize chronos-submission status when user clicks the expand button + +- use ember-osf@0.25.0 +- modify preprint status banner to show corresponding statuses and reviewer comments +- synchronize chronos-submission status when user clicks the expand button ## [0.126.1] - 2019-07-02 + ### Fixed -- use ember-osf@0.24.3 to get fix for support links + +- use ember-osf@0.24.3 to get fix for support links ## [0.126.0] - 2019-06-25 -- make preprint withdrawal request explanation required -- Chronos - - only attempt to show the Chronos link when it is present - - fix: clicking 'Cancel' after journal selection makes dropdown unusable - - fix: filtering on journal title does not work + +- make preprint withdrawal request explanation required +- Chronos + - only attempt to show the Chronos link when it is present + - fix: clicking 'Cancel' after journal selection makes dropdown unusable + - fix: filtering on journal title does not work ## [0.125.4] - 2019-06-20 + ### Changed -- update assets + +- update assets ## [0.125.3] - 2019-06-06 + ### Changed -- update assets + +- update assets ## [0.125.2] - 2019-05-08 + ### Fixed -- use ember-osf@0.24.2 to get fix for hypothesis postMessage callback + +- use ember-osf@0.24.2 to get fix for hypothesis postMessage callback ## [0.125.1] - 2019-05-02 + ### Fixed -- use ember-osf@0.24.1 to get fix for hypothesis postMessage and non-US preprints + +- use ember-osf@0.24.1 to get fix for hypothesis postMessage and non-US preprints ## [0.125.0] - 2019-04-10 + ### Added -- Chronos submission -- Preprint withdrawals + +- Chronos submission +- Preprint withdrawals ## [0.124.2] - 2019-04-08 + ### Fixed -- make sure there are no line breaks or extra spaces in author list + +- make sure there are no line breaks or extra spaces in author list ## [0.124.1] - 2019-03-19 + ### Changed -- update assets + +- update assets ## [0.124.0] - 2019-03-04 + ### Removed -- Remove margin hack to fix navbar on smaller screens -- Claim unregistered contributor + +- Remove margin hack to fix navbar on smaller screens +- Claim unregistered contributor ### Changed -- Moved some navbar styling to `osf-style` -- Added service:current-user to submit controller and preprint-status-banner unit test needs -- Upgraded to ember-osf@0.23.0 -- Upgraded to osf-style@1.9.0 + +- Moved some navbar styling to `osf-style` +- Added service:current-user to submit controller and preprint-status-banner unit test needs +- Upgraded to ember-osf@0.23.0 +- Upgraded to osf-style@1.9.0 ### Fixed -- 401 error on landing page -- API unavailable message not displaying when API is unavailable -- Preprints rendering from correct region -- Correct "Created on" date for moderated Preprints + +- 401 error on landing page +- API unavailable message not displaying when API is unavailable +- Preprints rendering from correct region +- Correct "Created on" date for moderated Preprints ## [0.123.4] - 2019-01-31 + ### Changed -- update assets + +- update assets ## [0.123.3] - 2019-01-30 + ### Changed -- always use preprint DOI for `citation_doi` meta tag + +- always use preprint DOI for `citation_doi` meta tag ## [0.123.2] - 2019-01-14 + ### Changed -- update assets + +- update assets ## [0.123.1] - 2018-12-13 + ### Changed -- update to ember-osf@0.22.1 + +- update to ember-osf@0.22.1 ## [0.123.0] - 2018-12-13 + ### Added -- section to attach supplemental projects to preprints on submit page + +- section to attach supplemental projects to preprints on submit page ### Changed -- overhauls to submit/edit preprint form for node-preprint divorce -- preprints are no longer dependent on osf projects -- write contributors can now edit preprints -- upgrade to osf-style@1.8.0 + +- overhauls to submit/edit preprint form for node-preprint divorce +- preprints are no longer dependent on osf projects +- write contributors can now edit preprints +- upgrade to osf-style@1.8.0 ### Removed -- upload choices on preprint form reduced -- removed supplemental files browser/visit project section from preprint detail page + +- upload choices on preprint form reduced +- removed supplemental files browser/visit project section from preprint detail page ## [0.122.6] - 2018-11-21 + ### Changed -- add contributors back to metatags (but only block for prerender) + +- add contributors back to metatags (but only block for prerender) ## [0.122.5] - 2018-11-19 + ### Changed -- fix linting + +- fix linting ## [0.122.4] - 2018-11-19 + ### Changed -- revert 0.122.3 and don't load contribs at all for meta + +- revert 0.122.3 and don't load contribs at all for meta ## [0.122.3] - 2018-11-19 + ### Changed -- don't block render waiting for meta tag data + +- don't block render waiting for meta tag data ## [0.122.2] - 2018-11-09 + ### Changed -- Updated to use latest provider assets + +- Updated to use latest provider assets ## [0.122.1] - 2018-10-10 + ### Changed -- meta tag for Google Scholar indexing + +- meta tag for Google Scholar indexing ## [0.122.0] - 2018-09-20 + ### Added -- add `isWithdrawn` to google anlaytics pageTracking -- ability to download previous preprint (primary file) versions -- contributor query using elastic endpoint -- `My Preprints` link to the branded navbar + +- add `isWithdrawn` to google anlaytics pageTracking +- ability to download previous preprint (primary file) versions +- contributor query using elastic endpoint +- `My Preprints` link to the branded navbar ### Fixed -- word break in license text -- provider name on submit form header + +- word break in license text +- provider name on submit form header ### Removed -- branded footer line-height -- manual sorting of taxonomies -- `My OSF Projects` from the branded navbar + +- branded footer line-height +- manual sorting of taxonomies +- `My OSF Projects` from the branded navbar ## [0.121.1] - 2018-09-14 + ### Fixed -- subject filters breaking page when adding/editing preprints + +- subject filters breaking page when adding/editing preprints ## [0.121.0] - 2018-08-16 + ### Added -- whitelist functionality for discover page -- use of ember-osf `scheduled-banner` component -- selected provider description in the provider carousel -- use of "OSF Preprints" as provider name for OSF preprints instead of "OSF" or "Open Science Framework" -- parameters for `authenticated`, `isPublic` and `resource` to pageView tracking + +- whitelist functionality for discover page +- use of ember-osf `scheduled-banner` component +- selected provider description in the provider carousel +- use of "OSF Preprints" as provider name for OSF preprints instead of "OSF" or "Open Science Framework" +- parameters for `authenticated`, `isPublic` and `resource` to pageView tracking ### Changed -- update preprint submission page language -- sharing from the preprint detail view to use ember-osf sharing icons -- environment check in `config/environment` + +- update preprint submission page language +- sharing from the preprint detail view to use ember-osf sharing icons +- environment check in `config/environment` ### Fixed -- preprint service select carousel redraw -- correctly show parent projects in the "Choose project" dropdown + +- preprint service select carousel redraw +- correctly show parent projects in the "Choose project" dropdown ### Removed -- logic related to updating the node's license + +- logic related to updating the node's license ## [0.120.2] - 2018-08-03 + ### Fixed -- discover page loading bug + +- discover page loading bug ## [0.120.1] - 2018-07-27 + ### Fixed -- IE/Edge preprint error + +- IE/Edge preprint error ## [0.120.0] - 2018-07-26 + ### Added -- Unified solution for preprint words -- `cookie-banner` component to main application page + +- Unified solution for preprint words +- `cookie-banner` component to main application page ### Changed -- Styling and format of the branded navbar to match current styling in ember-osf -- Reduced number of calls to the `preprints_provider` endpoint -- Update preprints to work with a new unified version of ember-osf (works with both preprints and reviews apps) -- Update preprints to use ember-cli@2.18 + +- Styling and format of the branded navbar to match current styling in ember-osf +- Reduced number of calls to the `preprints_provider` endpoint +- Update preprints to work with a new unified version of ember-osf (works with both preprints and reviews apps) +- Update preprints to use ember-cli@2.18 ## [0.119.0] - 2018-07-16 + ### Added -- Hypothes.is commenting toggle + +- Hypothes.is commenting toggle ## [0.118.8] - 2018-07-11 + ### Changed -- Updated to use latest provider assets + +- Updated to use latest provider assets ## [0.118.7] - 2018-06-21 + ### Added -- `anonymizeIp: true` in GA config to anonymize sender IP. + +- `anonymizeIp: true` in GA config to anonymize sender IP. ## [0.118.6] - 2018-06-19 + ### Changed -- Updated to use latest provider assets + +- Updated to use latest provider assets ## [0.118.5] - 2018-04-27 + ### Changed -- Updated to use latest provider assets + +- Updated to use latest provider assets ## [0.118.4] - 2018-04-05 + ### Fixed -- Automatic opening of upload section on branded provider submit page + +- Automatic opening of upload section on branded provider submit page ### Removed -- Unused image code + +- Unused image code ## [0.118.3] - 2018-03-12 + ### Added -- Event Tracking to `Select a Preprint Provider` on preprint upload + +- Event Tracking to `Select a Preprint Provider` on preprint upload ### Changed -- Restricted width and centered preprint provider logos on index page + +- Restricted width and centered preprint provider logos on index page ## [0.118.2] - 2018-03-08 + ### Removed -- Ability to search by social fields (reverted) + +- Ability to search by social fields (reverted) ## [0.118.1] - 2018-03-06 + ### Fixed -- Provider assets on production + +- Provider assets on production ## [0.118.0] - 2018-03-06 + ### Added -- Default auto-expansion on top level subjects when there are no more than 3 -- Check to use `facebookAppId` if branded providers have an app id -- Choose preprint provider during unbranded submission -- `unicode-byte-truncate` as a dependency + +- Default auto-expansion on top level subjects when there are no more than 3 +- Check to use `facebookAppId` if branded providers have an app id +- Choose preprint provider during unbranded submission +- `unicode-byte-truncate` as a dependency ### Changed -- 'Powered by Preprints' link stay on current server -- Searching for contributors also searches their social links (such as their twitter handle) -- Use newly added `name` field for preprint detail page contributors -- `preprint-form-project-select` component to use `lazy-options` for lazy loading user nodes -- To pull more data from the preprint model instead of the node model (`title`, `description`, `tags`, etc.) + +- 'Powered by Preprints' link stay on current server +- Searching for contributors also searches their social links (such as their twitter handle) +- Use newly added `name` field for preprint detail page contributors +- `preprint-form-project-select` component to use `lazy-options` for lazy loading user nodes +- To pull more data from the preprint model instead of the node model (`title`, `description`, `tags`, etc.) ### Fixed -- Skipped tests in `convert-or-copy-project-test` and `supplementary-file-browser` to run properly -- Unicode truncating for LinkedIn sharing using `unicode-byte-truncate` + +- Skipped tests in `convert-or-copy-project-test` and `supplementary-file-browser` to run properly +- Unicode truncating for LinkedIn sharing using `unicode-byte-truncate` ## [0.117.5] - 2018-02-22 + ### Changed -- Update to latest provider assets + +- Update to latest provider assets ## [0.117.4] - 2018-02-21 + ### Fixed -- Increase taxonomies page size from 100 to 150 + +- Increase taxonomies page size from 100 to 150 ## [0.117.3] - 2018-02-20 + ### Changed -- Warning modal on submit page to only show after changes have been made -- Improve the appearance of the preprint provider logos on the OSFPreprints landing page + +- Warning modal on submit page to only show after changes have been made +- Improve the appearance of the preprint provider logos on the OSFPreprints landing page ## [0.117.2] - 2018-02-09 + ### Changed -- Also fingerprint .ico files -- Update to latest provider assets + +- Also fingerprint .ico files +- Update to latest provider assets ## [0.117.1] - 2018-02-09 + ### Added -- Exclusion for livedata provider on index page template + +- Exclusion for livedata provider on index page template ## [0.117.0] - 2018-02-09 + ### Added -- Auto-expansion on selected subjects on the Discover page -- `noscript` message if JavaScript is disabled -- Favicons are updated to reflect their provider, on a branded domain or on a /preprints/provider page -- DOI message, used on the preprint detail page to show users when they will have a DOI for their preprint. -- Show a message on detail page when a DOI is created but not yet minted that it takes up to 24 hours to be minted. -- Original Publication Date is added to preprint. -- Confirmation message when user tries to reload or navigate away from the preprint submission page after adding/selecting a node -- `Computed` to check if there has been user changes on the discipline field on the preprint submission/edit form -- Translations for `Browse by featured subjects`, `Browse by subjects`, and `Browse by providers` -- Add to `computed` to prevent redirect at any point on preprint submission - -### Changed -- Update to ember-osf 0.14.0 -- Update to use model.queryHasMany in place of model.query -- Update tests to work with model.queryHasMany -- Get pagination info directly from meta in preprint-form-authors component -- Check for `has_highlighted_subjects` flag to determine what wording should be used on index page -- Use flexbox to show all provider logos in pretty rows + +- Auto-expansion on selected subjects on the Discover page +- `noscript` message if JavaScript is disabled +- Favicons are updated to reflect their provider, on a branded domain or on a /preprints/provider page +- DOI message, used on the preprint detail page to show users when they will have a DOI for their preprint. +- Show a message on detail page when a DOI is created but not yet minted that it takes up to 24 hours to be minted. +- Original Publication Date is added to preprint. +- Confirmation message when user tries to reload or navigate away from the preprint submission page after adding/selecting a node +- `Computed` to check if there has been user changes on the discipline field on the preprint submission/edit form +- Translations for `Browse by featured subjects`, `Browse by subjects`, and `Browse by providers` +- Add to `computed` to prevent redirect at any point on preprint submission + +### Changed + +- Update to ember-osf 0.14.0 +- Update to use model.queryHasMany in place of model.query +- Update tests to work with model.queryHasMany +- Get pagination info directly from meta in preprint-form-authors component +- Check for `has_highlighted_subjects` flag to determine what wording should be used on index page +- Use flexbox to show all provider logos in pretty rows ## [0.116.4] - 2018-01-29 + ### Changed -- Updated to latest branded provider assets + +- Updated to latest branded provider assets ## [0.116.3] - 2018-01-12 + ### Added -- return true to content/index route didTransition so it bubbles to application didTransition (fix for prerender) + +- return true to content/index route didTransition so it bubbles to application didTransition (fix for prerender) ## [0.116.2] - 2018-01-11 + ### Changed -- Updated to latest branded provider assets + +- Updated to latest branded provider assets ## [0.116.1] - 2018-01-11 + ### Changed -- Update CHANGELOG to reflect 0.116.0 release + +- Update CHANGELOG to reflect 0.116.0 release ## [0.116.0] - 2018-01-10 + ### Added -- Headless Firefox + +- Headless Firefox ### Changed -- Use yarn --frozen-lockfile instead of --pure-lockfile -- Use COS ember-base image and multi-stage build - - Notify DevOps prior to merging into master to update Jenkins -- Wording on `Edit preprint` button to `Edit and resubmit` on preprint detail page if the preprint is rejected - and the workflow is pre-moderation. -- Removed footer styling -- Updated `meta.total` to `meta.total_pages` in preprint-form-authors component -- Modified `preprint-status-banner` component for review action rename. -- Update to ember-osf@0.13.0 + +- Use yarn --frozen-lockfile instead of --pure-lockfile +- Use COS ember-base image and multi-stage build + - Notify DevOps prior to merging into master to update Jenkins +- Wording on `Edit preprint` button to `Edit and resubmit` on preprint detail page if the preprint is rejected + and the workflow is pre-moderation. +- Removed footer styling +- Updated `meta.total` to `meta.total_pages` in preprint-form-authors component +- Modified `preprint-status-banner` component for review action rename. +- Update to ember-osf@0.13.0 ### Fixed -- component integration tests to work in Firefox - - provider-carousel - - search-facet-taxonomy -- CSS contrast issue for support email link on some branded provider error pages. -- `og:image` meta tag for OSF Preprint refer to incorrect asset - - Removed `providers` list in `environment.js` + +- component integration tests to work in Firefox + - provider-carousel + - search-facet-taxonomy +- CSS contrast issue for support email link on some branded provider error pages. +- `og:image` meta tag for OSF Preprint refer to incorrect asset + - Removed `providers` list in `environment.js` ### Removed -- `validated-input` component is moved to ember-osf repo + +- `validated-input` component is moved to ember-osf repo ## [0.115.9] - 2017-12-19 + ### Added -- Settings for prerender + +- Settings for prerender ## [0.115.8] - 2017-12-07 + ### Added -- Donate button to branded navbar + +- Donate button to branded navbar ### Changed -- Removed conditional to show donate banner on branded preprints + +- Removed conditional to show donate banner on branded preprints ## [0.115.7] - 2017-12-05 + ### Changed -- For unbranded preprints, use advisor board from API rather than hard-coded + +- For unbranded preprints, use advisor board from API rather than hard-coded ## [0.115.6] - 2017-12-04 + ### Changed -- Update to ember-osf@0.12.4 + +- Update to ember-osf@0.12.4 ## [0.115.5] - 2017-11-29 + ### Changed -- Update to ember-osf@0.12.3 + +- Update to ember-osf@0.12.3 ## [0.115.4] - 2017-11-29 + ### Changed -- Update to ember-osf@0.12.2 + +- Update to ember-osf@0.12.2 ## [0.115.3] - 2017-11-21 + ### Changed -- Update to ember-osf@0.12.1 + +- Update to ember-osf@0.12.1 ## [0.115.2] - 2017-11-15 + ## Changed -- Update preprint provider assets submodule + +- Update preprint provider assets submodule ## [0.115.1] - 2017-11-07 + ## Changed -- ASU LiveData id from `asu` to `livedata` in search-facet-provider and provider-carousel -- Update preprint provider assets submodule + +- ASU LiveData id from `asu` to `livedata` in search-facet-provider and provider-carousel +- Update preprint provider assets submodule ## [0.115.0] - 2017-10-27 + ### Added -- `preprint-status-banner` component, used on the preprint detail page to show contributors the state of their preprint in a reviews workflow -- "My Reviewing" link in navbar, if the user is a moderator for a preprint provider + +- `preprint-status-banner` component, used on the preprint detail page to show contributors the state of their preprint in a reviews workflow +- "My Reviewing" link in navbar, if the user is a moderator for a preprint provider ### Changed -- Update submit/edit page to support reviews workflows - - Update language depending on the provider's workflow - - Create `action` on preprint submission, instead of setting `is_published: true` + +- Update submit/edit page to support reviews workflows + - Update language depending on the provider's workflow + - Create `action` on preprint submission, instead of setting `is_published: true` ## [0.114.5] - 2017-10-26 + ### Changed -- Update to ember-osf@0.11.4 + +- Update to ember-osf@0.11.4 ## [0.114.4] - 2017-10-25 + ### Changed -- Update to ember-osf@0.11.3 + +- Update to ember-osf@0.11.3 ## [0.114.3] - 2017-10-20 + ### Added -- hotfix script + +- hotfix script ### Changed -- Improve update-assets-hotfix script -- Update assets + +- Improve update-assets-hotfix script +- Update assets ## [0.114.2] - 2017-10-17 + ### Changed -- Update cdn to use ember.js version 2.8.3 + +- Update cdn to use ember.js version 2.8.3 ## [0.114.1] - 2017-10-16 + ### Changed -- Discover page locked parameters to "type: preprints" or "source: Thesis Commons" + +- Discover page locked parameters to "type: preprints" or "source: Thesis Commons" ## [0.114.0] - 2017-10-11 + ### Added -- Dockerfile-alpine for small production builds -- Testem flag to Chrome for no sandbox + +- Dockerfile-alpine for small production builds +- Testem flag to Chrome for no sandbox ### Changed -- Check provider route slugs against the preprint provider API instead of a hard-coded list -- Use `shareSource` attribute from preprint provider in faceted search -- Pass `whiteListedProviders` to discover page component -- Load osf-style via NPM -- Get the sentryDSN from the ember config -- Point Bower to new Bower registry (https://registry.bower.io) -- Update to @centerforopenscience/ember-osf@0.11.0 + +- Check provider route slugs against the preprint provider API instead of a hard-coded list +- Use `shareSource` attribute from preprint provider in faceted search +- Pass `whiteListedProviders` to discover page component +- Load osf-style via NPM +- Get the sentryDSN from the ember config +- Point Bower to new Bower registry (https://registry.bower.io) +- Update to @centerforopenscience/ember-osf@0.11.0 ### Removed -- arXiv license permission language -- Branded provider list from config + +- arXiv license permission language +- Branded provider list from config diff --git a/README.md b/README.md index 98a9df86e..bfd95f4eb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # ember-osf-preprints -`master` Build Status: [![Build Status](https://travis-ci.org/CenterForOpenScience/ember-osf-preprints.svg?branch=master)](https://travis-ci.org/CenterForOpenScience/ember-osf-preprints) +`master` Build Status: ![Master Build Status](https://github.com/CenterForOpenScience/ember-osf-preprints/workflows/CI/badge.svg?branch=master) -`develop` Build Status: [![Build Status](https://travis-ci.org/CenterForOpenScience/ember-osf-preprints.svg?branch=develop)](https://travis-ci.org/CenterForOpenScience/ember-osf-preprints) +`develop` Build Status: ![Develop Build Status](https://github.com/CenterForOpenScience/ember-osf-preprints/workflows/CI/badge.svg?branch=develop) [![Coverage Status](https://coveralls.io/repos/github/CenterForOpenScience/ember-osf-preprints/badge.svg?branch=develop)](https://coveralls.io/github/CenterForOpenScience/ember-osf-preprints?branch=develop) @@ -13,18 +13,18 @@ This guide will help you get started if you're interested. You will need the following things properly installed on your computer. -* [Git](http://git-scm.com/) -* [Node.js](http://nodejs.org/) (preferably via [nvm](https://github.com/creationix/nvm#install-script)) -* [Yarn](https://yarnpkg.com/) -* [Bower](http://bower.io/) -* [Ember CLI](http://ember-cli.com/) +- [Git](http://git-scm.com/) +- [Node.js](http://nodejs.org/) (preferably via [nvm](https://github.com/creationix/nvm#install-script)) +- [Yarn](https://yarnpkg.com/) +- [Bower](http://bower.io/) +- [Ember CLI](http://ember-cli.com/) ## Installation -* `git clone` this repository - * To pull in local preprint provider assets as well, use `git clone --recursive` instead (assuming you are using git >= 1.6.5). -* `yarn install --frozen-lockfile` -* `bower install` +- `git clone` this repository + - To pull in local preprint provider assets as well, use `git clone --recursive` instead (assuming you are using git >= 1.6.5). +- `yarn install --frozen-lockfile` +- `bower install` ## Preprint Provider Assets @@ -35,70 +35,75 @@ If you will be using local preprint provider assets (rather than the CDN): ### Updating Assets -* To refresh your local assets, run: `git submodule update` -* To update the assets submodule to the latest assets, run: `npm run update-assets` -* To update to the latest assets and create a hotfix, run: `npm run updates-assets-hotfix` +- To refresh your local assets, run: `git submodule update` +- To update the assets submodule to the latest assets, run: `npm run update-assets` +- To update to the latest assets and create a hotfix, run: `npm run updates-assets-hotfix` ## Running / Development + For local development, this is designed to run alongside (and from within) the flask application for osf.io. -1. Check out this OSF feature branch: https://github.com/CenterForOpenScience/osf.io/tree/feature/ember-preprints +1. Check out this OSF feature branch: https://github.com/CenterForOpenScience/osf.io/tree/feature/ember-preprints 2. Start your Ember server: `ember serve` -3. Copy [these lines](https://github.com/centerforopenscience/osf.io/blob/a98615b68a5cf620bc76c550808dd78ea3a305ec/website/settings/local-dist.py#L18-L22) -to your `website/settings/local.py` file. Uncomment `'/preprints/': 'http://localhost:4200',` and restart your flask app. +3. Copy [these lines](https://github.com/centerforopenscience/osf.io/blob/a98615b68a5cf620bc76c550808dd78ea3a305ec/website/settings/local-dist.py#L18-L22) + to your `website/settings/local.py` file. Uncomment `'/preprints/': 'http://localhost:4200',` and restart your flask app. 4. Visit your app at http://localhost:5000/preprints/ ### Provider Domains + 1. Start the API server 1. Run `sudo ./scripts/add-domains.js`. This will add the domains to your `/etc/hosts`. Use `--dry` for a dry run. 1. Visit your app at one of the provider domains with `https://local.:4200` (e.g. `http://local.socarxiv.org:4200`) -If you encounter problems, make sure that your version of ember-osf is up to date. If login fails, try logging in from +If you encounter problems, make sure that your version of ember-osf is up to date. If login fails, try logging in from any other OSF page, then returning to the preprints app. ### Generating test data on the OSF + There are a few scripts to run to populate your local preprint providers list, and help generate some "fake" preprints locally so you can begin testing using the OSF API. -* Populate the OSF's PreprintProvider model with data: +- Populate the OSF's PreprintProvider model with data: `python -m scripts.populate_preprint_providers` -* Populate the OSF's Subject model with data: +- Populate the OSF's Subject model with data: `python -m scripts.update_taxonomies` -* Create "fake" preprints using some additional arguments to the `create_fakes` script: +- Create "fake" preprints using some additional arguments to the `create_fakes` script: `python -m scripts.create_fakes -u user@email.io --nprojects 2 --preprint True --preprintprovider osf,psyarxiv` -*notes*: You can enter as many providers as you like, separated by commas. Also, this script does not currently create actual fake files, only fake file metadata; the file itself won't render in a preprint view, but you can still request its information from the API. +_notes_: You can enter as many providers as you like, separated by commas. Also, this script does not currently create actual fake files, only fake file metadata; the file itself won't render in a preprint view, but you can still request its information from the API. ### Code Generators Make use of the many generators for code, try `ember help generate` for more details ### Running Tests + You can run tests either with ember installed on your machine or by using [Docker](https://docs.docker.com/engine/getstarted/step_one/) #### On your local machine -* `ember test` -* `ember test --server` + +- `ember test` +- `ember test --server` #### With Docker -* `docker build --tag preprints .` -* `docker run preprints` + +- `docker build --tag preprints .` +- `docker run preprints` ### Building -* `ember build` (development) -* `ember build --environment production` (production) +- `ember build` (development) +- `ember build --environment production` (production) ## Further Reading / Useful Links -* [Requirements and road map for this service](https://docs.google.com/spreadsheets/d/1SocElbBjc_Nhme4-SJv2_zytBd1ys8R5aZDb3POe94c/edit#gid=1340026270) -* [ember.js](http://emberjs.com/) -* [ember-cli](http://ember-cli.com/) -* Development Browser Extensions - * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) - * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) - +- [Requirements and road map for this service](https://docs.google.com/spreadsheets/d/1SocElbBjc_Nhme4-SJv2_zytBd1ys8R5aZDb3POe94c/edit#gid=1340026270) +- [ember.js](http://emberjs.com/) +- [ember-cli](http://ember-cli.com/) +- Development Browser Extensions + - [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) + - [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) diff --git a/app/components/preprint-form-authors.js b/app/components/preprint-form-authors.js index 0d6e5f3f3..b7fd07581 100644 --- a/app/components/preprint-form-authors.js +++ b/app/components/preprint-form-authors.js @@ -131,8 +131,12 @@ export default CpPanelBodyComponent.extend(Analytics, { )); this.highlightSuccessOrFailure(contributor.id, this, 'success'); }, (error) => { - if (error.errors[0] && error.errors[0].detail && error.errors[0].detail.indexOf('is already a contributor') > -1) { - this.get('toast').error(error.errors[0].detail); + if (error.errors[0] && error.errors[0].detail) { + if (error.errors[0].detail.indexOf('is already a contributor') > -1) { + this.get('toast').error(this.get('i18n').t('submit.error_adding_existing_user')); + } else if (error.errors[0].detail.indexOf('Deactivated users') > -1) { + this.get('toast').error(this.get('i18n').t('submit.error_adding_deactivated_user')); + } } else { this.get('toast').error(this.get('i18n').t('submit.error_adding_unregistered_author')); } diff --git a/app/components/subject-picker/template.hbs b/app/components/subject-picker/template.hbs index d6bee8de0..4a105c920 100644 --- a/app/components/subject-picker/template.hbs +++ b/app/components/subject-picker/template.hbs @@ -17,13 +17,18 @@
{{#each columns as |column tier|}}
-
    - {{input value=column.filterText class="form-control" placeholder="Search"}} + {{input + (html-attributes aria-label='Search') + value=column.filterText class="form-control" + placeholder="Search" + }} +
      {{#each column.subjectsFiltered as |subject|}} -
    • +
    • {{subject.text}}
    • {{/each}} +
{{/each}} diff --git a/app/index.html b/app/index.html index f39dc38f7..baf268787 100644 --- a/app/index.html +++ b/app/index.html @@ -1,5 +1,5 @@ - + diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js index 7a309926f..fe3698fc2 100644 --- a/app/locales/en/translations.js +++ b/app/locales/en/translations.js @@ -41,6 +41,8 @@ export default { license: 'License', pre_moderation: 'pre-moderation', post_moderation: 'post-moderation', + collapse: 'Collapse', + expand: 'Expand', }, application: { separator: ' | ', @@ -92,6 +94,7 @@ export default { partner: 'Partner Repositories', placeholder: 'Search {{documentType.plural}}...', repository_placeholder: 'Search repository...', + search_input_box: 'Search input box', }, sort_by: 'Sort by', sort_newest_oldest: 'Modified Date (newest to oldest)', @@ -131,9 +134,9 @@ export default { }, subjects: { heading: { - provider: 'Browse by provider', - hasHighlightedSubjects: 'Browse by featured subjects', - noHighlightedSubjects: 'Browse by subjects', + provider: 'Browse by provider', + hasHighlightedSubjects: 'Browse by featured subjects', + noHighlightedSubjects: 'Browse by subjects', }, links: { seeAllSubjects: 'See all subjects available', @@ -287,6 +290,8 @@ export default { preprint_unregistered_author_added: '{{documentType.singularCaptalized}} unregistered author added!', error_adding_author: 'Could not add author. Please try again.', error_removing_author: 'Could not remove author. Please try again.', + error_adding_existing_user: 'User is already a contributor.', + error_adding_deactivated_user: 'Deactivated users cannot be added as contributors.', error_adding_unregistered_author: 'Could not add unregistered author. Please try again.', error_initiating_preprint: 'Could not initiate {{documentType.singular}}. Please try again.', error_saving_preprint: 'Could not save {{documentType.singular}}. Please try again.', @@ -314,6 +319,9 @@ export default { successfully_withdrawn: 'Your {{documentType.singular}} has been successfully withdrawn.', }, components: { + 'provider-carousel': { + select_service: 'Select service', + }, 'confirm-share-preprint': { body: 'Once this {{documentType.singular}} is made public, you should assume that it will always be public. Even if you delete it, search engines or others may access the files before you do so.', title: { @@ -362,6 +370,7 @@ export default { 'file-uploader': { dropzone_message: 'Drop {{documentType.singular}} file here to upload', title_placeholder: 'Enter {{documentType.singular}} title', + title_label: 'Title', update_version: 'Update {{documentType.singular}} file version.', could_not_create_preprint: 'Could not create preprint. Please try again.', could_not_update_title: 'Could not update title. Please try again.', diff --git a/app/styles/app.scss b/app/styles/app.scss index c94dba9f7..d5b05703b 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -17,6 +17,19 @@ /* GLOBAL to PREPRINTS, these may be used in multiple pages */ + +.ember-text-field::placeholder { + color: #757575; +} + +.ember-power-select-placeholder { + color: #555; +} + +.text-muted { + color: #555; +} + .pointer { cursor: pointer; } @@ -278,6 +291,12 @@ $logo-dir: 'img/provider_logos/'; } } +.lead { + a:hover.source_code_link { + color: #6dd1de; + } +} + /* VIEW page */ .subject-preview { @@ -344,6 +363,32 @@ $logo-dir: 'img/provider_logos/'; .abstract { white-space: pre-line; } + + button.btn-link { + color: #255884; + } + + .supplemental-material-section { + a{ + color: #255884; + } + } + + .doi-section { + a{ + color: #255884; + } + } + + .tag-section { + span.badge { + background-color: #555; + } + } + + .ember-power-select-placeholder { + color: #555; + } .abstract-truncated:after { content: ' \2026'; } @@ -590,7 +635,7 @@ $color-border-light: #DDDDDD; color: #444; font-size: 15px; i { - color: #888; + color: rgb(51, 51, 51); display: block; } .abstract { @@ -841,6 +886,7 @@ hr { .preprint-form-section { header { @extend a; + cursor: pointer; font: { size: 16px; @@ -937,7 +983,7 @@ hr { .sloan-assertions { span.required:after { content: "(required)"; - color: lighten(red, 30%); + color: #e50000; font-weight: normal; margin-left: 5px; } @@ -979,7 +1025,7 @@ hr { #preprint-form-basics { span.required:after { content: "(required)"; - color: lighten(red, 30%); + color: #e50000; font-weight: normal; float: right; } @@ -1254,6 +1300,11 @@ hr { text-decoration: underline; } +.taxonomy-caret-button { + border: none; + background: none; +} + .taxonomy-show-children { margin-right: 2px; } @@ -1652,7 +1703,7 @@ nav.branded-navbar { word-wrap: break-word; } .taxonomy-right-padding { - padding-right: 14px; + padding-right: 23px; } .taxonomy-left-padding { padding-left: 40px; diff --git a/app/styles/validated-input.scss b/app/styles/validated-input.scss index 5adfbffd7..166dd17fd 100644 --- a/app/styles/validated-input.scss +++ b/app/styles/validated-input.scss @@ -2,7 +2,7 @@ font-size:12px; } .validated-input .input-error .error { - color: #ff411f; + color: #e50000; } .validated-input .valid-input { diff --git a/app/templates/components/file-uploader.hbs b/app/templates/components/file-uploader.hbs index 2a2babf92..18283e6b4 100644 --- a/app/templates/components/file-uploader.hbs +++ b/app/templates/components/file-uploader.hbs @@ -11,9 +11,11 @@ maxfilesexceeded=(action 'maxfilesexceeded') }} {{#if hasFile}} -
+ {{!-- template-lint-disable no-invalid-interactive --}} + {{preprint-title-editor documentType=provider.documentType title=title titleValid=titleValid pressSubmit=(action 'createPreprintAndUploadFile')}}
+ {{!-- template-lint-enable no-invalid-interactive --}} {{/if}}
diff --git a/app/templates/components/multiple-textbox-input.hbs b/app/templates/components/multiple-textbox-input.hbs index 7782d3f98..5441c26d8 100644 --- a/app/templates/components/multiple-textbox-input.hbs +++ b/app/templates/components/multiple-textbox-input.hbs @@ -5,7 +5,13 @@
{{#each textFields key="id" as |field index|}}
- {{input class="form-control ember-text-field" type="text" placeholder=placeholder value=field.value change=(action 'onChange') }} + {{input + (html-attributes aria-label=labelAria) + class="form-control ember-text-field" + type="text" placeholder=placeholder + value=field.value + change=(action 'onChange') + }} {{#if (and (gt textFields.length 1) (gt textFieldsLastIndex index) )}} {{else}} diff --git a/app/templates/components/preprint-form-authors.hbs b/app/templates/components/preprint-form-authors.hbs index 6bd4fb570..217ccc8f7 100644 --- a/app/templates/components/preprint-form-authors.hbs +++ b/app/templates/components/preprint-form-authors.hbs @@ -2,9 +2,23 @@