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

Make mosviz visibility fallback more robust #1808

Merged

Conversation

duytnguyendtn
Copy link
Collaborator

@duytnguyendtn duytnguyendtn commented Nov 1, 2022

Description

Hi again... 😅

So #1798 didn't quite do what @kecnry and I were expecting, so I'm going to reintroduce the original solution I was proposing. After a much thorough second lookthrough, I'm further convinced this is the correct logic we want.

The reason why the missing row elements were visible was because the mosviz visibility fallback for when the object's row is None was to return !returnExtraItems. This flag is intended for the "show/hide all other data" dropdown. Effectively, if it the row information was missing, it would always show the item as visible.

Instead, I propose any data without a row should follow the same visibility rules of whether the user manually visualizes the dataset or not. FWIW, this PR brings the mosviz visibility logic in line with the default fallback:

// for any situation not covered above, default to showing the entry
return this.dataItemInViewer(item, returnExtraItems)

As penance, I won't be marking this one as trivial 😅

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)?

@duytnguyendtn duytnguyendtn added this to the 3.1.1 milestone Nov 1, 2022
@duytnguyendtn duytnguyendtn added 💤backport-v3.1.x on-merge: backport to v3.1.x mosviz labels Nov 1, 2022
@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Base: 88.06% // Head: 88.04% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (ba21d1a) compared to base (914c940).
Patch has no changes to coverable lines.

❗ Current head ba21d1a differs from pull request most recent head d7509c7. Consider uploading reports for the commit d7509c7 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1808      +/-   ##
==========================================
- Coverage   88.06%   88.04%   -0.02%     
==========================================
  Files          95       95              
  Lines       10204    10197       -7     
==========================================
- Hits         8986     8978       -8     
- Misses       1218     1219       +1     
Impacted Files Coverage Δ
jdaviz/core/template_mixin.py 92.26% <0.00%> (-0.18%) ⬇️
...nfigs/default/plugins/plot_options/plot_options.py 98.05% <0.00%> (-0.02%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

CHANGES.rst Outdated Show resolved Hide resolved
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.

Seems to work as intended now. Tried adding data to the viewer, selecting different rows, removing data from viewer, selecting data again, and no problems. Nice!

@duytnguyendtn
Copy link
Collaborator Author

Thanks for the reviews! Did a squash and rebase; will merge after the tests pass

@duytnguyendtn duytnguyendtn merged commit 5038261 into spacetelescope:main Nov 2, 2022
meeseeksmachine pushed a commit to meeseeksmachine/jdaviz that referenced this pull request Nov 2, 2022
pllim added a commit that referenced this pull request Nov 2, 2022
…8-on-v3.1.x

Backport PR #1808 on branch v3.1.x (Make mosviz visibility fallback more robust)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mosviz 💤backport-v3.1.x on-merge: backport to v3.1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants