Skip to content

Make Elastic logo click open custom home page in solution view#241571

Merged
kowalczyk-krzysztof merged 3 commits intoelastic:mainfrom
kowalczyk-krzysztof:feat/add-defaultroute-to-header
Nov 3, 2025
Merged

Make Elastic logo click open custom home page in solution view#241571
kowalczyk-krzysztof merged 3 commits intoelastic:mainfrom
kowalczyk-krzysztof:feat/add-defaultroute-to-header

Conversation

@kowalczyk-krzysztof
Copy link
Copy Markdown
Member

@kowalczyk-krzysztof kowalczyk-krzysztof commented Nov 3, 2025

Summary

This PR makes Elastic logo in solution view use advanced setting defaultRoute to determine what URL is opened when clicking on it.

Screen.Recording.2025-11-02.at.21.29.10.mov

Closes: #233886

@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this Nov 3, 2025
@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner November 3, 2025 08:01
@kowalczyk-krzysztof kowalczyk-krzysztof added release_note:enhancement Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// backport:version + v9.2.0 labels Nov 3, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

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

}: LogoProps) => {
const loadingCount = useObservable(loadingCount$.pipe(debounceTime(LOADING_DEBOUNCE_TIME)), 0);
const homeHref = useObservable(homeHref$, '/app/home');
const homeRoute = uiSettings.get('defaultRoute') || homeHref;
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.

Have you considered doing in the service?

--private projectHome$ = new BehaviorSubject<string | undefined>(undefined);
++private projectHome$ = new BehaviorSubject<string | undefined>(uiSettings.get('defaultRoute') || '/app/home');

I think if there is no good reason not to, having this in the service would be better.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was trying to make it simple but sure I will move it to the service.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@Dosant I changed my implementation but the proposed one didn't really work as setProjectHome from solutions kept overriding the value so I put the uiSettings.get inside setProjectHome.

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #84 / Dataset Quality Dataset quality handles user privileges User has access to dataset quality with limited privileges User has access to a multipl data streams "before all" hook for "types filter should be rendered"
  • [job] [logs] Jest Tests #6 / UnifiedDataTable columns should not reset the last column to auto width when there are remaining auto width columns
  • [job] [logs] Jest Tests #6 / UnifiedDataTable columns should reset the last column to auto width if only absolute width columns remain
  • [job] [logs] Jest Tests #6 / UnifiedDataTable columns should show the reset width button only for absolute width columns, and allow resetting to default width

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
core 510.8KB 510.9KB +79.0B

cc @kowalczyk-krzysztof

@kowalczyk-krzysztof kowalczyk-krzysztof force-pushed the feat/add-defaultroute-to-header branch from a811dcc to 3a70628 Compare November 3, 2025 09:57
Copy link
Copy Markdown
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

thx, I see that it should work but I'd then just fallback on getter level


private setProjectHome(homeHref: string) {
this.projectHome$.next(homeHref);
this.projectHome$.next(this.uiSettings?.get('defaultRoute') || homeHref);
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.

another option then is to make it default on getProjectHome$ level

getProjectHome$: () => {
return this.projectHome$.pipe(map(home => home || this.uiSettings?.get('defaultRoute')));
},

I think it would be better because now if setProjectHome never called then we never set the default

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right. I moved the logic to getProjectHome$, but I had to make the order different, so this.uiSettings?.get('defaultRoute') || home instead of home || this.uiSettings?.get('defaultRoute').
I think this is fine because we want to the uiSetting to have priority.

@kowalczyk-krzysztof kowalczyk-krzysztof added backport:version Backport to applied version labels v9.2.1 and removed backport:version + v9.2.0 labels Nov 3, 2025
@kowalczyk-krzysztof kowalczyk-krzysztof enabled auto-merge (squash) November 3, 2025 10:42
@kowalczyk-krzysztof kowalczyk-krzysztof merged commit 4f80854 into elastic:main Nov 3, 2025
18 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.2

https://github.com/elastic/kibana/actions/runs/19034279563

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 3, 2025
…ic#241571)

## Summary

This PR makes Elastic logo in solution view use advanced setting
`defaultRoute` to determine what URL is opened when clicking on it.

https://github.com/user-attachments/assets/8dc402f5-9184-4f4b-be9a-e8a886f6234e

Closes: elastic#233886
(cherry picked from commit 4f80854)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.2

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 Nov 3, 2025
…241571) (#241606)

# Backport

This will backport the following commits from `main` to `9.2`:
- [Make Elastic logo click open custom home page in solution view
(#241571)](#241571)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Krzysztof
Kowalczyk","email":"krzysztof.kowalczyk@elastic.co"},"sourceCommit":{"committedDate":"2025-11-03T12:12:59Z","message":"Make
Elastic logo click open custom home page in solution view
(#241571)\n\n## Summary\n\nThis PR makes Elastic logo in solution view
use advanced setting\n`defaultRoute` to determine what URL is opened
when clicking on
it.\n\n\nhttps://github.com/user-attachments/assets/8dc402f5-9184-4f4b-be9a-e8a886f6234e\n\nCloses:
https://github.com/elastic/kibana/issues/233886","sha":"4f8085433dae8c9868e0f9b56633b02a2d64114d","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:SharedUX","backport:version","v9.3.0","v9.2.1"],"title":"Make
Elastic logo click open custom home page in solution
view","number":241571,"url":"https://github.com/elastic/kibana/pull/241571","mergeCommit":{"message":"Make
Elastic logo click open custom home page in solution view
(#241571)\n\n## Summary\n\nThis PR makes Elastic logo in solution view
use advanced setting\n`defaultRoute` to determine what URL is opened
when clicking on
it.\n\n\nhttps://github.com/user-attachments/assets/8dc402f5-9184-4f4b-be9a-e8a886f6234e\n\nCloses:
https://github.com/elastic/kibana/issues/233886","sha":"4f8085433dae8c9868e0f9b56633b02a2d64114d"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/241571","number":241571,"mergeCommit":{"message":"Make
Elastic logo click open custom home page in solution view
(#241571)\n\n## Summary\n\nThis PR makes Elastic logo in solution view
use advanced setting\n`defaultRoute` to determine what URL is opened
when clicking on
it.\n\n\nhttps://github.com/user-attachments/assets/8dc402f5-9184-4f4b-be9a-e8a886f6234e\n\nCloses:
https://github.com/elastic/kibana/issues/233886","sha":"4f8085433dae8c9868e0f9b56633b02a2d64114d"}},{"branch":"9.2","label":"v9.2.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Krzysztof Kowalczyk <krzysztof.kowalczyk@elastic.co>
@kowalczyk-krzysztof kowalczyk-krzysztof deleted the feat/add-defaultroute-to-header branch November 3, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels needs_docs release_note:enhancement Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// v9.2.1 v9.3.0

5 participants