Skip to content

EDM-2353: Remove Tech Preview badge from all pages#377

Merged
celdrake merged 1 commit into
flightctl:mainfrom
celdrake:EDM-2353-remove-tech-preview-badge
Nov 25, 2025
Merged

EDM-2353: Remove Tech Preview badge from all pages#377
celdrake merged 1 commit into
flightctl:mainfrom
celdrake:EDM-2353-remove-tech-preview-badge

Conversation

@celdrake

@celdrake celdrake commented Nov 14, 2025

Copy link
Copy Markdown
Collaborator

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

    • Technology preview badges, labels and descriptions removed from the UI.
  • Refactor

    • Simplified page headers and layouts to remove badge placement and streamline headings.
  • Behavior Change

    • List pages and enrollment request views no longer show or report badge-related/empty-list indicators.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Nov 14, 2025

Copy link
Copy Markdown

Walkthrough

Removes the TechPreviewBadge component and its i18n entries, eliminates badge rendering and the withBadge prop from ListPage, and deletes badge-related layout/imports from CommandLineToolsPage, OverviewPage, DevicesPage, and EnrollmentRequestList. No runtime data-flow logic beyond UI/callback removals.

Changes

Cohort / File(s) Summary
Component deleted
libs/ui-components/src/components/common/TechPreviewBadge.tsx
Entire TechPreviewBadge component and its default export removed (Popover + Label + i18n + LearnMoreLink).
List page update
libs/ui-components/src/components/ListPage/ListPage.tsx
Removed TechPreviewBadge import/usage and deleted withBadge?: boolean from ListPageProps and props destructuring.
Masthead header update
libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx
Removed Flex/FlexItem imports and wrapper, removed TechPreviewBadge import/usage; header now renders a plain Title.
Overview header update
libs/ui-components/src/components/OverviewPage/OverviewPage.tsx
Removed Flex/FlexItem wrapper and TechPreviewBadge usage; replaced header with standalone Title inside PageSection and adjusted imports.
Devices / Enrollment adjustments
libs/ui-components/src/components/Device/.../DevicesPage.tsx, libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsx
Removed local badge visibility state and on-empty-list callback: showDeviceListBadge and onEmptyListChanged removed; EnrollmentRequestList no longer accepts onEmptyListChanged prop and no longer invokes it.
Translations removed
libs/i18n/locales/en/translation.json
Removed three translation keys related to "Technology preview" (label, description, long description).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify no remaining imports/usages of TechPreviewBadge across the repo.
  • Confirm no consumers rely on ListPageProps.withBadge or EnrollmentRequestList.onEmptyListChanged; update callers/tests accordingly.
  • Review DevicesPage UI/logic to ensure removal of badge-related state doesn't affect other behaviors.
  • Check i18n consumers for missing translation keys and fallback behavior.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective of this changeset: removing the Tech Preview badge component and all its usages across multiple pages and translation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@celdrake celdrake marked this pull request as ready for review November 25, 2025 12:11
@celdrake celdrake force-pushed the EDM-2353-remove-tech-preview-badge branch from aa260b2 to 3d57892 Compare November 25, 2025 12:14
@celdrake celdrake requested a review from rawagner November 25, 2025 12:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
libs/ui-components/src/components/OverviewPage/OverviewPage.tsx (1)

12-14: Consider removing redundant role attribute.

The role="heading" attribute is redundant since the Title component with headingLevel="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

📥 Commits

Reviewing files that changed from the base of the PR and between a6bc9d6 and 3d57892.

📒 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.

Comment thread libs/ui-components/src/components/ListPage/ListPage.tsx
@celdrake celdrake force-pushed the EDM-2353-remove-tech-preview-badge branch from 3d57892 to 5b4cbd1 Compare November 25, 2025 12:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3d57892 and 5b4cbd1.

📒 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 onEmptyListChanged from 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 onEmptyListChanged callback from EnrollmentRequestList simplifies the component integration. The refetchDevices callback 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 withBadge prop 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.

@celdrake celdrake merged commit 67576b9 into flightctl:main Nov 25, 2025
6 checks passed
@celdrake celdrake deleted the EDM-2353-remove-tech-preview-badge branch November 25, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants