-
Notifications
You must be signed in to change notification settings - Fork 98
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
feat(onboarding): improve onboarding template component #13134
Conversation
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 improvement 👍🏻
</div> | ||
)} | ||
<section className="flex flex-col items-center mt-8"> | ||
<img className="max-h-28" src={placeholderSrc} {...img} /> |
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.
nitpick(blocking):placeHolderSrc
is just an example image. We have to consider the src
from img
tag if it's present. This causes confusion if it display the img.src
or placeholderSrc
.
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 img.src
overwrite the src already set. Same if className exists on img props.
You want still I add more logic for readability ?
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.
Maybe we should concat img.className with the current className instead of overwriting it completely though
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.
It's a choice.
- No do that allow to have more flexibility.
- Do that add behavior by default but can add adverse reaction on specific case.
Example : On MANAGER-14496 see #13146 . We have image with text title. So I want set max-h-36
It's easier it className is overwrite. And if we add a className. I think you can be responsible of all display rules.
After. May be export DEFAULT_MAX_HEIGHT_CLASS
if we want add possibility to extends on parent component ?
I try to keep simple. That's how I did it. But not hesitate if you think it's better to do otherwise
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.
I agree with @chipp972 for concatenating the classname.
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.
Done. Not hesitate to say me if change is good for you ;)
38c94e2
38c94e2
to
54e47b7
Compare
packages/manager-react-components/src/components/templates/onboarding/onboarding.component.tsx
Outdated
Show resolved
Hide resolved
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.
Unit test to fix
54e47b7
to
c6199bc
Compare
c6199bc
to
8e37c2a
Compare
packages/manager-react-components/src/components/templates/onboarding/onboarding.component.tsx
Outdated
Show resolved
Hide resolved
Use React.ComponentProps to improve flexibility of image rules Signed-off-by: Thibault Barske <[email protected]>
8e37c2a
to
4caca80
Compare
Quality Gate passedIssues Measures |
Use React.ComponentProps to improve flexibility of image rules Signed-off-by: Thibault Barske <[email protected]>
develop
Only FR translations have been updatedTicket reference is mentioned in linked commits (internal only)Breaking change is mentioned in relevant commitsDescription
Improve img props type to add more flexibility on image rules and be more readable