-
Notifications
You must be signed in to change notification settings - Fork 330
Enhancement/#11812 - Implement new designs for the TourTooltip component
#11934
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: develop
Are you sure you want to change the base?
Conversation
Adjust close icon size and conditionally render indicators based on feature availability.
…omponent. Adjust tooltip display based on setup flow refresh feature availability.
…ant. Enhance decorators for fetchMock setup to improve story switching functionality.
|
Storybook is ready:
|
|
Size Change: +2.73 kB (+0.12%) Total Size: 2.22 MB ℹ️ View Unchanged
|
|
Build files for fba95fd are ready:
|
nfmohit
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.
Thank you for your work on this, @hussain-t.
I've left a number of comments for your consideration. Please let me know if you have any questions or concerns. Thanks!
| .googlesitekit-tooltip-title { | ||
| font-family: $f-primary; | ||
| font-size: $fs-title-lg; | ||
| font-weight: $fw-medium; | ||
| letter-spacing: $ls-xxs; | ||
| line-height: $lh-title-lg; | ||
| margin-bottom: 8px; | ||
| } |
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.
According to the Figma designs, typography for this should be title-md.
| .googlesitekit-tooltip-title { | |
| font-family: $f-primary; | |
| font-size: $fs-title-lg; | |
| font-weight: $fw-medium; | |
| letter-spacing: $ls-xxs; | |
| line-height: $lh-title-lg; | |
| margin-bottom: 8px; | |
| } | |
| .googlesitekit-tooltip-title { | |
| font-family: $f-primary; | |
| font-size: $fs-title-md; | |
| font-weight: $fw-medium; | |
| letter-spacing: $ls-xxs; | |
| line-height: $lh-title-md; | |
| margin-bottom: 8px; | |
| } |
| .googlesitekit-tooltip-content { | ||
| font-family: $f-primary; | ||
| font-size: $fs-body-md; | ||
| font-weight: $fw-normal; | ||
| letter-spacing: $ls-s; | ||
| line-height: $lh-body-md; | ||
| } |
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.
- According to the Figma designs, typography for this should be
body-sm. - I don't think it is necessary to specify the font family and weight.
- Letter spacing should be
$ls-xs.
| .googlesitekit-tooltip-content { | |
| font-family: $f-primary; | |
| font-size: $fs-body-md; | |
| font-weight: $fw-normal; | |
| letter-spacing: $ls-s; | |
| line-height: $lh-body-md; | |
| } | |
| .googlesitekit-tooltip-content { | |
| font-size: $fs-body-sm; | |
| letter-spacing: $ls-xs; | |
| line-height: $lh-body-sm; | |
| } |
| .googlesitekit-tooltip-button { | ||
| border-radius: $br-lg; | ||
| line-height: 20px; | ||
|
|
||
| &:focus { | ||
| outline: none; | ||
| } | ||
|
|
||
| &:focus:not(:active) { | ||
| outline: 2px solid $c-interactive-inverse-focus; | ||
| } | ||
| } |
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.
Have we considered conditionally removing the text prop from the button component if the feature flag is enabled? I think that would let us reduce some style overrides.
Additionally, can you kindly check if we render the tooltip outside the Site Kit context? If not, I think we can safely wrap the story template with a googlesitekit-plugin class, which will let the tooltip inherit a number of default styles.
| .googlesitekit-tooltip-steps { | ||
| font-family: $f-primary; | ||
| font-size: $fs-label-md; | ||
| font-weight: $fw-medium; | ||
| letter-spacing: $ls-xs; | ||
| line-height: $lh-label-md; | ||
| margin: 0; | ||
| } |
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.
- According to the Figma designs, this should use a
body-smtypography. - Font weight should be 400.
| .googlesitekit-tooltip-steps { | |
| font-family: $f-primary; | |
| font-size: $fs-label-md; | |
| font-weight: $fw-medium; | |
| letter-spacing: $ls-xs; | |
| line-height: $lh-label-md; | |
| margin: 0; | |
| } | |
| .googlesitekit-tooltip-steps { | |
| font-family: $f-primary; | |
| font-size: $fs-body-sm; | |
| font-weight: $fw-normal; | |
| letter-spacing: $ls-xs; | |
| line-height: $lh-body-sm; | |
| margin: 0; | |
| } |
| .googlesitekit-tooltip-title { | ||
| color: $c-content-on-primary; | ||
|
|
||
| // The tooltip title overrides the default Typography styles. |
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.
IMO, it'd be wiser to apply styles from the Typography component directly, and only override them like this when the setupFlowRefresh feature flag is not enabled (i.e. .googlesitekit-tour-tooltip:not(.googlesitekit-tour-tooltip--setupFlowRefresh) {}). We'll achieve two benefits from this change:
- The style addition will be very minimal as our new Typography styles will be applied from the component itself.
- Removing the feature flag at launch will be much simpler, where we'll just be able to remove the styles being overridden.
What do you think?
| @@ -98,7 +114,13 @@ | |||
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.
According to the Figma designs, the "Back" button should be a tertiary button.
Summary
Addresses issue:
TourTooltipcomponent to reflect the new design. #11812Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist