From 2ab03eee7a994928413f5fbaa6500027fd80969e Mon Sep 17 00:00:00 2001 From: Brian Pilati Date: Fri, 24 Feb 2023 16:10:02 -0700 Subject: [PATCH 1/3] Removed the
and cleaned-up the css --- .../addon/components/node-card/styles.scss | 69 ++++---- .../addon/components/node-card/template.hbs | 158 ++++++++++-------- 2 files changed, 122 insertions(+), 105 deletions(-) diff --git a/lib/osf-components/addon/components/node-card/styles.scss b/lib/osf-components/addon/components/node-card/styles.scss index a8b4095cbe..35d43a85c0 100644 --- a/lib/osf-components/addon/components/node-card/styles.scss +++ b/lib/osf-components/addon/components/node-card/styles.scss @@ -1,8 +1,8 @@ -.NodeCard { +.node-card { margin: 10px 0; } -.NodeCard__heading { +.heading { :global(.ember-content-placeholders-heading__title) { height: 1em; margin-top: 5px; @@ -26,41 +26,42 @@ } } -.NodeCard__body { +.body { :global(.ember-content-placeholders-text__line) { height: 1em; margin-bottom: 5px; } -} -.NodeCard__body dt, -.NodeCard__body dd { - display: inline-block; - max-width: 80%; - margin-right: 5px; -} + dt, + dd { + display: inline-block; + max-width: 80%; + margin-right: 5px; + } -.NodeCard__body dl { - margin-bottom: 10px; -} + dl { + margin-bottom: 10px; + + div { + display: flex; + } + } -.NodeCard__body > dl > div { - display: flex; } -.NodeCard__dropdown { +.dropdown { padding-left: 5px; - .NodeCard__dropdown-button { + .dropdown-button { padding: 4px 12px; line-height: 0; } - .NodeCard__dropdown-list { + .dropdown-list { background-color: $color-bg-gray-light; min-width: 180px; - .NodeCard__dropdown-link { + .dropdown-link { color: $color-link-black; border-color: transparent; background-color: $color-bg-gray-light; @@ -69,8 +70,8 @@ padding: 3px 20px; } - .NodeCard__dropdown-link:hover, - .NodeCard__dropdown-link:focus { + .dropdown-link:hover, + .dropdown-link:focus { cursor: pointer; background-image: none; background-color: $color-bg-gray-dark; @@ -78,17 +79,17 @@ } } -.NodeCard__tags { +.tags { margin-top: 2px; } -.NodeCard__description { +.description { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } -.NodeCard__link { +.link { composes: Button from '../button/styles.scss'; composes: SecondaryButton from '../button/styles.scss'; composes: MediumButton from '../button/styles.scss'; @@ -98,28 +99,28 @@ } } -.CardContents { +.card-contents { display: flex; flex-direction: row; } -.CardBody { +.card-body { width: 80%; -} -.CardBody__mobile { - width: 90%; + &.mobile { + width: 90%; + } } -.OpenBadges { +.open-badges { width: 20%; border-left-width: thin; border-left-color: $color-bg-gray-light; border-left-style: solid; padding-left: 10px; -} -.OpenBadges__mobile { - width: 10%; - padding-left: 0; + &.mobile { + width: 10%; + padding-left: 0; + } } diff --git a/lib/osf-components/addon/components/node-card/template.hbs b/lib/osf-components/addon/components/node-card/template.hbs index 2433324ee0..f4985d9d03 100644 --- a/lib/osf-components/addon/components/node-card/template.hbs +++ b/lib/osf-components/addon/components/node-card/template.hbs @@ -1,13 +1,13 @@
-
+
-

+

{{#if @node}} {{#unless @node.public}} @@ -71,17 +71,17 @@
- + - + {{t 'node_card.fork.manage_contributors'}} @@ -90,7 +90,7 @@ {{t 'general.settings'}} @@ -99,7 +99,7 @@ {{t 'general.delete'}} @@ -111,79 +111,95 @@ {{/if}} {{/if}}

-
+
{{#if @node}}
{{#if @node.isRegistration}} -
- {{t 'node_card.registration_template'}} -
-
- {{@node.registrationSchema.name}} -

-
- {{t 'node_card.registry'}} -
-
- {{@node.provider.name}} -

-
- {{t (concat 'node_card.registration.timestamp_label')}} -
-
- {{moment @node.dateRegistered}} -

+
+
+ {{t 'node_card.registration_template'}} +
+
+ {{@node.registrationSchema.name}} +
+
+
+
+ {{t 'node_card.registry'}} +
+
+ {{@node.provider.name}} +
+
+
+
+ {{t (concat 'node_card.registration.timestamp_label')}} +
+
+ {{moment @node.dateRegistered}} +
+
{{else}} -
- {{t (concat 'node_card.' @node.nodeType '.timestamp_label')}} -
-
- {{moment @node.dateCreated}} -

+
+
+ {{t (concat 'node_card.' @node.nodeType '.timestamp_label')}} +
+
+ {{moment @node.dateCreated}} +
+
{{/if}} -
- {{t 'node_card.last_updated'}} -
-
- {{moment @node.dateModified}} -

-
- {{t 'node_card.contributors'}} -
-
- -

-
- {{t 'node_card.description'}} -
-
- {{@node.description}} -

- {{#if (and this.showTags @node.tags)}} -
+
+ {{t 'node_card.last_updated'}} +
+
+ {{moment @node.dateModified}} +
+
+
+
- {{t 'node_card.tags'}} + {{t 'node_card.contributors'}}
-
+
+
+
+ {{t 'node_card.description'}} +
+
+ {{@node.description}} +
+
+ {{#if (and this.showTags @node.tags)}} +
+
+ {{t 'node_card.tags'}} +
+
+ +
+
{{/if}}
{{#if (and @node.isRegistration @node.resourcesVisible)}} - + Date: Thu, 16 Mar 2023 12:05:56 -0400 Subject: [PATCH 2/3] Merge basket branch into develop for Antimony release (#1819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [ENG-4333] Test file detail editing (#1807) - Ticket: https://openscience.atlassian.net/browse/ENG-4333 - Branch: feature/test-file-detail-view-only ## Purpose The purpose of these changes is to test the edit functionality of the file detail page. ## Summary of Changes -A test has been added to verify that changing the values and saving will result in appropriate changes in the view-only section for the file title, description, resource type, and resource language. -A test has been added to verify that changing those fields and canceling the edit will result in the values not changing in the view-only section. -A test has been added to verify that trying to save, getting an error, and canceling the save causes the values not to change for the view-only section. - A test has been added to verify that, if you don’t have permission to edit, the edit capability is disabled. * sort nested subjects (#1810) * Update youtube link for OSF 101 video (#1812) * [ENG-4040][ENG-4016] Deprecation/ember classic (#1799) - Ticket: [ENG-4040] [ENG-4016] - Feature flag: n/a ## Purpose - Update our app from ember classic edition to octane - Remove usage of `this.$` that is no longer going to be supported ## Summary of Changes - Run `npx @ember/octanify` https://github.com/emberjs/ember-octanify - Remove use of ember jquery integration (`this.$()`) to just use imported jquery - https://rfcs.emberjs.com/id/0705-deprecate-jquery-optional-feature/ - Update `@ember/jquery` to newest version * Fix page-change scroll behavior (#1817) * Hide additional fields and show state for AVOL registrations (#1814) * [ENG-3542] Percy 3.0 upgrade (#1794) - Ticket: [ENG-3542] - Feature flag: n/a ## Purpose Upgrade Percy from 1.x to 3.0 ## Summary of Changes Ran the `$ npx @percy/migrate` script and followed the prompts and did not update imports. --------- Co-authored-by: Ashley Robinson <82047646+chth0n1x@users.noreply.github.com> Co-authored-by: Futa Ikeda Co-authored-by: futa-ikeda <51409893+futa-ikeda@users.noreply.github.com> Co-authored-by: Lord Business <113387478+bp-cos@users.noreply.github.com> --- .github/workflows/CI.yml | 42 ++- .percy.yml | 15 + app/dashboard/template.hbs | 2 +- .../-components/support-section/template.hbs | 2 +- config/deprecation-workflow.js | 1 - config/optional-features.json | 2 + .../components/discover-page/component.ts | 2 +- .../components/discover-page/template.hbs | 4 +- .../components/delete-node-modal/template.hbs | 2 +- .../file-metadata-manager/component.ts | 8 +- .../subjects/manager/single/component.ts | 1 + .../registries-metadata/template.hbs | 25 +- .../components/registries-states/component.ts | 38 ++- .../-components/overview-topbar/template.hbs | 14 +- package.json | 41 +-- .../registration-file-detail-test.ts | 111 ++++++- .../acceptance/overview/topbar-test.ts | 10 +- tests/index.html | 4 +- .../components/link-to/component-test.ts | 31 +- .../component-test.ts | 1 - translations/en-us.yml | 4 + yarn.lock | 304 +++++++++++++++++- 22 files changed, 555 insertions(+), 109 deletions(-) create mode 100644 .percy.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cfb00cdc94..579355b242 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ on: env: CI: true PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }} - PERCY_PARALLEL_TOTAL: 4 + PERCY_PARALLEL_TOTAL: -1 jobs: fetch-dependencies: @@ -77,9 +77,8 @@ jobs: path: ./node_modules key: cached_node_modules_${{ secrets.CACHE_VERSION }}_${{ hashFiles('**/yarn.lock') }} restore-keys: cached_node_modules_${{ secrets.CACHE_VERSION }}_ - - uses: percy/exec-action@v0.3.1 - with: - custom-command: yarn test:ember --path ./dist --partition 1 + - name: Run tests with percy snapshots + run: yarn percy exec --debug --parallel --verbose yarn test:ember --path ./dist --partition 1 env: PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }} PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }} @@ -102,9 +101,8 @@ jobs: path: ./node_modules key: cached_node_modules_${{ secrets.CACHE_VERSION }}_${{ hashFiles('**/yarn.lock') }} restore-keys: cached_node_modules_${{ secrets.CACHE_VERSION }}_ - - uses: percy/exec-action@v0.3.1 - with: - custom-command: yarn test:ember --path ./dist --partition 2 + - name: Run tests with percy snapshots + run: yarn percy exec --debug --parallel --verbose yarn test:ember --path ./dist --partition 2 env: PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }} PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }} @@ -127,9 +125,8 @@ jobs: path: ./node_modules key: cached_node_modules_${{ secrets.CACHE_VERSION }}_${{ hashFiles('**/yarn.lock') }} restore-keys: cached_node_modules_${{ secrets.CACHE_VERSION }}_ - - uses: percy/exec-action@v0.3.1 - with: - custom-command: yarn test:ember --path ./dist --partition 3 + - name: Run tests with percy snapshots + run: yarn percy exec --debug --parallel --verbose yarn test:ember --path ./dist --partition 3 env: PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }} PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }} @@ -152,9 +149,8 @@ jobs: path: ./node_modules key: cached_node_modules_${{ secrets.CACHE_VERSION }}_${{ hashFiles('**/yarn.lock') }} restore-keys: cached_node_modules_${{ secrets.CACHE_VERSION }}_ - - uses: percy/exec-action@v0.3.1 - with: - custom-command: yarn test:ember --path ./dist --partition 4 + - name: Run tests with percy snapshots + run: yarn percy exec --debug --parallel --verbose yarn test:ember --path ./dist --partition 4 env: PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }} PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }} @@ -177,4 +173,22 @@ jobs: - name: Send coverage report to coveralls uses: coverallsapp/github-action@master with: - github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + github-token: ${{ secrets.GITHUB_TOKEN }} + + finalize-percy: + needs: [test-partition-1, test-partition-2, test-partition-3, test-partition-4] + runs-on: ubuntu-latest + 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_${{ secrets.CACHE_VERSION }}_${{ hashFiles('**/yarn.lock') }} + restore-keys: cached_node_modules_${{ secrets.CACHE_VERSION }}_ + - run: yarn percy build:finalize + env: + PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }} + PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }} + PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} \ No newline at end of file diff --git a/.percy.yml b/.percy.yml new file mode 100644 index 0000000000..64bde30b2e --- /dev/null +++ b/.percy.yml @@ -0,0 +1,15 @@ +version: 2 +snapshot: + widths: + - 375 + - 1280 + minHeight: 1024 + percyCSS: "" +discovery: + allowedHostnames: [] + disallowedHostnames: [] + networkIdleTimeout: 100 +upload: + files: "" + ignore: "" + stripExtensions: false diff --git a/app/dashboard/template.hbs b/app/dashboard/template.hbs index b295302940..7e8d1c2c98 100644 --- a/app/dashboard/template.hbs +++ b/app/dashboard/template.hbs @@ -157,7 +157,7 @@