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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 10 commits into from
Nov 4, 2021

Conversation

mayagbarnes
Copy link
Collaborator

@mayagbarnes mayagbarnes commented Nov 1, 2021

馃摎 Context

When in dark mode, the running image/gif in the top right corner of apps is not showing. Product was hoping for a more robust solution for dark backgrounds, not limited to the dark theme - so new approach of testing the current background to see if its light or dark was adopted.

  • What kind of change does this PR introduce?

    • Bugfix
    • Feature
    • Refactoring
    • Other, please describe: Styling

馃 Description of Changes

  • Updated styling logic to test for the current background color and adjust <img> accordingly (using color2k's getLuminance()).

    • This is a breaking API change
    • This is a visible (user-facing) change

Revised:

Dark Theme:
Screen Shot 2021-11-01 at 1 22 07 PM
Custom Theme:
Screen Shot 2021-11-01 at 1 23 34 PM
Light Theme:
Screen Shot 2021-11-01 at 1 22 20 PM
Current:

Dark Theme:
Screen Shot 2021-11-01 at 1 28 29 PM

Custom Theme:
Screen Shot 2021-11-01 at 1 27 45 PM

Light Theme:
Screen Shot 2021-11-01 at 1 28 40 PM

馃И Testing Done

  • Screenshots included
  • Added/Updated unit tests
  • Added/Updated e2e tests

馃寪 References

Does this depend on other work, documents, or tickets?


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@mayagbarnes mayagbarnes changed the title Running man Fix running icon to display with dark/custom themes Nov 1, 2021
@mayagbarnes mayagbarnes marked this pull request as draft November 2, 2021 20:04
@mayagbarnes mayagbarnes marked this pull request as ready for review November 3, 2021 14:51
@mayagbarnes mayagbarnes merged commit bbbe81b into streamlit:develop Nov 4, 2021
@mayagbarnes mayagbarnes deleted the running-man branch November 4, 2021 20:27
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.

Running man not showing in dark mode
2 participants