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

Fix Slider description text overlap with value #3975

Merged
merged 5 commits into from Nov 8, 2021

Conversation

HenryRocha
Copy link
Contributor

@HenryRocha HenryRocha commented Oct 26, 2021

Issue: close #3804
Description: Change the BaseWidget's StyledWidgetLabel to calculate it's height automatically. Add e2e test to slider to check for proper spacing on long labels

Current
Screen Shot 2021-11-05 at 11 31 36 AM
Revised
issue3804

Above are the results of the proposed change.

Copy link
Collaborator

@mayagbarnes mayagbarnes left a comment

Choose a reason for hiding this comment

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

Hi @HenryRocha, thank you for your contribution! 😄
Looks pretty good, just a couple things:

  • Could you also add minHeight: theme.fontSizes.xl, ? This should help with the failing Cypress e2e tests.
  • It would be great to have an additional e2e snapshot test for a st.slider with a long label (incorporated through st_slider.py and st_slider.spec.js in the e2e folder)
    • I'm happy to work on this part (including generating the snapshot) if you'd prefer, just let me know!

Please feel free to reach out if you have any questions. Thanks again!

@mayagbarnes mayagbarnes self-assigned this Oct 29, 2021
@mayagbarnes mayagbarnes added the status:awaiting-user-response Issue requires clarification from submitter label Nov 2, 2021
@mayagbarnes mayagbarnes removed the status:awaiting-user-response Issue requires clarification from submitter label Nov 5, 2021
@LukasMasuch LukasMasuch self-requested a review November 5, 2021 23:52
Copy link
Collaborator

@LukasMasuch LukasMasuch left a comment

Choose a reason for hiding this comment

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

LGTM

@mayagbarnes mayagbarnes merged commit 3873c61 into streamlit:develop Nov 8, 2021
kajarenc added a commit that referenced this pull request Nov 11, 2021
)

* * class based draft front implementation for camera_image_input

* Remove old 'Machine ID' metrics (#3999)

* Remove old 'Machine ID' metrics

* Fix tests

* pyformat

* * Rewrite CameraImageInput behaviour similar to FileUploader widget behaviour

* * Rewrite CameraImageInput behaviour similar to FileUploader widget behaviour

* * Remove commiting data to backend from CameraImageInput widget for now

* * Remove unused value from CameraImageInput widget signature

* Feature/memory metrics (#4016)

This adds a new endpoint, `/metrics`, which provides a point-in-time snapshot of the memory allocated for objects in various caches and file managers, in OpenMetrics format, both text and protobuf.

Co-authored-by: Tim Conkling <tconkling@gmail.com>

* Fix running icon to display with dark/custom themes (#3995)

* Initial draft fix

* Update to cover custom bg colors

* Reverse change in styled components

* Add testing

* Improve variable names & notes

* Revise w/ getLuminance method & add snapshot tests

* Allow resize w or w/o specified height (#3955)

* Add ability to set text placeholder for text_input (#3954)

* Draft of text_input placeholder

* Add FE text for text_input placeholder

* Update formatting

* Isolate text_input changes

* Update to keyword only

* Update parameter notes

* Fix lint error

* Update w/ e2e tests

* Modify snapshots

* Add ability to set text placeholder for text_area (#3946)

* Updates to text_area

* Add FE test

* Update to keyword arg & throw error

* Remove custom error

* Fix lint error

* Add snapshot tests for placeholder

* Update e2e tests

* Modify snapshots

* Cloud info updates in README (#4013)

* Cloud info updates in ReadMe

Updated Cloud wording, blog and sign-up links.

* Cloud updates in README

Updated wording and fixed grammatical nit

* Add `files` to CameraImageInput react state, similar to FileUploader

* Add methods from FileUploader to CameraImageInput for working with files state field

* Integrate react-webcam into CameraImageInput component, send image to backend

* Fix code font size variable (#3926)

* fix code font size variable

* change code font size variable

* Adjust body & headings line-height

* Update FE test snapshot & cypress snapshots

* Update snapshots

* Reconcile snapshot conflict

Signed-off-by: Faiazov Dmitrii <jjsolutions0110@gmail.com>
Co-authored-by: mayagbarnes <maya8617@gmail.com>
Co-authored-by: Maya Barnes <63436329+mayagbarnes@users.noreply.github.com>

* Fix Slider description text overlap with value (#3975)

* Fix Slider description text overlap with value

* Add minHeight

* Add e2e test for slider w/ long label

* Fix lint errors

* Add new cypress snapshots

Co-authored-by: mayagbarnes <maya8617@gmail.com>

* Graphviz 0.18 support (#4026)

Graphviz 0.18 changed a module name, which is causing failures

* Add PEP 561 support to Streamlit (#4025)

Streamlit itself already has (some) type annotations, and we type-check the library itself.

But: apps that install Streamlit via pip can not currently typecheck that Streamlit import because Streamlit is not a "PEP 561 compatible package".

https://mypy.readthedocs.io/en/stable/installed_packages.html

(Note that this does *not* mean we need to type-annotate everything in Streamlit; we can continue to gradually type as we go.)

(This is a pre-req for addressing #4018)

* Improve st_slider test & fix snapshot (#4029)

* * Implement "Permission" screen draft
* Implement "Take new picture" functionality

* * Remove dot from docstring

* * Remove `label` argument for camera_image_input
* Fix docstring

* * Change buttons to styled `UIButton`, set screenshot quality to maximum

* * Make form work correctly inside `clear_on_submit` form

* Add width to video constraints

* Fix typo

Co-authored-by: Thiago Teixeira <thiago@streamlit.io>
Co-authored-by: Amanda Walker <amanda@amandawalker.io>
Co-authored-by: Tim Conkling <tconkling@gmail.com>
Co-authored-by: Maya Barnes <63436329+mayagbarnes@users.noreply.github.com>
Co-authored-by: JessSm3 <93676850+JessSm3@users.noreply.github.com>
Co-authored-by: Dmitrii Faiazov <82709517+scientia-ac-labore@users.noreply.github.com>
Co-authored-by: mayagbarnes <maya8617@gmail.com>
Co-authored-by: Henry Rocha <henryrocha@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slider value and description text overlap for slider in sidebar with long description
3 participants