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

[Security Solution][Detections] fixes UX issue with discoverability of new features on the Rules page #124343

Merged
merged 27 commits into from
Feb 8, 2022

Conversation

vitaliidm
Copy link
Contributor

@vitaliidm vitaliidm commented Feb 2, 2022

  • Added tour with 2 steps
    • Sorting/filtering for in memory table
    • New Bulk Edit actions
  • Created context with tour management, which wraps rules table
  • Results of user tour's journey is saved in localStorage
  • Disabled tour for Cypress tests

Note: Text in second step was changed to "You can now bulk update index patterns and tags for multiple custom rules at once." It's not reflected on screenshots. On screenshots and video present older text: "You can now bulk update index patterns and tags for multiple rules at once.", where word custom is absent

UI

First step

Screenshot 2022-02-03 at 16 54 20

Second step

Screenshot 2022-02-03 at 16 54 29

Eui Tour: https://elastic.github.io/eui/#/display/tour

Screen recording

Screen.Recording.2022-02-03.at.17.00.27.mov

Checklist

Delete any items that are not applicable to this PR.

@vitaliidm vitaliidm self-assigned this Feb 2, 2022
@vitaliidm vitaliidm added release_note:skip Skip the PR/issue when compiling release notes v8.1.0 Feature:Rule Management Security Solution Detection Rule Management Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team backport:skip This commit does not require backporting enhancement New value added to drive a business result labels Feb 2, 2022
@vitaliidm
Copy link
Contributor Author

@elasticmachine merge upstream

@elastic elastic deleted a comment from kibana-ci Feb 2, 2022
@elastic elastic deleted a comment from kibana-ci Feb 3, 2022
@vitaliidm
Copy link
Contributor Author

@elasticmachine merge upstream

@vitaliidm vitaliidm added auto-backport Deprecated - use backport:version if exact versions are needed and removed backport:skip This commit does not require backporting labels Feb 4, 2022
@vitaliidm
Copy link
Contributor Author

The EuiTour doesn't seem to be working well with scroll:

It uses under the hood EuiPopover, which has z-index: 9900 !important;
And has similar behaviour in other components(for example filter tag)
Screenshot 2022-02-07 at 11 51 53

I can try to play with z-index, but it can cause even more issues than current one
For example, header has z-index:1000, but uses popovers as well. If we increase header z-index, Kibana menus got hidden behind header and so on and so on.
Might be viable option to leave as it is, given a fact it's a feature highlight that would get removed in future releases and can/will be dismissed by user at the first interaction. What are you thoughts?

@vitaliidm vitaliidm changed the title [Security Solution][Detections] adds new features tour for rules page [Security Solution][Detections] fixes UX issue with discoverability of new features on the Rules page Feb 7, 2022
Copy link
Contributor

@banderror banderror left a comment

Choose a reason for hiding this comment

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

Found a bug when testing locally. The tour component doesn't work well with the prebuilt rule updates callout:

Video: https://recordit.co/Yn9S9PUKom

Copy link
Contributor

@banderror banderror left a comment

Choose a reason for hiding this comment

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

Finished going through the changes, and overall have mixed feelings about the Tour's API:

  • Its hook accepts EuiStatelessTourStep[] which is a mixture of logic (e.g. step number, onFinish) and UI (title, content, children, maxWidth) which forces to move some of the UI props out of the corresponding UI components that implement the steps. I'd expect all these titles and widths to be specified in a component's TSX markup rather than in a react context.
  • It seems to be an "alpha" implementation, you can't navigate back and forth between the steps out of the box, persistence is not included, adding the "go to next step" button to the step requires some tricks, etc.
  • When I started reviewing the PR, it looked somewhat surprising to me as someone not familiar with the Tour API that this small feature would require introducing a whole page-level react context needed for this feature specifically.

On the other hand, I guess we have been warned in this comment: https://github.com/elastic/security-team/issues/1972#issuecomment-1027197837 🙂

I don't have any suggestions for how it could be improved immediately in this PR. Hope the Tour's API will be completely reworked as described in #124052

Comment on lines +61 to +62
// use optional rulesFeatureTourContext as AllRulesUtilityBar can be used outside the context
const featureTour = useRulesFeatureTourContextOptional();
Copy link
Contributor

Choose a reason for hiding this comment

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

In what cases it could be outside of the context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on exceptions page x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.tsx

Copy link
Contributor

Choose a reason for hiding this comment

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

🙀 The bar used in the Exceptions table is very different from the one used in the Rules table:

I think we should split AllRulesUtilityBar into two different components each used for its own table. But that's probably out of the scope of this PR. I'll open a ticket for that.

@xcrzx
Copy link
Contributor

xcrzx commented Feb 8, 2022

I can try to play with z-index, but it can cause even more issues than current one
For example, header has z-index:1000, but uses popovers as well. If we increase header z-index, Kibana menus got hidden behind header and so on and so on.
Might be viable option to leave as it is, given a fact it's a feature highlight that would get removed in future releases and can/will be dismissed by user at the first interaction. What are you thoughts?

From my perspective, overlapping UI elements don't look great and create an impression of a buggy product. But if you think this issue is too hard to fix, then I'm okay with leaving it as is.

Copy link
Contributor

@xcrzx xcrzx left a comment

Choose a reason for hiding this comment

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

The EuiTour API doesn't seem to be finished as of right now. It would be great to get in touch with the EUI team and share our use case and suggestions to improve the API.

Other than that code changes LGTM

@vitaliidm
Copy link
Contributor Author

I can try to play with z-index, but it can cause even more issues than current one
For example, header has z-index:1000, but uses popovers as well. If we increase header z-index, Kibana menus got hidden behind header and so on and so on.
Might be viable option to leave as it is, given a fact it's a feature highlight that would get removed in future releases and can/will be dismissed by user at the first interaction. What are you thoughts?

From my perspective, overlapping UI elements don't look great and create an impression of a buggy product. But if you think this issue is too hard to fix, then I'm okay with leaving it as is.

There is even issue for that elastic/eui#4756 as well, with no fix resolution because of its complexity

@vitaliidm
Copy link
Contributor Author

Found a bug when testing locally. The tour component doesn't work well with the prebuilt rule updates callout:

Video: https://recordit.co/Yn9S9PUKom

Thanks for catching this 👍

So this issue appeared to be related to a fact, that EuiPopover is not reacting to layout changes. I've spoke to Eui team and advise was to delay render of tour. It's indeed, not a perfect solution, but it fixes at least current issue.

Other solution we might do as well: put a time delay for tour render. But it's uncertain, and I don't like it.

Here is a fix commit: ce81e4e

Copy link
Contributor

@banderror banderror left a comment

Choose a reason for hiding this comment

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

Thank you @vitaliidm for responding to the comments and fixing the issue with the callout.
LGTM 👍

@vitaliidm
Copy link
Contributor Author

@elasticmachine merge upstream

@vitaliidm vitaliidm enabled auto-merge (squash) February 8, 2022 13:37
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2869 2871 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 4.7MB 4.7MB +3.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 246.4KB 246.5KB +99.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @vitaliidm

@vitaliidm vitaliidm merged commit 6f71ffc into elastic:main Feb 8, 2022
@vitaliidm vitaliidm deleted the security-solution/feature-tour branch February 8, 2022 17:09
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 8, 2022
…f new features on the Rules page (elastic#124343)

- Added tour with 2  steps
   - Sorting/filtering for in memory table
   - New Bulk Edit actions
- Created context with tour management, which wraps rules table
- Results of user tour's journey is saved in localStorage
- Disabled tour for Cypress tests

**Note:** Text in second step was changed to "You can now bulk update index patterns and tags for multiple custom rules at once." It's not reflected on screenshots. On screenshots and video present older text: "You can now bulk update index patterns and tags for multiple rules at once.", where word `custom` is absent

## UI

### First step
<img width="1287" alt="Screenshot 2022-02-03 at 16 54 20" src="https://user-images.githubusercontent.com/92328789/152391079-57a12b97-a273-4852-95e6-222680d09464.png">

### Second step
<img width="1281" alt="Screenshot 2022-02-03 at 16 54 29" src="https://user-images.githubusercontent.com/92328789/152391090-87cd436a-eb74-4358-b699-53c3e79fdb48.png">

Eui Tour: https://elastic.github.io/eui/#/display/tour
## Screen recording

https://user-images.githubusercontent.com/92328789/152391296-0b03b299-270a-4d96-9adf-d98bc6405b4f.mov

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))

(cherry picked from commit 6f71ffc)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 9, 2022
…f new features on the Rules page (#124343) (#124992)

- Added tour with 2  steps
   - Sorting/filtering for in memory table
   - New Bulk Edit actions
- Created context with tour management, which wraps rules table
- Results of user tour's journey is saved in localStorage
- Disabled tour for Cypress tests

**Note:** Text in second step was changed to "You can now bulk update index patterns and tags for multiple custom rules at once." It's not reflected on screenshots. On screenshots and video present older text: "You can now bulk update index patterns and tags for multiple rules at once.", where word `custom` is absent

## UI

### First step
<img width="1287" alt="Screenshot 2022-02-03 at 16 54 20" src="https://user-images.githubusercontent.com/92328789/152391079-57a12b97-a273-4852-95e6-222680d09464.png">

### Second step
<img width="1281" alt="Screenshot 2022-02-03 at 16 54 29" src="https://user-images.githubusercontent.com/92328789/152391090-87cd436a-eb74-4358-b699-53c3e79fdb48.png">

Eui Tour: https://elastic.github.io/eui/#/display/tour
## Screen recording

https://user-images.githubusercontent.com/92328789/152391296-0b03b299-270a-4d96-9adf-d98bc6405b4f.mov

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))

(cherry picked from commit 6f71ffc)

Co-authored-by: Vitalii Dmyterko <92328789+vitaliidm@users.noreply.github.com>
banderror added a commit that referenced this pull request Mar 24, 2022
… on the Rule Management page introduced in 8.1 (#128398)

**Ticket:** #125504

## Summary

This PR removes the Tour UI from components of the Rule Management page. We don't need to show `8.1` features in the `8.2.0` version. The Tour was previously introduced in #124343.

## Details

- The tour steps are removed from the components (`<EuiTourStep>`).
- The tour provider is removed from the page. It has been changed a little bit.
- I thought it could be useful to leave the implementation for now, in case we want to show new tours in the next versions. If we don't use it during the next few dev cycles given we will be shipping new features on the Rule Management page, we will need to completely remove it from the codebase.
- A short README is added with some notes on the Tour UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.1.0 v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants