Skip to content
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

[EuiTour] Add ability to pass an array of buttons to footerAction #6384

Merged
merged 11 commits into from
Nov 23, 2022

Conversation

elizabetdev
Copy link
Contributor

@elizabetdev elizabetdev commented Nov 18, 2022

Summary

Some teams at Elastic are passing two buttons to EuiTour (elastic/kibana#143847). To do that they need to pass a flex group, with flex items and buttons to the footerAction prop.

Also, we were not providing an example with two buttons "close tour" and "next". The lack of this demo example could lead to inconsistencies across implementations.

So this PR simplifies the process of providing multiple buttons by accepting an array of buttons in footerAction. And it also adds an example in our docs with two buttons.

Screenshot 2022-11-21 at 12 53 36

I also noticed that the steps indicators were not vertically center-aligned. In our Figma library they are. So I fixed it:

dots-alignment@2x

Demo

The demo can be found here: https://eui.elastic.co/pr_6384/#/display/tour#not-action-driven-tour

QA

Remove or strikethrough items that do not apply to your PR.

General 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
  • Added documentation
  • Checked Code Sandbox works for any docs examples
  • Added or updated jest and cypress tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • Updated the Figma library counterpart
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6384/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6384/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6384/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6384/

@elizabetdev
Copy link
Contributor Author

The demo doesn't work correctly in Safari. When clicking "Next" or "Start or reset tour" the page scrolls to the top. It seems that this was already happening in main: https://elastic.github.io/eui/#/display/tour.

@elizabetdev elizabetdev marked this pull request as ready for review November 21, 2022 20:17
- it isn't used in more than one place and it isn't significantly more readable
'Not action driven' is the most opinionated change - apologies if it's unwelcome, I just thought it sounded awkward vs using the word 'passive'
Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

Pushed up my code review requests - the doc title change of Not action driven tour to Passive tour was the most opinionated change, please LMK if you'd rather revert that!

@cee-chen
Copy link
Contributor

Also since Safari is already buggy on production I'd rather just leave it for now / out of this PR. In real world usage consumers are not as likely to have a reset tour button in any case.

@cee-chen cee-chen enabled auto-merge (squash) November 23, 2022 18:39
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6384/

@cee-chen cee-chen merged commit edf22f3 into elastic:main Nov 23, 2022
1Copenut added a commit to elastic/kibana that referenced this pull request Dec 2, 2022
`[email protected]` ⏩ `[email protected]`

- "Fixed EuiButtonGroup firing onChange twice" required changing some
tests from `click` to `change`
___

## [`70.4.0`](https://github.com/elastic/eui/tree/v70.4.0)

- Updated `EuiTourStep.footerAction` type to accept `ReactNode[]`
([#6384](elastic/eui#6384))
- Vertically aligned all footer content so that `euiTourStepIndicator`
is always centered ([#6384](elastic/eui#6384))
- Added `filterInCircle` glyph to `EuiIcon`
([#6385](elastic/eui#6385))
- Added `color` prop to `EuiBeacon`
([#6420](elastic/eui#6420))
- Added the `euiMaxBreakpoint` and `euiMinBreakpoint` CSS-in-JS
utilities for creating min/max-width media queries
([#6431](elastic/eui#6431))

**Bug fixes**

- Restores the previous match operator behaviour when the query value is
split into multiple terms after analysis.
([#6409](elastic/eui#6409))
- Fixed missing slide-in animation on `EuiCollapsibleNav`s and left-side
`EuiFlyout`s ([#6422](elastic/eui#6422))
- Fix bug in `EuiCard` where footer were not aligned to the bottom of
the card ([#6424](elastic/eui#6424))
- Fixed multiple component media queries for consumers with custom theme
breakpoints ([#6431](elastic/eui#6431))

## [`70.3.0`](https://github.com/elastic/eui/tree/v70.3.0)

- `EuiSearchBar` now automatically wraps special characters not used by
query syntax in quotes
([#6356](elastic/eui#6356))
- Added `alignment` prop to `EuiBetaBadge`
([#6361](elastic/eui#6361))
- `EuiButton` now accepts `minWidth={false}`
([#6373](elastic/eui#6373))

**Bug fixes**

- Fixed `EuiPageTemplate` not correctly passing the `component` prop to
the inner main content wrapper.
([#6352](elastic/eui#6352))
- `EuiSkipLink` now correctly calls `onClick` even when
`fallbackDestination` is invalid
([#6355](elastic/eui#6355))
- Permanently fixed `EuiModal` to not cause scroll-jumping issues on
modal open ([#6360](elastic/eui#6360))
- Re-fixed `EuiPageSection` not correctly merging `contentProps.css`
([#6365](elastic/eui#6365))
- Fixed `EuiTab` not defaulting to size `m`
([#6366](elastic/eui#6366))
- Fixed the shadow sizes of `.eui-yScrollWithShadows` and
`.eui-xScrollWithShadows`
([#6374](elastic/eui#6374))
- Fixed bug in `EuiCard` where the inner content in vertical cards was
not growing 100% in width
([#6377](elastic/eui#6377))
- Fixed incorrect margins in `EuiSuperDatePicker` caused by `EuiFlex`
CSS gap change ([#6380](elastic/eui#6380))
- Fixed visual bug in nested `EuiFlexGroup`s, where the parent
`EuiFlexGroup` is responsive but a child `EuiFlexGroup` is not
([#6381](elastic/eui#6381))

**CSS-in-JS conversions**

- Converted `EuiModal` to Emotion
([#6321](elastic/eui#6321))

**Fixes**

- `EuiButton` no longer outputs unnecessary inline styles for
`minWidth={0}` or `minWidth={false}`
([#6373](elastic/eui#6373))
- `EuiFacetButton` no longer reports type issues when passing props
accepted by `EuiButton`
([#6373](elastic/eui#6373))

Co-authored-by: Constance Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants