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

Add short plugin description to each plugin under title #3268

Merged
merged 9 commits into from
Nov 14, 2024

Conversation

cshanahan1
Copy link
Contributor

@cshanahan1 cshanahan1 commented Nov 6, 2024

Adds a short one sentence description of each plugin in the side menu under the plugin title, that is visible before the plugin is opened. This PR also enables search based on text in the plugin description.
Screenshot 2024-11-07 at 10 06 32 AM

@github-actions github-actions bot added cubeviz specviz imviz plugin Label for plugins common to multiple configurations labels Nov 6, 2024
@cshanahan1 cshanahan1 added this to the 4.1 milestone Nov 7, 2024
@cshanahan1 cshanahan1 marked this pull request as ready for review November 7, 2024 17:00
@Jenneh
Copy link
Collaborator

Jenneh commented Nov 7, 2024

Looks great!

@Jenneh
Copy link
Collaborator

Jenneh commented Nov 7, 2024

Remove the 'docs description' if it only repeats information from the title description. In the case where new information is included, keep the description but remove the repetitive part.

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 7 lines in your changes missing coverage. Please review.

Project coverage is 88.80%. Comparing base (3b00695) to head (faa55c6).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
jdaviz/core/template_mixin.py 46.15% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3268      +/-   ##
==========================================
+ Coverage   88.76%   88.80%   +0.04%     
==========================================
  Files         125      125              
  Lines       18961    19009      +48     
==========================================
+ Hits        16830    16881      +51     
+ Misses       2131     2128       -3     

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

jdaviz/app.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@rosteen rosteen left a comment

Choose a reason for hiding this comment

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

I left one minor suggestion but other than that, looks good.

@kecnry
Copy link
Member

kecnry commented Nov 14, 2024

just had an idea (not necessary for this PR, but it might be super simple) - could these strings be included in the logic for plugin search at the top? See trayItemVisible in app.vue... might just be trayItem.label.toLowerCase().indexOf(tray_items_filter.toLowerCase()) !== -1 || trayItem.plugin_description.toLowerCase().indexOf(tray_items_filter.toLowerCase()) !== -1 (basically any substring match in the title or description)

Copy link
Member

@kecnry kecnry 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 really great and quite excited about the search ability! (Thought for the future: we could also have a list of keywords for each plugin which aren't displayed but would still match the search).

One question: Why do some plugins set self._plugin_description and others self.plugin_description? Is there a benefit to going through the setter or not in the inits - and can we stick with one or the other?

I'm also going to open a small PR to your branch with some styling tweaks to tighten the padding. Feel free to take it or leave it or modify further. We can also run this by Jenn at some point for future additional styling tweaks.

@cshanahan1 cshanahan1 enabled auto-merge (squash) November 14, 2024 19:46
@cshanahan1 cshanahan1 merged commit f715ffe into spacetelescope:main Nov 14, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cubeviz imviz plugin Label for plugins common to multiple configurations specviz
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants