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

[Stateful sidenav] Add yml setting to force spaces solution view #191743

Merged

Conversation

sebelga
Copy link
Contributor

@sebelga sebelga commented Aug 29, 2024

In this PR I've added an internal kibana.yml setting to be able to force the spaces solution view for non cloud instances. The spaces solution view enables the new solution navigations.

This config is a temporary solution for Elastic internal deployments until the 8.17-SNAPSHOT is available.

New setting

xpack.spaces.experimental.forceSolutionVisibility: true

Notes on implementation

We had previously twice the same logic to decide if the solution view (and side nav) feature was on: in the navigation and spaces plugins. With the new yml setting available in the spaces plugin I set the source of truth to be in the spaces plugin and the navigation plugin reads it from the start contract.

Fixes #191254

@sebelga sebelga self-assigned this Aug 29, 2024
@sebelga sebelga added release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Aug 29, 2024
@sebelga
Copy link
Contributor Author

sebelga commented Aug 29, 2024

/ci

@sebelga
Copy link
Contributor Author

sebelga commented Aug 30, 2024

/ci

@sebelga
Copy link
Contributor Author

sebelga commented Aug 30, 2024

/ci

@sebelga sebelga marked this pull request as ready for review August 30, 2024 15:30
@sebelga sebelga requested review from a team as code owners August 30, 2024 15:30
@sebelga sebelga requested a review from dplumlee August 30, 2024 15:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@maximpn maximpn requested review from maximpn and removed request for dplumlee September 2, 2024 10:33
Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

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

Rule Management LGTM

@sebelga sebelga enabled auto-merge (squash) September 3, 2024 14:20
@sebelga sebelga disabled auto-merge September 3, 2024 14:20
@azasypkin azasypkin self-requested a review September 4, 2024 09:27
@azasypkin
Copy link
Member

ACK: reviewing...

Copy link
Member

@azasypkin azasypkin 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, thanks! I've left a few nits and notes. The major ones are adding tests for the new property in our public contract and nesting the temporary config property under the experimental namespace to be on the safe side when we drop the new config value.

Please, re-tag me for review once PR is ready for the final review round and I'll do it today.

Also can you please file an issue to drop this internal-only config property when we no longer need it (IIUC it should be marked as blocker for 8.17)?

x-pack/plugins/spaces/server/plugin.ts Outdated Show resolved Hide resolved
x-pack/plugins/spaces/server/config.ts Outdated Show resolved Hide resolved
x-pack/plugins/spaces/public/plugin.tsx Outdated Show resolved Hide resolved
x-pack/plugins/spaces/public/plugin.tsx Show resolved Hide resolved
@sebelga
Copy link
Contributor Author

sebelga commented Sep 17, 2024

Thanks for the review @azasypkin, I addressed your feedback. Can you have another look? thanks!

I filled the issue to remove the yml setting.

@azasypkin azasypkin self-requested a review September 17, 2024 10:44
@sebelga sebelga added the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Sep 17, 2024
Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!


expect(spacesSetup.hasOnlyDefaultSpace).toBe(false);
expect(spacesStart.hasOnlyDefaultSpace).toBe(false);
{
Copy link
Member

Choose a reason for hiding this comment

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

note: { ... } - Great way to scope and reuse const values in the same test - never thought of this before. Nice!

@sebelga sebelga enabled auto-merge (squash) September 18, 2024 10:27
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #10 / ConnectorSelector should set the selected connector to none if the connector is not available

Metrics [docs]

Page load bundle

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

id before after diff
navigation 17.1KB 17.1KB +48.0B
spaces 29.6KB 29.8KB +200.0B
total +248.0B
Unknown metric groups

API count

id before after diff
spaces 261 262 +1

History

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

cc @sebelga

@sebelga sebelga merged commit 6f6883d into elastic:main Sep 18, 2024
39 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 18, 2024
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

@sebelga sebelga deleted the stateful-sidenav/add-setting-to-force-nav branch September 18, 2024 13:18
kibanamachine added a commit that referenced this pull request Sep 18, 2024
#191743) (#193282)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Stateful sidenav] Add yml setting to force spaces solution view
(#191743)](#191743)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sébastien
Loix","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-18T12:12:20Z","message":"[Stateful
sidenav] Add yml setting to force spaces solution view
(#191743)","sha":"6f6883d7818a983e642a536d8892a0072a794148","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor"],"title":"[Stateful
sidenav] Add yml setting to force spaces solution
view","number":191743,"url":"https://github.com/elastic/kibana/pull/191743","mergeCommit":{"message":"[Stateful
sidenav] Add yml setting to force spaces solution view
(#191743)","sha":"6f6883d7818a983e642a536d8892a0072a794148"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/191743","number":191743,"mergeCommit":{"message":"[Stateful
sidenav] Add yml setting to force spaces solution view
(#191743)","sha":"6f6883d7818a983e642a536d8892a0072a794148"}}]}]
BACKPORT-->

Co-authored-by: Sébastien Loix <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Stateful sidenav] Add config setting enable the new solution navigation for on-prem
7 participants