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

Update TextBox component #4579

Merged

Conversation

magicznyleszek
Copy link
Member

@magicznyleszek magicznyleszek commented Aug 10, 2023

Description

Update looks of TextBox component and cleanup its usage.

Notes

Things here:

  • Unified looks of TextBox component - former 'on-white' type is now de-facto only style (notice the plenty places with removed m='on-white')
  • We are slowly moving towards 12px and 14px font sizes
  • TextBox has now 100% width
  • Dropped description option from TextBox (never used)
  • TextBox is now Functional Component with CSS Module
  • Moved some BEM components definitions to the files that use them
  • Moved MetadataEditor styles to separate file
  • Updated all the places that were overriding .text-box directly
  • Cleaned up ConnectProjects a tiny bit
  • Updated focus styles for Button component
  • Use focus-visible instead of focus for global focus styles

Related issues

Fixes #3914

@magicznyleszek magicznyleszek changed the base branch from main to feature/password-complexity August 11, 2023 11:42
@magicznyleszek magicznyleszek marked this pull request as ready for review August 11, 2023 11:59
@srartese srartese self-requested a review August 12, 2023 00:19
@srartese
Copy link
Contributor

Since this links to issue #3914, how much of these styles are we adhering to? For example I see that you unified the text box styles with your changes but we don't have the change when searching and letters being bolded.
Screen Shot 2023-08-16 at 12 45 08 PM

@magicznyleszek
Copy link
Member Author

@srartese right, sorry - that old issue is not that up-to-date. The latest designs for TextBox are at https://www.figma.com/file/AL7q1d3qNr9XILJxBjyxcn/Website-%2B-KPI-%2F-Password-Forms?type=design&node-id=199%3A7582&mode=design&t=lg1f3uo914tvV2TM-1 and the "searching and letters being bolded" part is for KoboSelect component.

…omponent

# Conflicts:
#	jsapp/js/account/security/password/updatePasswordForm.module.scss
@srartese
Copy link
Contributor

srartese commented Aug 18, 2023

  • In that case there are a few discrepancies for active styles and errors. The glow in Figma around the box has more of a shadow than the current version.
Screen Shot 2023-08-17 at 6 57 17 PM Screen Shot 2023-08-17 at 6 57 03 PM
  • Error textbox is missing icon and color is changing the label when it shouldn't be.
Screen Shot 2023-08-17 at 6 59 30 PM Screen Shot 2023-08-17 at 7 00 00 PM
  • Lastly, the login modal text boxes are not updated with the new style.
Screen Shot 2023-08-17 at 7 06 40 PM

@magicznyleszek
Copy link
Member Author

magicznyleszek commented Aug 23, 2023

@srartese I've pushed a lot of changes :P I found a more complete Figma designs and updated everything accordingly (besides option "Populated" x "Error", which I feel has wrong text color by mistake). I also updated the storybook definition for TextBox, so you can test everything there (if you haven't done so already) :)

As for the login page (or rather all Django templates), this would require a lot more work and turning those forms into React apps. I will create a separate GH issue for handling that. We might be doing this soon when we redesign those pages (Figma design is already done)

Copy link
Contributor

@srartese srartese left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
Contributor

Choose a reason for hiding this comment

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

I know this wasn't a change you made but since we are updating this file should we change these to use the sizes variables here? IE: margin-right: 24px; to margin-right: sizes.$x24;

@magicznyleszek magicznyleszek merged commit 5ac0c9c into feature/password-complexity Aug 30, 2023
1 of 3 checks passed
@magicznyleszek magicznyleszek deleted the 3914-update-textbox-component branch August 30, 2023 15:57
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.

Update TextBox component design
2 participants