Skip to content

[EuiTour] Convert to Emotion styling - #6087

Merged
thompsongl merged 21 commits into
elastic:mainfrom
thompsongl:css-in-js/euitour
Aug 12, 2022
Merged

thompsongl merged 21 commits into
elastic:mainfrom
thompsongl:css-in-js/euitour

Conversation

@thompsongl

@thompsongl thompsongl commented Jul 28, 2022 •

Copy link
Copy Markdown
Contributor

Summary

Like it says on the tin.

Also,

  • Adds a onPositionChange callback to EuiPopover for getting arrow placement
  • Fixes a proptype warning when using useEuiTour because it incorrectly expected onFinish to be part of each step config

Checklist

  • Checked in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles
  • Checked Code Sandbox works for any docs examples
  • Added or updated jest and cypress tests
  • Checked for breaking changes and labeled appropriately
  • A changelog entry exists and is marked appropriately

@kibanamachine

Copy link
Copy Markdown
Contributor

@kibanamachine

Copy link
Copy Markdown
Contributor

@kibanamachine

Copy link
Copy Markdown
Contributor

@thompsongl

Copy link
Copy Markdown
Contributor Author
10:40:06   1) EuiDataGrid
10:40:06        focus management
10:40:06          cell keyboard interactions
10:40:06            cell expansion/interaction:
10:40:06 
10:40:06       Timed out retrying after 4000ms
10:40:06       + expected - actual
10:40:06 
10:40:06       -'dataGridRowCell'
10:40:06       +'focusOnMe'

jenkins test this

@thompsongl
thompsongl marked this pull request as ready for review August 1, 2022 15:46
@kibanamachine

Copy link
Copy Markdown
Contributor

@elizabetdev
elizabetdev self-requested a review August 8, 2022 13:59
Comment thread src/components/popover/popover.tsx Resolved
Comment thread src/components/popover/popover.tsx Resolved
Comment thread src/components/tour/tour.styles.ts Resolved
Comment thread src/components/tour/tour.styles.ts Resolved
Comment on lines +34 to +41
[data-popover-arrow='top'] {
&:before {
${logicalCSS(
'border-top-color',
backgroundColor(euiTheme.colors.lightestShade, colorMode)
)};
}
}

@cee-chen cee-chen Aug 8, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[not a blocking comment, just noting something] I know this is just a translation from Sass so this is already happening in prod, but it looks like left/right arrows that are close to the colored footer also have incorrect arrow colors:

tbh not a huge deal and i'm not sure if there's a way of programmatically detecting this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I remember not being able to account for this when writing the Sass styles originally, but maybe we can do some calculations now? I'll look.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

feel free to timebox / no worries if it's too much of a hassle, we can punt!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I remember not being able to account for this when writing the Sass styles originally, but maybe we can do some calculations now? I'll look.

It would be great to support this. 👍🏽

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Haven't quite got this yet but don't want to hold up this PR any longer. I'll do a follow-up

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No worries at all!

Comment thread src/components/tour/tour_step.tsx Resolved

@cee-chen cee-chen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall this looks great to me, I have a few nits and questions, but otherwise QA looks great, logical properties all look good, and I'm really digging how the Emotion styles were organized!

@kibanamachine

Copy link
Copy Markdown
Contributor

@elizabetdev elizabetdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @thompsongl!

Tested in Chrome, Safari, Edge, and Firefox. LGTM! 🎉

Comment on lines +34 to +41
[data-popover-arrow='top'] {
&:before {
${logicalCSS(
'border-top-color',
backgroundColor(euiTheme.colors.lightestShade, colorMode)
)};
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I remember not being able to account for this when writing the Sass styles originally, but maybe we can do some calculations now? I'll look.

It would be great to support this. 👍🏽

@thompsongl
thompsongl requested a review from cee-chen August 12, 2022 14:47
@kibanamachine

Copy link
Copy Markdown
Contributor

@cee-chen cee-chen left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One very minor comment left - since it's small, I'll go ahead and approve. Other changes look great, thanks!

@thompsongl
thompsongl enabled auto-merge (squash) August 12, 2022 17:55
@thompsongl

Copy link
Copy Markdown
Contributor Author

jenkins test this

@kibanamachine

Copy link
Copy Markdown
Contributor

@thompsongl
thompsongl merged commit d2ea7d4 into elastic:main Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants