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

[OCMUI-1145] PreviewBadge: allow ReactNode content #2560

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

cben
Copy link
Contributor

@cben cben commented Apr 17, 2024

Motivation: In OCM we have use case for showing dynamic badge content (https://issues.redhat.com/browse/OCMUI-1145) where we don't get separate "Learn More" URL but might render links in the text itself.

The existing PreviewBadge component supports this fine at run time, only the popoverText: string type was too restrictive at compile time.

  • Relaxed the type.
  • Renamed popoverText -> popoverContent accordingly. Can drop this part if there is any concern?

With the ongoing de-coupling of our codebases, I'm not sure we'll end up using this — but seems harmless enough?

  • UNTESTED — I don't have AI dev setup, didn't manage to run unit tests even on master (Missing internal module 'internal/deps/./lib/client'...)
  • yarn build:all passed.

@cben cben requested a review from a team as a code owner April 17, 2024 10:19
@openshift-ci openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 17, 2024
@cben
Copy link
Contributor Author

cben commented Apr 24, 2024

@ammont82 please review

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2024
@ammont82 ammont82 requested a review from jgyselov April 24, 2024 10:31
Copy link

openshift-ci bot commented Apr 24, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ammont82, cben, jgyselov

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Motivation: In OCM we have use case for showing dynamic badge content
(https://issues.redhat.com/browse/OCMUI-1145) where we don't get separate
"Learn More" URL but might render links in the text itself.

The existing `PreviewBadge` component supports this fine at run time,
only the `popoverText: string` type was too restrictive at compile time.
=> Relaxing the type + renames `popoverText` -> `popoverContent`.
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 25, 2024
Copy link

openshift-ci bot commented Apr 25, 2024

New changes are detected. LGTM label has been removed.

@ammont82 ammont82 merged commit 38295d0 into openshift-assisted:master Apr 25, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants