Skip to content

Conversation

@hyerr1
Copy link

@hyerr1 hyerr1 commented Apr 26, 2021

Issue: #3071

Description: This PR fixes visual inconsistencies that may occur when creating widgets in a beta_columns container without specifying a label.

  • Updated Selectbox component's label+help element structure to make it vertically align properly with other widget types when all widgets in a beta_columns container are unlabeled
  • Updated Selectbox.test.tsx to ensure that a label element always exists within a Selectbox component, even if a label is not specified, for accessibility purposes
  • Added 2 more CSS properties to StyledWidgetLabel component to ensure that widgets in beta_columns container are vertically aligned when there is a combination of labeled & unlabeled widgets

Contribution License Agreement

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

hyerr1 added 2 commits April 25, 2021 20:12
Remove renderLabel method and update selectbox label stucture to use
that of similarly sized widgets like text_input
Update StyledWidgetLabel's CSS properties to ensure that a widget's
vertical position remains the same with or without a label
@hyerr1 hyerr1 requested a review from a team April 26, 2021 01:21
@stale
Copy link

stale bot commented May 10, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 10, 2021
@kmcgrady
Copy link
Collaborator

Sorry for the delay. I am on vacation but will review it when I get back this week.

@kmcgrady
Copy link
Collaborator

Hey @hyerrakalva Thanks for implementing this and sorry for the delay (I was on vacation)!

Looks like the tests are failing.

I believe the latest from develop will work for the python 3 test scenarios.

As for the cypress tests. Looks like they are snapshot issues, and it looks like these are related to just small margin adjustments.

I'd say take a look and see if you https://github.com/streamlit/streamlit/wiki/Running-e2e-tests-and-updating-snapshots#the-diffmazing-cropper This will work for multiselect and radio. The color picker needs and adjustment due to a different image size. I think this is a good starting point, and I can get the updated image in.

@hyerr1
Copy link
Author

hyerr1 commented May 17, 2021

@kmcgrady Alright, I'll take a look into that this week!

@tconkling tconkling mentioned this pull request May 25, 2021
@tconkling
Copy link
Contributor

Hey @hyerrakalva - I've pulled your changes into another branch (#3317) to help get it over the finish line. Design is taking a look at the CSS changes now, and hopefully we'll merge to develop soon. Thanks for getting the ball rolling, and your work on this!

@tconkling tconkling closed this May 25, 2021
@hyerr1
Copy link
Author

hyerr1 commented May 26, 2021

For sure, glad I could help!

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.

3 participants