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

redshift slider select wide enough to avoid overflow #989

Merged
merged 3 commits into from
Dec 8, 2021

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Dec 7, 2021

Description

This pull request fixes a minor annoyance in the width of the select element (between redshift and RV) in the specviz redshift slider. See before and after screenshots below.

Screen Shot 2021-12-07 at 10 20 40 AM

Screen Shot 2021-12-07 at 10 20 23 AM

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? Milestone is only currently required for PRs related to Imviz MVP.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@kecnry kecnry added this to the 2.1 milestone Dec 7, 2021
@kecnry kecnry added the no-changelog-entry-needed changelog bot directive label Dec 7, 2021
@codecov
Copy link

codecov bot commented Dec 7, 2021

Codecov Report

Merging #989 (a94ab1b) into main (ef350a4) will decrease coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #989      +/-   ##
==========================================
- Coverage   70.64%   70.53%   -0.12%     
==========================================
  Files          74       74              
  Lines        5437     5437              
==========================================
- Hits         3841     3835       -6     
- Misses       1596     1602       +6     
Impacted Files Coverage Δ
...configs/default/plugins/data_tools/file_chooser.py 65.71% <0.00%> (-3.43%) ⬇️

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 ef350a4...a94ab1b. Read the comment docs.

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.

Nice. Somehow I never thought to change this despite it bugging me.

@pllim
Copy link
Contributor

pllim commented Dec 7, 2021

Screenshot 2021-12-07 170031

Is fixing RV value getting cut off in scope here or not? This screenshot was taken using this PR branch.

* dynamic width could be an option down the road, but will need to be clever to avoid jittering and encroaching on the slider too much
* hooks into the @change signal and strips any non-numeric characters from the input string
* using type="number" is another option, but adds arrow buttons which are difficult to hide and take up precious space
@kecnry
Copy link
Member Author

kecnry commented Dec 8, 2021

Updated the PR to also set a min-width on the text input with room for 6 digits (and while I was at it, I fixed the text-input to not crash when putting in non-numeric characters). We may want to consider a dynamic width at some point, but that proved to be a bit tricky to avoid jittering and encroaching on the space of the slider itself.

Screen Shot 2021-12-08 at 9 47 26 AM

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.

Let's get this in. Thanks!

@pllim pllim merged commit aa2efc4 into spacetelescope:main Dec 8, 2021
@kecnry kecnry deleted the redshift-slider-width branch December 8, 2021 15:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants