Skip to content

Commit ff5042e

Browse files
[9.0] [Onboarding] Hide card labels in search results (elastic#213417) (elastic#213579)
# Backport This will backport the following commits from `main` to `9.0`: - [[Onboarding] Hide card labels in search results (elastic#213417)](elastic#213417) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Mykola Harmash","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-03-07T14:40:39Z","message":"[Onboarding] Hide card labels in search results (elastic#213417)\n\nCloses https://github.com/elastic/kibana/issues/200917\n\nLooking at the code in Fleet search results screen, cards would also\nhave the `Unverified` badges. ([this\ncheck](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx#L101)\nwould return `true` because this specific page doesn't provides\n`packageVerificationKeyId` to the `isPackageUnverified()` function, this\nonly happens on the individual integration details page. Fleet search\njust [hides the\nbadges](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/home/available_packages.tsx#L188)\nfor cards in search results.\n\nThis change aligns Onboarding search results with Fleet search results\nand hides the card labels which fixes the issue with `Unverified` badge\nappearing for installed integrations.\n\n| Before | After |\n| --- | --- |\n|\n![388110694-bd6abaf4-15ac-4d56-b556-fddb11c85ba7](https://github.com/user-attachments/assets/751a6572-192c-45f6-bfa8-82433b73398d)\n| ![CleanShot 2025-03-07 at 14 35\n53@2x](https://github.com/user-attachments/assets/d1588d7d-eec8-4207-a1e6-9a53272bbddf)\n|","sha":"33f71ae678e833b4c91325e40f47d819e1edb08d","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Feature: Observability Onboarding","backport:version","v8.18.0","v9.1.0","v8.17.4"],"title":"[Onboarding] Hide card labels in search results","number":213417,"url":"https://github.com/elastic/kibana/pull/213417","mergeCommit":{"message":"[Onboarding] Hide card labels in search results (elastic#213417)\n\nCloses https://github.com/elastic/kibana/issues/200917\n\nLooking at the code in Fleet search results screen, cards would also\nhave the `Unverified` badges. ([this\ncheck](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx#L101)\nwould return `true` because this specific page doesn't provides\n`packageVerificationKeyId` to the `isPackageUnverified()` function, this\nonly happens on the individual integration details page. Fleet search\njust [hides the\nbadges](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/home/available_packages.tsx#L188)\nfor cards in search results.\n\nThis change aligns Onboarding search results with Fleet search results\nand hides the card labels which fixes the issue with `Unverified` badge\nappearing for installed integrations.\n\n| Before | After |\n| --- | --- |\n|\n![388110694-bd6abaf4-15ac-4d56-b556-fddb11c85ba7](https://github.com/user-attachments/assets/751a6572-192c-45f6-bfa8-82433b73398d)\n| ![CleanShot 2025-03-07 at 14 35\n53@2x](https://github.com/user-attachments/assets/d1588d7d-eec8-4207-a1e6-9a53272bbddf)\n|","sha":"33f71ae678e833b4c91325e40f47d819e1edb08d"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213417","number":213417,"mergeCommit":{"message":"[Onboarding] Hide card labels in search results (elastic#213417)\n\nCloses https://github.com/elastic/kibana/issues/200917\n\nLooking at the code in Fleet search results screen, cards would also\nhave the `Unverified` badges. ([this\ncheck](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx#L101)\nwould return `true` because this specific page doesn't provides\n`packageVerificationKeyId` to the `isPackageUnverified()` function, this\nonly happens on the individual integration details page. Fleet search\njust [hides the\nbadges](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/home/available_packages.tsx#L188)\nfor cards in search results.\n\nThis change aligns Onboarding search results with Fleet search results\nand hides the card labels which fixes the issue with `Unverified` badge\nappearing for installed integrations.\n\n| Before | After |\n| --- | --- |\n|\n![388110694-bd6abaf4-15ac-4d56-b556-fddb11c85ba7](https://github.com/user-attachments/assets/751a6572-192c-45f6-bfa8-82433b73398d)\n| ![CleanShot 2025-03-07 at 14 35\n53@2x](https://github.com/user-attachments/assets/d1588d7d-eec8-4207-a1e6-9a53272bbddf)\n|","sha":"33f71ae678e833b4c91325e40f47d819e1edb08d"}},{"branch":"8.17","label":"v8.17.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Mykola Harmash <[email protected]>
1 parent 8e32c13 commit ff5042e

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

x-pack/solutions/observability/plugins/observability_onboarding/public/application/onboarding_flow_form/onboarding_flow_form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export const OnboardingFlowForm: FunctionComponent = () => {
325325
</strong>
326326
</EuiTitle>
327327
<EuiSpacer size="m" />
328-
<PackageList list={featuredCardsForCategory} />
328+
<PackageList list={featuredCardsForCategory} showCardLabels={true} />
329329
</div>
330330
</div>
331331

x-pack/solutions/observability/plugins/observability_onboarding/public/application/package_list/package_list.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ export const LazyPackageList = lazy(async () => ({
1717
interface Props {
1818
list: IntegrationCardItem[];
1919
searchTerm?: string;
20+
showCardLabels?: boolean;
2021
}
2122

22-
export function PackageList({ list, searchTerm = '' }: Props) {
23+
export function PackageList({ list, searchTerm = '', showCardLabels }: Props) {
2324
return (
2425
/**
2526
* Suspense wrapper is required by PackageListGrid, but
@@ -40,7 +41,7 @@ export function PackageList({ list, searchTerm = '' }: Props) {
4041
categories={[]}
4142
setUrlandReplaceHistory={() => {}}
4243
setUrlandPushHistory={() => {}}
43-
showCardLabels={true}
44+
showCardLabels={showCardLabels}
4445
/>
4546
</Suspense>
4647
);

x-pack/solutions/observability/plugins/observability_onboarding/public/application/package_list_search_form/package_list_search_form.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ const PackageListGridWrapper = ({
7777
}}
7878
query={searchQuery}
7979
/>
80-
{searchQuery !== '' && <PackageList list={list} searchTerm={searchQuery} />}
80+
{searchQuery !== '' && (
81+
<PackageList list={list} searchTerm={searchQuery} showCardLabels={false} />
82+
)}
8183
</div>
8284
);
8385
};

0 commit comments

Comments
 (0)