-
Notifications
You must be signed in to change notification settings - Fork 278
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
Migrate additional basic components with Material 3 equivalents to googlesitekit-components-gm2
package
#6113
Comments
@tofumatt @techanvil Would love to get your thoughts here. |
Hey @felixarntz, good spot here!
|
Looks like we might want to add Lines 23 to 24 in 36045e5
|
@felixarntz @tofumatt Can you please take a look at this one? This is a blocker for our next steps on the GM3 Branding Phase 1 work. Thank you! |
I don't think I have much to add here, I think everything's been covered by Tom. @techanvil Would it be a good idea to make a new I've added ACs (largely copied from the quoted comment) and I'll leave them with @felixarntz to review. 👍🏻 |
Hey @tofumatt, I'm not quite sure what you mean by this point, would you mind clarifying? |
Also, a few points regarding the AC.
|
@tofumatt Regarding the ACs, I have nothing to add to @techanvil's feedback above, which I agree with. Let's clarify Regarding Regarding |
I think the existing At this point I think @techanvil is a lot more versed in these components and would be better-suited to finished up these ACs, I think it's mostly a game of telephone from his comments to my AC-writing, but it might be better if you wrap this one up @techanvil because I think you have a lot more context than me on it! 😅 |
Thanks @tofumatt, happy to pick this up and I've now updated the AC. A couple of points:
|
@techanvil ACs LGTM, only I'm not a fan of making it part of ACs to open other issues, unless it's not clear whether those need to be opened (e.g. something needs to explored as part of IB / PR and potentially a new issue needs to be opened). It seems to me that here we could just open those issues right away with what you have in here and start working on ACs as it is feasible (of course for the ones with external dependencies we'll need to wait). |
Thanks @techanvil, ACs LGTM! |
IB ✔️ |
Hi @bethanylang, thank you for checking. I'm aiming to get this into CR by EOD today. However, #6651 will most likely still need to roll over partly. |
…al-3-equivalents Migrate Material 3 equivalents to `googlesitekit-components` package
See #5958 (comment):
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
CircularProgress
component should be moved to thegooglesitekit-components-gm2
package.TextField
component should be created ingooglesitekit-components-gm2
that wraps usage ofTextField
,Input
andHelperText
from@material/react-text-field
.Implementation Brief
CircularProgress
componentCircularProgress
fromassets/js/material-components/index.js
.googlesitekit-components-gm2
module by exporting it fromassets/js/googlesitekit/components-gm2/index.js
andassets/js/googlesitekit-components-gm2.js
.CircularProgress
component that returnsnull
, inassets/js/googlesitekit/components-gm3/CircularProgress.js
, and add this to thegooglesitekit-components-gm3
module.TextField
componentTextField
component withinassets/js/googlesitekit/components-gm2/TextField.js
, to be implemented as detailed below.googlesitekit-components-gm2
module by exporting it fromassets/js/googlesitekit/components-gm2/index.js
andassets/js/googlesitekit-components-gm2.js
.TextField
component that returnsnull
, inassets/js/googlesitekit/components-gm3/TextField.js
, and add this to thegooglesitekit-components-gm3
module.@material/react-text-field
fromassets/js/material-components/index.js
.Implement the GM2 version as follows:
TextField
,HelperText
andInput
from@material/react-text-field
.@material/react-text-field
version ofTextField
will be referred to asMaterialTextField
in the rest of this IB to avoid confusion with theTextField
wrapper we are creating.MaterialTextField
props and their types:className
:string
name
:string
label
:string
noLabel
:boolean
outlined
:boolean
textarea
:boolean
trailingIcon
:element
helperText
:string
(this becomes thechildren
ofHelperText
)floatingLabelClassName
- we are providing the valuemdc-floating-label--float-above
in some cases, however this is the default and needn't be specified.disabled
- this is not a valid prop forMaterialTextField
and doesn't do anything.required
- the same applies as fordisabled
.Input
props and their types:id
:string
inputType
:string
('textarea'
, or'input'
, which is the default forInput
).value
:string
- this is required, and is the only required prop.size
:number
maxLength
:number
tabIndex
:number | string
disabled
:boolean
onChange
:function
onKeyDown
:function
@material/react-text-field
components will be done in a subsequent issue, Replace direct usage of components from@material/react-text-field
with the newTextField
component. #6651.Test Coverage
TextField
component using React Testing Library.QA Brief
Components/Text Fields
Storybook story has Text Inputs that look and behave normally.SpinnerButton
Storybook story to ensure theCircularProgress
works correctly.Changelog entry
TextField
component to our GM2 component library.The text was updated successfully, but these errors were encountered: