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

[Search Sessions] Make search session indicator UI opt-in #88699

Merged
merged 16 commits into from
Jan 27, 2021

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Jan 19, 2021

Summary

Closes #88442

Previously the idea was that the search session indicator won't appear if an app doesn't use the search session. But recently Lens started using them without completing full integration #86297. If to enable xpack.data_enhanced.search.sessions.enabled in master, then Lens show search session indicator, but sending session to background doesn't properly work.

This pr changes the underlying logic of session service to show session indicator only app explicitly asked for that.

Also, I noticed, that we checked for per-app capabilities inside the data plugin component. I moved it outside and so now apps can configure search session indicator UI. In this case by setting it to disabled state.

What to test

The only user-facing difference comparing to master is that the search session indicator shouldn't appear in the Lens app.

Checklist

For maintainers

@Dosant Dosant marked this pull request as ready for review January 20, 2021 14:08
@Dosant Dosant requested a review from a team January 20, 2021 14:08
@Dosant Dosant requested review from a team as code owners January 20, 2021 14:08
@Dosant Dosant added Feature:Search Querying infrastructure in Kibana release_note:skip Skip the PR/issue when compiling release notes Team:AppServices v7.12.0 v8.0.0 labels Jan 20, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@Dosant
Copy link
Contributor Author

Dosant commented Jan 21, 2021

@elasticmachine merge upstream

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

Overall looks great.
Maybe we could add this to the sessions_in_space tests?
Should be simple enough to create a user that doesn't have this permission, and see that the component is properly disabled.

@Dosant
Copy link
Contributor Author

Dosant commented Jan 21, 2021

@elasticmachine merge upstream

@lizozom
Copy link
Contributor

lizozom commented Jan 25, 2021

@elasticmachine merge upstream

@Dosant
Copy link
Contributor Author

Dosant commented Jan 25, 2021

@lizozom,

Maybe we could add this to the sessions_in_space tests?

I added these tests as you suggested.
I also added a lens test checking that there is no search session indicator in the UI.

@Dosant Dosant requested a review from lizozom January 25, 2021 10:25
@flash1293
Copy link
Contributor

Requires a deeper look into Discover, but indicator isn't showing up anymore in Lens, which LGTM

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

Just tested with and without permissions and seems good!
LGTM

@Dosant Dosant added Feature:Dashboard Dashboard related features Feature:Discover Discover Application labels Jan 25, 2021
@kertal
Copy link
Member

kertal commented Jan 26, 2021

@elasticmachine merge upstream

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Code LGTM, search sessions still work in Discover, tested locally in Chrome 👍

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Code only review - Dashboard changes LGTM.

@Dosant
Copy link
Contributor Author

Dosant commented Jan 27, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 614 615 +1

Async chunks

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

id before after diff
dashboard 158.4KB 158.7KB +277.0B
discover 420.2KB 420.3KB +143.0B
total +420.0B

Page load bundle

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

id before after diff
dashboard 295.2KB 295.5KB +325.0B
data 798.3KB 799.0KB +741.0B
dataEnhanced 36.4KB 35.9KB -434.0B
total +632.0B

History

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

@Dosant Dosant merged commit b8947e3 into elastic:master Jan 27, 2021
Dosant added a commit to Dosant/kibana that referenced this pull request Jan 27, 2021
Dosant added a commit that referenced this pull request Jan 27, 2021
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jan 27, 2021
…y-tests

* 'master' of github.com:elastic/kibana: (276 commits)
  [Telemetry] Settings Collector: redact sensitive reported values (elastic#88675)
  [CI] Combines Jest test jobs (elastic#85850)
  [Upgrade Assistant] Migrate server to new es-js client (elastic#89207)
  Migrate maps_legacy, maps_oss, region_map, and tile_map plugions to TS projects (elastic#89351)
  [Vega Docs] Add experimental flag on the vega maps title (elastic#89402)
  Increase the time needed to locate the save viz toast (elastic#89301)
  [Enterprise Search] Add links to doc links service (elastic#89260)
  Fixed regex bug in Safari (elastic#89399)
  [Lens] Fix indexpattern checks for missing references (elastic#88840)
  [Lens] Clean up usage collector (elastic#89109)
  update apm index pattern (elastic#89395)
  [APM] Upgrade ES client (elastic#86594)
  Enable v2 so migrations, disable in FTR tests (elastic#89297)
  [Search Sessions] Make search session indicator UI opt-in, refactor per-app capabilities (elastic#88699)
  Cleanup OSS code from visualizations wizard (elastic#89092)
  [APM] Optimize API test order (elastic#88654)
  Rename conversion function, extract to module scope and add tests. (elastic#89018)
  [core.logging] Add ops logs to the KP logging system (elastic#88070)
  chore(NA): improve ts build refs performance on kbn bootstrap (elastic#89333)
  skip flaky suite (elastic#89379)
  ...

# Conflicts:
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/timeline/timeline.tsx
#	x-pack/test/accessibility/config.ts
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 27, 2021
…ana into task-manager/shift-on-trend

* 'task-manager/shift-on-trend' of github.com:gmmorris/kibana: (74 commits)
  [Metrics UI] Fix Host Overview boxes in Host Detail page (elastic#89299)
  [Telemetry] Settings Collector: redact sensitive reported values (elastic#88675)
  [CI] Combines Jest test jobs (elastic#85850)
  [Upgrade Assistant] Migrate server to new es-js client (elastic#89207)
  Migrate maps_legacy, maps_oss, region_map, and tile_map plugions to TS projects (elastic#89351)
  [Vega Docs] Add experimental flag on the vega maps title (elastic#89402)
  Increase the time needed to locate the save viz toast (elastic#89301)
  [Enterprise Search] Add links to doc links service (elastic#89260)
  Fixed regex bug in Safari (elastic#89399)
  [Lens] Fix indexpattern checks for missing references (elastic#88840)
  [Lens] Clean up usage collector (elastic#89109)
  update apm index pattern (elastic#89395)
  [APM] Upgrade ES client (elastic#86594)
  Enable v2 so migrations, disable in FTR tests (elastic#89297)
  [Search Sessions] Make search session indicator UI opt-in, refactor per-app capabilities (elastic#88699)
  Cleanup OSS code from visualizations wizard (elastic#89092)
  [APM] Optimize API test order (elastic#88654)
  Rename conversion function, extract to module scope and add tests. (elastic#89018)
  [core.logging] Add ops logs to the KP logging system (elastic#88070)
  chore(NA): improve ts build refs performance on kbn bootstrap (elastic#89333)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features Feature:Discover Discover Application Feature:Search Querying infrastructure in Kibana release_note:skip Skip the PR/issue when compiling release notes v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Search Sessions][Lens] Explicitly opt-in to "send to background UI"
7 participants