-
Notifications
You must be signed in to change notification settings - Fork 114
feat(pci-kubernetes): add name section #21291
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
base: feat/TAPC-2217-mks-redesign-creation-page
Are you sure you want to change the base?
feat(pci-kubernetes): add name section #21291
Conversation
97dc0c3 to
1c64569
Compare
86f29f2 to
4bbc997
Compare
4bbc997 to
e9dfeae
Compare
lolottetheclash
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generic section is well thought out with the Path here:
type TNameSectionProps<FormSchema extends object> = {
fieldName: Path<FormSchema>;
fieldHelper: string;
};
Well done!
...es/manager/apps/pci-kubernetes/src/pages/new/components/CreateClusterForm.component.spec.tsx
Outdated
Show resolved
Hide resolved
e9dfeae to
c3b02d7
Compare
...manager/apps/pci-kubernetes/src/pages/new_v2/components/CreateClusterForm.component.spec.tsx
Show resolved
Hide resolved
...ager/apps/pci-kubernetes/src/pages/new_v2/hooks/useCreateClusterForm/useCreateClusterForm.ts
Show resolved
Hide resolved
packages/manager/apps/pci-kubernetes/src/components/create/NameSection.component.tsx
Outdated
Show resolved
Hide resolved
packages/manager/apps/pci-kubernetes/src/pages/new/components/CreateClusterForm.component.tsx
Outdated
Show resolved
Hide resolved
d062ce1 to
3140245
Compare
| <FormFieldHelper className="flex flex-col"> | ||
| {helperEntries.map((entry, index) => ( | ||
| <Text preset="caption" key={index}> | ||
| {entry} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great
| </div> | ||
| <FormProvider {...form}> | ||
| <div className="flex flex-col gap-6 md:flex-row"> | ||
| <section className="flex-[2]"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and md:basis-2/3 instead
| <ClusterNameSection /> | ||
| <Divider spacing={dividerSpacing} /> | ||
| </section> | ||
| <aside className="flex-1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
md:basis-1/3 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recommended way is actually to use the flex property rather than just flex-basis (especially cause it also includes a flex-grow property).
Plus I think we should not change our codes out of fear of custom values when Tailwind intentionally lets us decide which value we should use (https://tailwindcss.com/docs/flex) 😅
|
|
||
| export type TCartProps = { | ||
| items: TCartItem[]; | ||
| confirmDisabled: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: confirmDisabled ? I don't get the name of this props. it suggest an action since confirm is used as an imperative verb. Since it's used to disable a button why not just "isActionDisabled" or something like that ?
| helperEntries: Array<string>; | ||
| }; | ||
|
|
||
| export const NameSection = <FormSchema extends object>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from object to FieldValues
import { FieldValues, Path, useFormContext } from 'react-hook-form';
FormSchema extends FieldValues
1f4ba46 to
a1787eb
Compare
723d44c to
6042891
Compare
3140245 to
b597434
Compare
ref: #TAPC-5326 Signed-off-by: Thomas Esseul <[email protected]>
b597434 to
170abbe
Compare
ref: #TAPC-5326
Description
Ticket Reference: #...
Additional Information