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

Fix BreadcrumbAppendExtension in solution nav #208728

Closed
3 tasks
Dosant opened this issue Jan 29, 2025 · 1 comment · Fixed by #209765
Closed
3 tasks

Fix BreadcrumbAppendExtension in solution nav #208728

Dosant opened this issue Jan 29, 2025 · 1 comment · Fixed by #209765
Assignees
Labels
Feature:Chrome Core's Chrome UI (sidenav, header, breadcrumbs) Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@Dosant
Copy link
Contributor

Dosant commented Jan 29, 2025

While working on #201596 I noticed that BreadcrumbAppendExtension just isn't there in solution nav. The BreadcrumbAppendExtension is used to append some UI next to the last breadcrumb.

/**
* Get an observable of the current extension appended to breadcrumbs
*/
getBreadcrumbsAppendExtension$(): Observable<ChromeBreadcrumbsAppendExtension | undefined>;
/**
* Mount an element next to the last breadcrumb
*/
setBreadcrumbsAppendExtension(
breadcrumbsAppendExtension?: ChromeBreadcrumbsAppendExtension
): void;

We need to add it solution nav to make #201596 work properly.

This also means there is now missing functionality in solution nav

  • Search sessions indicator won't appear (this is fine because the feature is deprecated, but worth fixing) cc @elastic/kibana-data-discovery
  • Logs explorer feedback link won't appear
    chrome.setBreadcrumbsAppendExtension({
    content: toMountPoint(
    <EuiHeaderSection
    data-test-subj="logsExplorerHeaderMenu"
    css={css`
    margin-left: ${euiTheme.size.m};
    `}
    >
    <EuiHeaderSectionItem>
    <FeedbackLink />
    </EuiHeaderSectionItem>
    </EuiHeaderSection>,
    { theme, i18n: i18nStart }
    ),
    });
    . Not sure how ciritical is that cc @elastic/obs-ux-logs-team
  • I haven't found any other usages

We also should improve the API to properly support multiple slots to avoid workarounds like:

/**
* Since the breadcrumbsAppendExtension might be set only during a plugin start (e.g. search session)
* we retrieve the latest valid extension in order to restore it once we unmount the beta badge.
*/
const [previousAppendExtension$] = useState(() =>
chrome.getBreadcrumbsAppendExtension$().pipe(filter(Boolean), take(1))
);
const previousAppendExtension = useObservable(previousAppendExtension$);

@Dosant Dosant added Feature:Chrome Core's Chrome UI (sidenav, header, breadcrumbs) Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Jan 29, 2025
@Dosant Dosant self-assigned this Jan 29, 2025
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Chrome Core's Chrome UI (sidenav, header, breadcrumbs) Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants