Skip to content
New issue

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

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

Already on GitHub? # to your account

basic plugin search #1253

Merged
merged 2 commits into from
Apr 22, 2022
Merged

basic plugin search #1253

merged 2 commits into from
Apr 22, 2022

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Apr 18, 2022

Description

This pull request implements a search bar at the top of the plugin tray with simple exact-match search on plugin titles to filter plugins in the expansion panels.

  • currently synced across multiple instances of the app - may want to have it per-instance in the future (but using 'data' on the app-level seems not to work)
  • currently exact match on the plugin label only. Could extend this to search full text or tags, etc. Could also create a "command palette" and/or keyboard shortcut to immediately focus the search field (as future work).
  • NOTE: cannot filter the input list to v-expansion-panels as that disrupts the tray_items_open list of indices, so instead we hide the child v-expansion-panel-header/v-expansion-panels-content items.
Screen.Recording.2022-04-18.at.10.05.10.AM.mov

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a change log needed? If yes, is it added to CHANGES.rst?
  • Is a milestone set?
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@kecnry kecnry added this to the 2.5 milestone Apr 18, 2022
@github-actions github-actions bot added the embed Regarding issues with front-end embedding label Apr 18, 2022
* currently synced across multiple instances of the app - may want to have it per-instance in the future, but using 'data' on the app-level seems not to work
* currently exact match on the plugin label only.  Could extend this to search full text or tags, etc
* NOTE: cannot filter the input list to v-expansion-panels as that disrupts the tray_items_open list of indices, so instead we hide the child v-expansion-panel-header/content items.
@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

Merging #1253 (868cb7b) into main (28e28c5) will increase coverage by 0.49%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1253      +/-   ##
==========================================
+ Coverage   79.62%   80.11%   +0.49%     
==========================================
  Files          90       90              
  Lines        7223     7353     +130     
==========================================
+ Hits         5751     5891     +140     
+ Misses       1472     1462      -10     
Impacted Files Coverage Δ
jdaviz/app.py 91.21% <100.00%> (+0.06%) ⬆️
jdaviz/core/template_mixin.py 92.51% <0.00%> (-0.14%) ⬇️
...igs/specviz/plugins/line_analysis/line_analysis.py 78.72% <0.00%> (ø)
...configs/cubeviz/plugins/moment_maps/moment_maps.py 93.54% <0.00%> (+1.74%) ⬆️
...daviz/configs/default/plugins/collapse/collapse.py 98.03% <0.00%> (+1.96%) ⬆️
...igs/default/plugins/model_fitting/model_fitting.py 40.57% <0.00%> (+5.91%) ⬆️
...default/plugins/gaussian_smooth/gaussian_smooth.py 96.05% <0.00%> (+9.56%) ⬆️
...s/default/plugins/model_fitting/fitting_backend.py 93.02% <0.00%> (+15.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28e28c5...868cb7b. Read the comment docs.

@kecnry kecnry marked this pull request as ready for review April 18, 2022 19:23
Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Magical! Except the search bar does not respond to dark theme.

Screenshot 2022-04-20 135629

@kecnry
Copy link
Member Author

kecnry commented Apr 21, 2022

Except the search bar does not respond to dark theme.

Wasn't actually the search bar, but the entire plugin sidebar. I now fixed that to be responsive to the themes

Screen Shot 2022-04-21 at 1 15 35 PM Screen Shot 2022-04-21 at 1 15 17 PM

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks!

Copy link
Contributor

@javerbukh javerbukh left a comment

Choose a reason for hiding this comment

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

Works great!

@kecnry kecnry merged commit 9026b5a into spacetelescope:main Apr 22, 2022
@kecnry kecnry deleted the plugin-search branch April 22, 2022 12:48
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
embed Regarding issues with front-end embedding Ready for final review UI/UX😍
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants