Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Add link to external participant level search to filters block #2988

Merged
merged 5 commits into from
Feb 8, 2024
Merged

[ENH] Add link to external participant level search to filters block #2988

merged 5 commits into from
Feb 8, 2024

Conversation

surchs
Copy link
Contributor

@surchs surchs commented Jan 25, 2024

Proposed changes:

  • Added a link element to the filters block section below the modality note
  • Added an accordion component with additional information below the link (text from Link to NeuroBagel search #2956)
  • Created a new style selector third-party to
    • control position of the accordion.title, i.e. the ? bit
    • add margin around link

Some other notes / things to discuss

  • should this be its own component? We'd be happy to refactor it, but for now we put it in as simple as possible.
  • I didn't fully configure my local dev environment, so a good bit of the tests were failing. From what I can tell, those were related to data mutations or notification things - so I assume the CI will tell us for sure.
  • I didn't see a public preview build so I'll attach this gif of the way this bit behaves and styles

open_neuro_demo

surchs and others added 2 commits January 25, 2024 12:21
* First draft of search link
* Add the correct query link
* Adding styling to Link using existing components

---------

Co-authored-by: Alyssa Dai <alyssa.ydai@gmail.com>
Co-authored-by: rmanaem <rmanaem@protonmail.ch>
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (e8a2ba9) 65.15% compared to head (ae70dec) 65.12%.
Report is 6 commits behind head on master.

Files Patch % Lines
...ro-components/src/search-page/NeurobagelSearch.tsx 52.54% 28 Missing ⚠️
...nneuro-app/src/scripts/search/search-container.tsx 50.00% 1 Missing ⚠️
...nneuro-components/src/search-page/FiltersBlock.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2988      +/-   ##
==========================================
- Coverage   65.15%   65.12%   -0.03%     
==========================================
  Files         380      381       +1     
  Lines       24487    24553      +66     
  Branches      878      878              
==========================================
+ Hits        15954    15990      +36     
- Misses       8533     8563      +30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@nellh nellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good. I think the placement here is a little confusing since it ends up between the number of datasets and the filters you select. Maybe we could put it below the filters or as its own little section in the left sidebar?

Also it would be good if it was its own component but it's okay if not, this section has CSS that is pretty tightly connected anyways so it is hard to make it reusable and there's not much to test for this component.

Comment on lines 380 to 390
.third-party {
margin: 10px 0;
}

.third-party .on-accordion-wrapper .keyword-accordion {
.accordion-title {
position: absolute;
left: 300px;
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion is this can be better if the CSS is specific to the component. It's a bit messy here since we're reusing some global styles that haven't been moved to their own component.

import styled from "@emotion/styled"

const NeurobagelSearchDiv = styled.div`
  padding-bottom: 10px;
  .on-accordion-wrapper .keyword-accordion {
    .accordion-title {
        position: absolute;
        top: -20px;
        left: 280px;
    }
  }
`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion @nellh! We refactored things into a NeurobagelSearch component, applied the emotion-styling, and added Neurobagel to the link for clarity.

@nellh
Copy link
Contributor

nellh commented Jan 25, 2024

Test failure here is unrelated, looks like a bug with our MongoDB mock. Thanks for contributing!

Do you have examples of the tests failing locally for you? Tests shouldn't depend on configuration outside of the dependencies.

- removed global styling
- imported in FiltersBlock
@surchs
Copy link
Contributor Author

surchs commented Jan 25, 2024

This looks pretty good. I think the placement here is a little confusing since it ends up between the number of datasets and the filters you select. Maybe we could put it below the filters or as its own little section in the left sidebar?

We thought about positioning and we think that it makes most sense on the right with the results because it's not a filter constraint (as the things on the left). I pushed a change with the new NeurobagelSearch component below the filters, but to us this looks a bit confusing because now the component sits visually between the applied filters and the search results. See:

openneuro-down

let us know which option you prefer

@surchs
Copy link
Contributor Author

surchs commented Jan 25, 2024

Do you have examples of the tests failing locally for you? Tests shouldn't depend on configuration outside of the dependencies.

I think most failing tests have something to do with a missing openssl dependency on my machine. I just installed openssl locally and briefly had all but 2 tests passing, but on the next run I was back to 109 failures

See failed tests here

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 109 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL  packages/openneuro-search/src/__tests__/indexDatasets.spec.ts [ packages/openneuro-search/src/__tests__/indexDatasets.spec.ts ]
 FAIL  packages/openneuro-search/src/__tests__/names.spec.ts [ packages/openneuro-search/src/__tests__/names.spec.ts ]
 FAIL  packages/openneuro-client/src/__tests__/client.spec.js [ packages/openneuro-client/src/__tests__/client.spec.js ]
 FAIL  packages/openneuro-client/src/__tests__/datasetGenerator.spec.js [ packages/openneuro-client/src/__tests__/datasetGenerator.spec.js ]
 FAIL  packages/openneuro-client/src/__tests__/files.spec.js [ packages/openneuro-client/src/__tests__/files.spec.js ]
 FAIL  packages/openneuro-client/src/__tests__/uploads.spec.js [ packages/openneuro-client/src/__tests__/uploads.spec.js ]
 FAIL  packages/openneuro-cli/src/__tests__/config.spec.js [ packages/openneuro-cli/src/__tests__/config.spec.js ]
 FAIL  packages/openneuro-cli/src/__tests__/datasets.spec.js [ packages/openneuro-cli/src/__tests__/datasets.spec.js ]
 FAIL  packages/openneuro-cli/src/__tests__/download.spec.js [ packages/openneuro-cli/src/__tests__/download.spec.js ]
 FAIL  packages/openneuro-cli/src/__tests__/files.spec.js [ packages/openneuro-cli/src/__tests__/files.spec.js ]
 FAIL  packages/openneuro-cli/src/__tests__/gitAnnexRemote.spec.js [ packages/openneuro-cli/src/__tests__/gitAnnexRemote.spec.js ]
 FAIL  packages/openneuro-cli/src/__tests__/setDuplexIfRequired.spec.js [ packages/openneuro-cli/src/__tests__/setDuplexIfRequired.spec.js ]
 FAIL  packages/openneuro-cli/src/__tests__/validateApiKey.spec.js [ packages/openneuro-cli/src/__tests__/validateApiKey.spec.js ]
 FAIL  packages/openneuro-components/src/accordion/__tests__/AccordionTab.spec.tsx [ packages/openneuro-components/src/accordion/__tests__/AccordionTab.spec.tsx ]
 FAIL  packages/openneuro-components/src/button/__tests__/Button.spec.tsx [ packages/openneuro-components/src/button/__tests__/Button.spec.tsx ]
 FAIL  packages/openneuro-components/src/count-toggle/__tests__/CountToggle.spec.tsx [ packages/openneuro-components/src/count-toggle/__tests__/CountToggle.spec.tsx ]
 FAIL  packages/openneuro-components/src/facets/__tests__/FacetSelect.spec.tsx [ packages/openneuro-components/src/facets/__tests__/FacetSelect.spec.tsx ]
 FAIL  packages/openneuro-components/src/icon/__tests__/Icon.spec.tsx [ packages/openneuro-components/src/icon/__tests__/Icon.spec.tsx ]
 FAIL  packages/openneuro-components/src/logo/__tests__/Logo.spec.tsx [ packages/openneuro-components/src/logo/__tests__/Logo.spec.tsx ]
 FAIL  packages/openneuro-components/src/loading/__tests__/Loading.spec.tsx [ packages/openneuro-components/src/loading/__tests__/Loading.spec.tsx ]
 FAIL  packages/openneuro-components/src/modal/__tests__/UserLoginModal.spec.tsx [ packages/openneuro-components/src/modal/__tests__/UserLoginModal.spec.tsx ]
 FAIL  packages/openneuro-components/src/radio/__tests__/RadioGroup.spec.tsx [ packages/openneuro-components/src/radio/__tests__/RadioGroup.spec.tsx ]
 FAIL  packages/openneuro-components/src/range/__tests__/TwoHandleRange.spec.tsx [ packages/openneuro-components/src/range/__tests__/TwoHandleRange.spec.tsx ]
 FAIL  packages/openneuro-components/src/read-more/__tests__/ReadMore.spec.tsx [ packages/openneuro-components/src/read-more/__tests__/ReadMore.spec.tsx ]
 FAIL  packages/openneuro-components/src/select/__tests__/SelectGroup.spec.tsx [ packages/openneuro-components/src/select/__tests__/SelectGroup.spec.tsx ]
 FAIL  packages/openneuro-components/src/textarea/__tests__/Textarea.spec.tsx [ packages/openneuro-components/src/textarea/__tests__/Textarea.spec.tsx ]
 FAIL  packages/openneuro-components/src/tooltip/__tests__/Tooltip.spec.tsx [ packages/openneuro-components/src/tooltip/__tests__/Tooltip.spec.tsx ]
 FAIL  packages/openneuro-server/src/datalad/__tests__/changelog.spec.ts [ packages/openneuro-server/src/datalad/__tests__/changelog.spec.ts ]
 FAIL  packages/openneuro-server/src/datalad/__tests__/dataset.spec.ts [ packages/openneuro-server/src/datalad/__tests__/dataset.spec.ts ]
 FAIL  packages/openneuro-server/src/datalad/__tests__/description.spec.ts [ packages/openneuro-server/src/datalad/__tests__/description.spec.ts ]
 FAIL  packages/openneuro-server/src/datalad/__tests__/files.spec.ts [ packages/openneuro-server/src/datalad/__tests__/files.spec.ts ]
 FAIL  packages/openneuro-server/src/datalad/__tests__/pagination.spec.ts [ packages/openneuro-server/src/datalad/__tests__/pagination.spec.ts ]
 FAIL  packages/openneuro-server/src/datalad/__tests__/snapshots.spec.ts [ packages/openneuro-server/src/datalad/__tests__/snapshots.spec.ts ]
 FAIL  packages/openneuro-server/src/graphql/__tests__/comment.spec.ts [ packages/openneuro-server/src/graphql/__tests__/comment.spec.ts ]
 FAIL  packages/openneuro-server/src/graphql/__tests__/permissions.spec.ts [ packages/openneuro-server/src/graphql/__tests__/permissions.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/__tests__/apikey.spec.ts [ packages/openneuro-server/src/libs/__tests__/apikey.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/__tests__/datalad-service.spec.ts [ packages/openneuro-server/src/libs/__tests__/datalad-service.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/__tests__/dataset.spec.ts [ packages/openneuro-server/src/libs/__tests__/dataset.spec.ts ]
 FAIL  packages/openneuro-server/src/models/__tests__/ingestDataset.spec.ts [ packages/openneuro-server/src/models/__tests__/ingestDataset.spec.ts ]
 FAIL  packages/openneuro-server/src/utils/__tests__/datasetOrSnapshot.spec.ts [ packages/openneuro-server/src/utils/__tests__/datasetOrSnapshot.spec.ts ]
 FAIL  packages/openneuro-server/src/utils/__tests__/validateUrl.spec.ts [ packages/openneuro-server/src/utils/__tests__/validateUrl.spec.ts ]
 FAIL  packages/openneuro-app/src/scripts/authentication/__tests__/profile.spec.js [ packages/openneuro-app/src/scripts/authentication/__tests__/profile.spec.js ]
 FAIL  packages/openneuro-app/src/scripts/components/__tests__/agreement.spec.tsx [ packages/openneuro-app/src/scripts/components/__tests__/agreement.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/components/__tests__/data-table.spec.tsx [ packages/openneuro-app/src/scripts/components/__tests__/data-table.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/components/__tests__/date-distance.spec.tsx [ packages/openneuro-app/src/scripts/components/__tests__/date-distance.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/__tests__/snapshot-container.spec.tsx [ packages/openneuro-app/src/scripts/dataset/__tests__/snapshot-container.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/resources/__tests__/kibana.spec.js [ packages/openneuro-app/src/scripts/resources/__tests__/kibana.spec.js ]
 FAIL  packages/openneuro-app/src/scripts/search/__tests__/search-container.spec.tsx [ packages/openneuro-app/src/scripts/search/__tests__/search-container.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/search/__tests__/search-params-ctx.spec.tsx [ packages/openneuro-app/src/scripts/search/__tests__/search-params-ctx.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/utils/__tests__/csv.spec.ts [ packages/openneuro-app/src/scripts/utils/__tests__/csv.spec.ts ]
 FAIL  packages/openneuro-app/src/scripts/utils/__tests__/date.spec.js [ packages/openneuro-app/src/scripts/utils/__tests__/date.spec.js ]
 FAIL  packages/openneuro-app/src/scripts/utils/__tests__/json-ld.spec.js [ packages/openneuro-app/src/scripts/utils/__tests__/json-ld.spec.js ]
 FAIL  packages/openneuro-app/src/scripts/utils/__tests__/local-storage.spec.tsx [ packages/openneuro-app/src/scripts/utils/__tests__/local-storage.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/utils/__tests__/markdown.spec.tsx [ packages/openneuro-app/src/scripts/utils/__tests__/markdown.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/utils/__tests__/newid.spec.js [ packages/openneuro-app/src/scripts/utils/__tests__/newid.spec.js ]
 FAIL  packages/openneuro-app/src/scripts/utils/__tests__/userNotify.spec.js [ packages/openneuro-app/src/scripts/utils/__tests__/userNotify.spec.js ]
 FAIL  packages/openneuro-server/src/graphql/resolvers/__tests__/brainlife.spec.ts [ packages/openneuro-server/src/graphql/resolvers/__tests__/brainlife.spec.ts ]
 FAIL  packages/openneuro-server/src/graphql/resolvers/__tests__/dataset-search.spec.ts [ packages/openneuro-server/src/graphql/resolvers/__tests__/dataset-search.spec.ts ]
 FAIL  packages/openneuro-server/src/graphql/resolvers/__tests__/dataset.spec.ts [ packages/openneuro-server/src/graphql/resolvers/__tests__/dataset.spec.ts ]
 FAIL  packages/openneuro-server/src/graphql/resolvers/__tests__/derivatives.spec.ts [ packages/openneuro-server/src/graphql/resolvers/__tests__/derivatives.spec.ts ]
 FAIL  packages/openneuro-server/src/graphql/resolvers/__tests__/importRemoteDataset.spec.ts [ packages/openneuro-server/src/graphql/resolvers/__tests__/importRemoteDataset.spec.ts ]
 FAIL  packages/openneuro-server/src/graphql/resolvers/__tests__/permssions.spec.ts [ packages/openneuro-server/src/graphql/resolvers/__tests__/permssions.spec.ts ]
 FAIL  packages/openneuro-server/src/graphql/resolvers/__tests__/snapshots.spec.ts [ packages/openneuro-server/src/graphql/resolvers/__tests__/snapshots.spec.ts ]
 FAIL  packages/openneuro-server/src/graphql/resolvers/__tests__/user.spec.ts [ packages/openneuro-server/src/graphql/resolvers/__tests__/user.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/authentication/__tests__/jwt.spec.ts [ packages/openneuro-server/src/libs/authentication/__tests__/jwt.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/doi/__tests__/doi.spec.ts [ packages/openneuro-server/src/libs/doi/__tests__/doi.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/doi/__tests__/normalize.spec.ts [ packages/openneuro-server/src/libs/doi/__tests__/normalize.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/email/__tests__/index.spec.ts [ packages/openneuro-server/src/libs/email/__tests__/index.spec.ts ]
 FAIL  packages/openneuro-app/src/scripts/common/forms/__tests__/warn-button.spec.jsx [ packages/openneuro-app/src/scripts/common/forms/__tests__/warn-button.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/common/containers/__tests__/header.spec.tsx [ packages/openneuro-app/src/scripts/common/containers/__tests__/header.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/datalad/subscriptions/__tests__/files-subscription.spec.jsx [ packages/openneuro-app/src/scripts/datalad/subscriptions/__tests__/files-subscription.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/comments/__tests__/comment.spec.jsx [ packages/openneuro-app/src/scripts/dataset/comments/__tests__/comment.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/comments/__tests__/comments.spec.jsx [ packages/openneuro-app/src/scripts/dataset/comments/__tests__/comments.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/components/__tests__/DatasetAlert.spec.tsx [ packages/openneuro-app/src/scripts/dataset/components/__tests__/DatasetAlert.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/components/__tests__/DatasetHeaders.spec.tsx [ packages/openneuro-app/src/scripts/dataset/components/__tests__/DatasetHeaders.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/components/__tests__/DatasetTools.spec.tsx [ packages/openneuro-app/src/scripts/dataset/components/__tests__/DatasetTools.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/download/__tests__/download-command-line.spec.jsx [ packages/openneuro-app/src/scripts/dataset/download/__tests__/download-command-line.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/download/__tests__/download-link.spec.jsx [ packages/openneuro-app/src/scripts/dataset/download/__tests__/download-link.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/download/__tests__/download-native.spec.js [ packages/openneuro-app/src/scripts/dataset/download/__tests__/download-native.spec.js ]
 FAIL  packages/openneuro-app/src/scripts/dataset/download/__tests__/shell-example.spec.jsx [ packages/openneuro-app/src/scripts/dataset/download/__tests__/shell-example.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/files/__tests__/file-tree-unloaded-directory.spec.jsx [ packages/openneuro-app/src/scripts/dataset/files/__tests__/file-tree-unloaded-directory.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/files/__tests__/file-tree.spec.jsx [ packages/openneuro-app/src/scripts/dataset/files/__tests__/file-tree.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/files/__tests__/file-viewer-type.spec.jsx [ packages/openneuro-app/src/scripts/dataset/files/__tests__/file-viewer-type.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/files/__tests__/file.spec.jsx [ packages/openneuro-app/src/scripts/dataset/files/__tests__/file.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/fragments/__tests__/cancel-button.spec.tsx [ packages/openneuro-app/src/scripts/dataset/fragments/__tests__/cancel-button.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/fragments/__tests__/dataset-alert-draft.spec.tsx [ packages/openneuro-app/src/scripts/dataset/fragments/__tests__/dataset-alert-draft.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/fragments/__tests__/dataset-citation.spec.jsx [ packages/openneuro-app/src/scripts/dataset/fragments/__tests__/dataset-citation.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/fragments/__tests__/doi-link.spec.tsx [ packages/openneuro-app/src/scripts/dataset/fragments/__tests__/doi-link.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/fragments/__tests__/edit-button.spec.tsx [ packages/openneuro-app/src/scripts/dataset/fragments/__tests__/edit-button.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/fragments/__tests__/edit-list.spec.jsx [ packages/openneuro-app/src/scripts/dataset/fragments/__tests__/edit-list.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/fragments/__tests__/save-button.spec.tsx [ packages/openneuro-app/src/scripts/dataset/fragments/__tests__/save-button.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/fragments/__tests__/select-input.spec.tsx [ packages/openneuro-app/src/scripts/dataset/fragments/__tests__/select-input.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/mutations/__tests__/cache-id.spec.js [ packages/openneuro-app/src/scripts/dataset/mutations/__tests__/cache-id.spec.js ]
 FAIL  packages/openneuro-app/src/scripts/dataset/mutations/__tests__/delete-file.spec.jsx [ packages/openneuro-app/src/scripts/dataset/mutations/__tests__/delete-file.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/mutations/__tests__/delete.spec.jsx [ packages/openneuro-app/src/scripts/dataset/mutations/__tests__/delete.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/mutations/__tests__/deprecate-snapshot.spec.tsx [ packages/openneuro-app/src/scripts/dataset/mutations/__tests__/deprecate-snapshot.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/mutations/__tests__/deprecate-version.spec.tsx [ packages/openneuro-app/src/scripts/dataset/mutations/__tests__/deprecate-version.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/mutations/__tests__/description.spec.jsx [ packages/openneuro-app/src/scripts/dataset/mutations/__tests__/description.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/mutations/__tests__/remove-permissions.spec.tsx [ packages/openneuro-app/src/scripts/dataset/mutations/__tests__/remove-permissions.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/mutations/__tests__/update-permissions.spec.jsx [ packages/openneuro-app/src/scripts/dataset/mutations/__tests__/update-permissions.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/routes/__tests__/deprecate-snapshot-page.spec.tsx [ packages/openneuro-app/src/scripts/dataset/routes/__tests__/deprecate-snapshot-page.spec.tsx ]
 FAIL  packages/openneuro-app/src/scripts/search/inputs/__tests__/sort-by-select.spec.tsx [ packages/openneuro-app/src/scripts/search/inputs/__tests__/sort-by-select.spec.tsx ]
 FAIL  packages/openneuro-server/src/libs/email/templates/__tests__/comment-created.spec.ts [ packages/openneuro-server/src/libs/email/templates/__tests__/comment-created.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/email/templates/__tests__/dataset-deleted.spec.ts [ packages/openneuro-server/src/libs/email/templates/__tests__/dataset-deleted.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/email/templates/__tests__/owner-unsubscribed.spec.ts [ packages/openneuro-server/src/libs/email/templates/__tests__/owner-unsubscribed.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/email/templates/__tests__/snapshot-created.spec.ts [ packages/openneuro-server/src/libs/email/templates/__tests__/snapshot-created.spec.ts ]
 FAIL  packages/openneuro-server/src/libs/email/templates/__tests__/snapshot-reminder.spec.ts [ packages/openneuro-server/src/libs/email/templates/__tests__/snapshot-reminder.spec.ts ]
 FAIL  packages/openneuro-app/src/scripts/dataset/files/viewers/__tests__/file-viewer-json.spec.jsx [ packages/openneuro-app/src/scripts/dataset/files/viewers/__tests__/file-viewer-json.spec.jsx ]
 FAIL  packages/openneuro-app/src/scripts/dataset/files/viewers/__tests__/parse-tabular.spec.js [ packages/openneuro-app/src/scripts/dataset/files/viewers/__tests__/parse-tabular.spec.js ]
Error: Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1"
 ❯ MongoInstance.checkErrorInLine .yarn/cache/mongodb-memory-server-core-npm-9.0.1-6f48908c3a-41ed9b1c6c.zip/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:706:11
 ❯ MongoInstance.stderrHandler .yarn/cache/mongodb-memory-server-core-npm-9.0.1-6f48908c3a-41ed9b1c6c.zip/node_modules/mongodb-memory-server-core/src/util/MongoInstance.ts:593:10
 ❯ Socket.emit node:events:514:28

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/109]⎯

 Test Files  109 failed (109)
      Tests   (326)
   Start at  14:38:50
   Duration  88.01s (transform 5.56s, setup 141.17s, collect 133.19s, tests 16.20s, environment 176.19s, prepare 78.79s)



not quite sure what is causing this, but let me know if you like me to try things out

@surchs surchs mentioned this pull request Jan 25, 2024
3 tasks
@effigies
Copy link
Contributor

IMO it looks better below the filter tags than above, though neither feels quite natural. I suspect we'll need to live with some sense of it being bolted on until we get some designer time focused on the problem.

I do wonder if an entry at the bottom of the filters list on the left might feel cleaner. Something like this:

image

(Just fiddled around in inspector, so the ? didn't get nice styling.)

@surchs
Copy link
Contributor Author

surchs commented Jan 29, 2024

I do wonder if an entry at the bottom of the filters list on the left might feel cleaner.

We first put it on the left as well. We decided against it for two reasons:

  1. so far everything on the left is concerned with "make the list on the right more constrained" but the right side already has some other visual elements going on that are concerned with "overall search" matters (e.g. number of matching datasets, the filters, ...) - so it felt less "surprising" there
  2. on the left it visually felt more out of place to us because you have all these clean white accordion elements and this would need to look different.

That said: we'll go with what you guys prefer, just let us know! I also think it looks much nicer with the logo, we'll add that!

@effigies
Copy link
Contributor

My feeling is that the right already has a lot going on, and injecting this disrupts the flow. As long as we don't think sticking at at the bottom of the left would make people never see it (and I hope the full-color log will help), I think it makes more sense there. We could add a little bit more vertical space before the link, to separate it more from the filters.

@surchs
Copy link
Contributor Author

surchs commented Jan 29, 2024

Hey @effigies, we just had another chat about it. Our preference would be below the filters on the right, also because below the UI elements on the left it would be outside the viewport on most common screen sizes and even when scrolled into view we think it wouldn't be very noticeable / distinguishable.

I mocked it up locally:

Peek 2024-01-29 16-49

I don't think it has to have a logo/branding on it either if that's a concern, but we'd prefer on the right side for those reasons.

Let me know what you all decide to go with and we'll contribute that.

@effigies
Copy link
Contributor

Okay, yeah, zoomed out that is under-advertised. Here's another thought:

image

image

Screenshot from 2024-01-29 17-08-47

I couldn't get the vertical alignment right, but I assume it would be possible. It would put it in the same area as "things you can do with this query".

@nellh
Copy link
Contributor

nellh commented Jan 29, 2024

IMO it looks better below the filter tags than above, though neither feels quite natural. I suspect we'll need to live with some sense of it being bolted on until we get some designer time focused on the problem.

I do wonder if an entry at the bottom of the filters list on the left might feel cleaner. Something like this:

image

(Just fiddled around in inspector, so the ? didn't get nice styling.)

I think it would also be fine above the filter list on the left, the rationale being that you would look there while starting to search for something and it feels fairly natural to discover the link there even if the function is different from the existing controls. Putting it at the top also keeps it within the common viewports.

I also like the most recent version from @effigies with things on the right side in the desktop view.

@surchs
Copy link
Contributor Author

surchs commented Jan 29, 2024

I also like the most recent version from @effigies with things on the right side in the desktop view.

Hey, yeah, I agree this looks nice! We had even played a little with the "link on the right" idea before but didn't quite figure out what to do with the "clear all" button when keyword-filters are selected. We can give that a try and see what it does.

I think it would also be fine above the filter list on the left, the rationale being that you would look there while starting to search for something and it feels fairly natural to discover the link there even if the function is different from the existing controls. Putting it at the top also keeps it within the common viewports.

OK, let us try to make both options and then we can take a pick.

above the filters

Co-authored-by: Arman Jahanpour <rmanaem@users.noreply.github.com>
Co-authored-by: Alyssa Dai <alyssa.ydai@gmail.com>
@surchs
Copy link
Contributor Author

surchs commented Jan 31, 2024

Hey folks, we tried out both ideas. I'll call them "right option" and "left option" for simplicity.

Right option

right_option

I couldn't get the vertical alignment right, but I assume it would be possible. It would put it in the same area as "things you can do with this query".

We played around with this one quite a bit and I think getting a nice looking inline alignment that works with the "clear all" button on or off would need more than just adding a self-contained component, and we'd probably have to change hierarchy of rendered elements in the FiltersBlock component, some global styling, or both. We didn't want to just do those things, so for now we styled our component to sit just above (or below) the line. If you have a good idea for how to get these elements to coexist peacefully inline, let us know.

Left option

left_option

I think it would also be fine above the filter list on the left, the rationale being that you would look there while starting to search for something and it feels fairly natural to discover the link there even if the function is different from the existing controls. Putting it at the top also keeps it within the common viewports.

We added a horizontal divider here to distinguish it from the flow below and aligned it with the dataset list on the right when no tags are selected. @nellh, I couldn't figure out how to import the scss variable for the color directly inside the component ("newspaper" is the name), maybe you have a tip?


Between these two options, we prefer the one on the left. I think it looks cleaner and fits better with the rest of the UI and the existing flow. The right option might look better if we actually get it to sit correctly inline, but I think having it between the "clear all" button and the tags that the "clear all" button removes would be a bit confusing. Let me know what you think.

@nellh
Copy link
Contributor

nellh commented Feb 5, 2024

This looks great, I think we should move forward with the version on the left.

@surchs
Copy link
Contributor Author

surchs commented Feb 6, 2024

Hey @nellh, great. I agree, left looks nice. What changes do you want to have before we can merge this? Do you mind having the logo as a svg directly in there or do you prefer a path?

@nellh nellh merged commit 0c774e2 into OpenNeuroOrg:master Feb 8, 2024
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link to NeuroBagel search
3 participants