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

Adding TextFieldBase component #16043

Merged
merged 11 commits into from
Oct 6, 2022
Merged

Conversation

georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Sep 30, 2022

Explanation

Adding TextFieldBase component as a base for all text type components. Borrowed some architectural decisions from material ui

Architecture

The TextFieldBase component is made up of 2 components the wrapping <Box /> and <Text /> components. The Box contains all of the visual css and allows for right and left accessories to be placed outside of the html input element. The html input element is the root element of the Text component. In a previous PR I forwarded refs to both Box and Text to allow for focusing during the onClick on the wrapping Box component. This allows for the input to look focused while maintaining the left and right accessories to be focusable using the keyboard and maintaining accessibility

Screen Shot 2022-10-04 at 1 52 54 PM

tabbing.mov

More Information

Fixes #15099
Figma link

Screenshots/Screencaps

text-field-base.mov

Manual Testing Steps

  • Go to the latest build of storybook on this PR

Pre-Merge Checklist

  • PR template is filled out
  • IF this PR fixes a bug, a test that would have caught the bug has been added
  • PR is linked to the appropriate GitHub issue
  • PR has been added to the appropriate release Milestone

+ If there are functional changes:

  • Manual testing complete & passed
  • "Extension QA Board" label has been applied

@georgewrmarshall georgewrmarshall self-assigned this Sep 30, 2022
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@georgewrmarshall georgewrmarshall added area-UI Relating to the user interface. team-design-system All issues relating to design system in Extension IA/NAV DO-NOT-MERGE Pull requests that should not be merged labels Sep 30, 2022
@georgewrmarshall georgewrmarshall force-pushed the feat/15099/base-input branch 3 times, most recently from 79138ed to fbdad7e Compare October 4, 2022 21:08
@georgewrmarshall georgewrmarshall changed the title Adding TextInputBase component (WIP) Adding TextInputBase component Oct 4, 2022
@georgewrmarshall georgewrmarshall marked this pull request as ready for review October 4, 2022 21:12
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner October 4, 2022 21:12
@georgewrmarshall georgewrmarshall removed the DO-NOT-MERGE Pull requests that should not be merged label Oct 5, 2022
@metamaskbot
Copy link
Collaborator

Builds ready [61a10d3]
Page Load Metrics (2347 ± 90 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint88161112199
domContentLoaded16492544232319493
load17112544234718790
domInteractive16492544232319493

highlights:

storybook

@metamaskbot
Copy link
Collaborator

Builds ready [dc06a8d]
Page Load Metrics (2244 ± 54 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint882168213449216
domContentLoaded18782377221411555
load18782399224411254
domInteractive18782377221411555

highlights:

storybook

@georgewrmarshall georgewrmarshall mentioned this pull request Oct 6, 2022
6 tasks
@georgewrmarshall georgewrmarshall changed the title Adding TextInputBase component Adding TextFieldBase component Oct 6, 2022
@metamaskbot
Copy link
Collaborator

Builds ready [ee76b6c]
Page Load Metrics (2378 ± 68 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint93143116147
domContentLoaded21092640236213464
load21092653237814168
domInteractive21092639236213464

highlights:

storybook

Copy link
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

Awesome

<TextFieldBase
placeholder="MetaMask"
rightAccessory={
// TODO: replace with ButtonIcon
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@georgewrmarshall georgewrmarshall merged commit 055a7c5 into develop Oct 6, 2022
@georgewrmarshall georgewrmarshall deleted the feat/15099/base-input branch October 6, 2022 19:41
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-UI Relating to the user interface. team-design-system All issues relating to design system in Extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ext Nav] Create component: TextFieldBase
4 participants