EDM-2353: Remove Tech Preview badge from all pages#377
Conversation
WalkthroughRemoves the TechPreviewBadge component and its i18n entries, eliminates badge rendering and the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
aa260b2 to
3d57892
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
libs/ui-components/src/components/OverviewPage/OverviewPage.tsx (1)
12-14: Consider removing redundantroleattribute.The
role="heading"attribute is redundant since the Title component withheadingLevel="h1"already renders a semantic<h1>element with implicit heading role.Apply this diff to simplify:
- <Title headingLevel="h1" size="3xl" role="heading"> + <Title headingLevel="h1" size="3xl"> {t('Overview')} </Title>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
libs/i18n/locales/en/translation.json(0 hunks)libs/ui-components/src/components/ListPage/ListPage.tsx(1 hunks)libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx(1 hunks)libs/ui-components/src/components/OverviewPage/OverviewPage.tsx(1 hunks)libs/ui-components/src/components/common/TechPreviewBadge.tsx(0 hunks)
💤 Files with no reviewable changes (2)
- libs/ui-components/src/components/common/TechPreviewBadge.tsx
- libs/i18n/locales/en/translation.json
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 298
File: libs/ui-components/src/components/common/TechPreviewBadge.tsx:0-0
Timestamp: 2025-06-17T09:28:22.347Z
Learning: The TECH_PREVIEW_LEVEL_LINK (https://access.redhat.com/support/offerings/techpreview) in the TechPreviewBadge component should remain constant across all branding scenarios (FlightCtl, ACM, AAP) since it's a general Red Hat support page about technology preview offerings, not product-specific documentation.
📚 Learning: 2025-06-17T09:28:22.347Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 298
File: libs/ui-components/src/components/common/TechPreviewBadge.tsx:0-0
Timestamp: 2025-06-17T09:28:22.347Z
Learning: The TECH_PREVIEW_LEVEL_LINK (https://access.redhat.com/support/offerings/techpreview) in the TechPreviewBadge component should remain constant across all branding scenarios (FlightCtl, ACM, AAP) since it's a general Red Hat support page about technology preview offerings, not product-specific documentation.
Applied to files:
libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx
🧬 Code graph analysis (1)
libs/ui-components/src/components/OverviewPage/OverviewPage.tsx (1)
libs/ui-components/src/hooks/useTranslation.ts (1)
useTranslation(5-8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: integration-tests
- GitHub Check: Lint
🔇 Additional comments (2)
libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx (1)
140-140: LGTM! Clean badge removal.The header has been simplified to a standalone Title component while preserving the Stack layout structure. The change correctly removes the TechPreviewBadge without affecting functionality.
libs/ui-components/src/components/OverviewPage/OverviewPage.tsx (1)
2-5: LGTM! Imports correctly updated.The imports have been properly updated to remove Flex, FlexItem, and TechPreviewBadge, keeping only the necessary PatternFly components and the Overview component.
3d57892 to
5b4cbd1
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
libs/ui-components/src/components/ListPage/ListPage.tsx (1)
14-20: Consider simplifying the layout wrapper.Now that the badge is removed, the Flex/FlexItem wrapper contains only a single Title element. You could simplify this by rendering the Title directly, though keeping the current structure doesn't cause any issues and may provide flexibility for future additions.
If you choose to simplify:
- <Flex gap={{ default: 'gapMd' }} alignItems={{ default: 'alignItemsCenter' }}> - <FlexItem> - <Title headingLevel={headingLevel} size="3xl"> - {title} - </Title> - </FlexItem> - </Flex> + <Title headingLevel={headingLevel} size="3xl"> + {title} + </Title>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
libs/i18n/locales/en/translation.json(0 hunks)libs/ui-components/src/components/Device/DevicesPage/DevicesPage.tsx(1 hunks)libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsx(1 hunks)libs/ui-components/src/components/ListPage/ListPage.tsx(1 hunks)libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx(1 hunks)libs/ui-components/src/components/OverviewPage/OverviewPage.tsx(1 hunks)libs/ui-components/src/components/common/TechPreviewBadge.tsx(0 hunks)
💤 Files with no reviewable changes (2)
- libs/ui-components/src/components/common/TechPreviewBadge.tsx
- libs/i18n/locales/en/translation.json
🚧 Files skipped from review as they are similar to previous changes (2)
- libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx
- libs/ui-components/src/components/OverviewPage/OverviewPage.tsx
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 298
File: libs/ui-components/src/components/common/TechPreviewBadge.tsx:0-0
Timestamp: 2025-06-17T09:28:22.347Z
Learning: The TECH_PREVIEW_LEVEL_LINK (https://access.redhat.com/support/offerings/techpreview) in the TechPreviewBadge component should remain constant across all branding scenarios (FlightCtl, ACM, AAP) since it's a general Red Hat support page about technology preview offerings, not product-specific documentation.
📚 Learning: 2025-01-07T12:25:35.520Z
Learnt from: rawagner
Repo: flightctl/flightctl-ui PR: 178
File: libs/ui-components/src/components/Repository/RepositoryList.tsx:220-220
Timestamp: 2025-01-07T12:25:35.520Z
Learning: In the FlightCtl UI, the ListPageBody component handles loading states by showing a centered spinner and preventing children from rendering when loading=true. No additional loading checks are needed in its children components.
Applied to files:
libs/ui-components/src/components/ListPage/ListPage.tsx
📚 Learning: 2025-02-11T10:24:15.684Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 208
File: libs/ui-components/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx:142-150
Timestamp: 2025-02-11T10:24:15.684Z
Learning: In the FlightCtl UI, device tables (`EnrolledDevicesTable` and `DecommissionedDevicesTable`) are swapped based on the `onlyDecommissioned` state, so their respective switches can have hardcoded values (`false` and `true`).
Applied to files:
libs/ui-components/src/components/Device/DevicesPage/DevicesPage.tsx
🧬 Code graph analysis (1)
libs/ui-components/src/components/Device/DevicesPage/DevicesPage.tsx (1)
libs/types/index.ts (1)
EnrollmentRequestList(86-86)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: integration-tests
- GitHub Check: Build ocp plugin
- GitHub Check: Build
- GitHub Check: Lint
🔇 Additional comments (3)
libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsx (1)
43-46: LGTM! Clean removal of the callback prop.The removal of
onEmptyListChangedfrom the component's public API simplifies the interface. The component retains its internal logic (lines 84-87) to hide itself when empty in non-standalone mode, so parent notification is no longer necessary.Also applies to: 53-53
libs/ui-components/src/components/Device/DevicesPage/DevicesPage.tsx (1)
65-65: LGTM! Badge-related logic cleanly removed.The removal of badge-related state and the
onEmptyListChangedcallback fromEnrollmentRequestListsimplifies the component integration. TherefetchDevicescallback is appropriately preserved to maintain data refresh functionality.Also applies to: 67-67
libs/ui-components/src/components/ListPage/ListPage.tsx (1)
5-11: LGTM! Badge-related prop successfully removed.The
withBadgeprop has been cleanly removed from both the type definition and component signature, addressing the previous review feedback. The type is now minimal and correct for the badge-free implementation.
Removes the Tech Preview badge in all UI pages.
Leaving in Draft to remove only at the end before the new release.
Summary by CodeRabbit
Removed Features
Refactor
Behavior Change
✏️ Tip: You can customize this high-level summary in your review settings.