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

Jdaviz Launcher: Identify compatible configs and request user to select config #2267

Merged
merged 9 commits into from
Jul 7, 2023

Conversation

duytnguyendtn
Copy link
Collaborator

@duytnguyendtn duytnguyendtn commented Jun 26, 2023

  • Fix change log entry introduced in Jdaviz Launcher #2257 . Need to mention CLI --layout that is reintroduced.

Description

This pull request extends #2257 when a filepath is provided, identify the file and enable/disable the relevant config buttons that are compatible. Then allow the user to select the configuration they would like to load with the data selected:

SpecvizExample.-.Jupyter.Notebook.-.Brave.2023-06-26.17-53-28.mp4

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge. If no, maintainer
    should add a no-changelog-entry-needed label.

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 milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@github-actions github-actions bot added the documentation Explanation of code and concepts label Jun 26, 2023
@duytnguyendtn duytnguyendtn mentioned this pull request Jun 28, 2023
9 tasks
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.

Some quality-of-life improvement ideas:

  • There needs to be some user feedback when a file is not found. Right now, it does nothing and also does not emit any error message. For example, what if I accidentally think the instance is launched from my working dir like normal notebook (it is not, it is in a temp dir but this is hidden from user) and I entered the filename without path?
  • There needs to be some basic instructions on how to use the UI elements in the launcher itself. Having to enter text field by hand and then click on 🔍 is not a common workflow (for example, you don't do this in Photoshop).
  • Make it clearer in the launcher that if you click on the viz button with blank text field, you are going to launch empty viz and lose the launcher.

@pllim pllim added this to the 3.6 milestone Jul 3, 2023
@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Patch coverage: 38.18% and project coverage change: -0.04 ⚠️

Comparison is base (4c859b7) 90.89% compared to head (9427518) 90.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2267      +/-   ##
==========================================
- Coverage   90.89%   90.85%   -0.04%     
==========================================
  Files         152      152              
  Lines       17060    17070      +10     
==========================================
+ Hits        15506    15509       +3     
- Misses       1554     1561       +7     
Impacted Files Coverage Δ
jdaviz/core/data_formats.py 76.53% <33.33%> (-1.85%) ⬇️
jdaviz/core/launcher.py 35.18% <37.50%> (+19.56%) ⬆️
jdaviz/cli.py 21.12% <50.00%> (+1.12%) ⬆️
jdaviz/__init__.py 88.23% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@duytnguyendtn duytnguyendtn marked this pull request as ready for review July 3, 2023 19:07
CHANGES.rst Outdated Show resolved Hide resolved
@duytnguyendtn
Copy link
Collaborator Author

Responding to @pllim's comments:

Great points! I agree with all of them, though we are doing a UI overhaul of the launcher in an upcoming effort (probably at the same time we write the docs and advertise the functionality to the public). As such, all your points I think should be addressed in our UI effort for the launcher. This PR should be thought of as a technical demonstration of hooking in the autoidentification to the launcher.

The only thing I wanted to confirm was your first point with an invalid path. I verified that if the user attempts to identify a filepath that doesn't exist, it returns a proper traceback (again thinking from the technical side), which it does. Admittedly, I think what you're describing here is if the user enters a filepath but does NOT identify the file, then the config buttons ignore the filepath and loads an empty viz. While I agree it's confusing, I think this is something that should be discussed in the UI effort. I'm not sure there is a clear answer to this one. For instance, I could see a few different ways this could be addressed:

  1. If the user enters any text into the field, the config buttons disable themselves until the user enters the identify button
  2. Some UI element indicates explicitly the data being loaded (and explicitly says Data: None or Config: Blank and the behavior is kept as is
  3. As the user enters text, form validation is applied and when a valid file is entered, the autoidentification runs automatically

Again, all great points, I just feel out of scope, since we aren't advertising it and the UI ticket is coming up

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.

Seems reasonable to me. Discussing offline, we'll defer the decision to migrate this logic to a full-fledged vue-template to the UI work, at which point we can iterate further on UX details.

@pllim
Copy link
Contributor

pllim commented Jul 7, 2023

Again, all great points, I just feel out of scope, since we aren't advertising it and the UI ticket is coming up

Okay, where is the UI ticket? I want to copy the comments there. Thanks!

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.

Kyle said he added my comments to the JIRA ticket. So LGTM now. Thanks!

@pllim pllim merged commit 683d989 into spacetelescope:main Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Explanation of code and concepts Ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants