Skip to content

ACM-37214 External link icon renders as heavy solid asset#6495

Open
oksanabaza wants to merge 1 commit into
stolostron:mainfrom
oksanabaza:ACM-37214
Open

ACM-37214 External link icon renders as heavy solid asset#6495
oksanabaza wants to merge 1 commit into
stolostron:mainfrom
oksanabaza:ACM-37214

Conversation

@oksanabaza

@oksanabaza oksanabaza commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

📝 Summary

Ticket Summary (Title):

ACM-37214 External link icon renders as heavy solid asset

Ticket Link:

https://redhat.atlassian.net/browse/ACM-37214

Type of Change:

  • 🐞 Bug Fix
  • ✨ Feature
  • 🔧 Refactor
  • 💸 Tech Debt
  • 🧪 Test-related
  • 📄 Docs

✅ Checklist

General

  • PR title follows the convention (e.g. ACM-12340 Fix bug with...)
  • Code builds and runs locally without errors
  • No console logs, commented-out code, or unnecessary files
  • All commits are meaningful and well-labeled
  • All new display strings are externalized for localization (English only)
  • (Nice to have) JSDoc comments added for new functions and interfaces

If Feature

  • UI/UX reviewed (if applicable)
  • All acceptance criteria met
  • Unit test coverage added or updated
  • Relevant documentation or comments included

If Bugfix

  • Root cause and fix summary are documented in the ticket (for future reference / errata)
  • Fix tested thoroughly and resolves the issue
  • Test(s) added to prevent regression

🗒️ Notes for Reviewers

2026-07-16.2.33.24.PM.mov

Summary by CodeRabbit

  • Bug Fixes
    • Fixed duplicate or unwanted bold icon rendering in the interface.
    • Improved visual compatibility with newer PatternFly versions.

Signed-off-by: Oksana Bazylieva <obazylie@redhat.com>
@oksanabaza

Copy link
Copy Markdown
Contributor Author

cc @KevinFCormier

@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: oksanabaza

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

The pull request process is described here

Details 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

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

A global CSS override was added to hide the PatternFly .pf-v6-svg .pf-v6-icon-rh-ui rendering.

Changes

PatternFly icon rendering

Layer / File(s) Summary
Global icon style override
frontend/src/GlobalApplicationStyle.css
Adds a comment and hides .pf-v6-svg .pf-v6-icon-rh-ui with display: none !important.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, specific, and matches the bug fix in the changeset.
Description check ✅ Passed The description follows the template and includes the ticket summary, link, type, checklist, and reviewer notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

frontend/src/GlobalApplicationStyle.css

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.


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.

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/GlobalApplicationStyle.css`:
- Around line 11-14: Replace the global `.pf-v6-svg .pf-v6-icon-rh-ui` rule in
GlobalApplicationStyle.css with a selector scoped to the duplicate
ExternalLinkAltIcon wrapper/path, using an existing wrapper-specific class or
adding one at the relevant render site. Ensure only the duplicate external-link
icon is hidden while unrelated RH UI icons remain visible, including across App
and plugin contexts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 009afa6f-25c8-4e3a-aacc-89660fa07329

📥 Commits

Reviewing files that changed from the base of the PR and between d149900 and 360652c.

📒 Files selected for processing (1)
  • frontend/src/GlobalApplicationStyle.css

Comment on lines +11 to +14
/* Fix for bold icons when running as plugin in OCP 4.22 - PatternFly 6.5+ dual icon rendering incompatibility */
.pf-v6-svg .pf-v6-icon-rh-ui {
display: none !important;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## File outline: frontend/src/GlobalApplicationStyle.css\n'
wc -l frontend/src/GlobalApplicationStyle.css
cat -n frontend/src/GlobalApplicationStyle.css

printf '\n## Search for pf-v6-icon-rh-ui and related selectors\n'
rg -n "pf-v6-icon-rh-ui|pf-v6-svg" frontend/src

printf '\n## Inspect imports of GlobalApplicationStyle.css\n'
rg -n "GlobalApplicationStyle\.css" frontend/src

printf '\n## Show nearby code for the import sites\n'
for f in frontend/src/App.tsx frontend/src/components/PluginContextProvider.tsx; do
  if [ -f "$f" ]; then
    printf '\n### %s\n' "$f"
    rg -n -C 3 "GlobalApplicationStyle\.css" "$f"
  fi
done

Repository: stolostron/console

Length of output: 15961


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Source occurrences outside snapshots\n'
rg -n --glob '!**/__snapshots__/**' "pf-v6-icon-rh-ui|pf-v6-svg" frontend/src

printf '\n## Inspect likely relevant components that use the icon\n'
for f in \
  frontend/src/routes/Search/components/HeaderWithNotification.tsx \
  frontend/src/routes/Search/components/ReuseableSearchbar.tsx \
  frontend/src/components/TemplateEditor/components/EditorHeader.tsx \
  frontend/src/components/TemplateEditor/components/EditorBar.tsx \
  frontend/src/components/TemplateEditor/controls/ControlPanelSingleSelect.tsx \
  frontend/src/components/TemplateEditor/controls/ControlPanelNumber.tsx \
  frontend/src/components/TemplateEditor/controls/ControlPanelMultiSelect.tsx
do
  if [ -f "$f" ]; then
    printf '\n### %s\n' "$f"
    rg -n -C 3 "pf-v6-icon-rh-ui|pf-v6-svg|ExternalLink|icon" "$f"
  fi
done

Repository: stolostron/console

Length of output: 398


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Search for icon-related source that could render pf-v6-icon-rh-ui\n'
rg -n --glob '!**/__snapshots__/**' \
  "ExternalLink|external link|pf-v6-icon-rh-ui|pf-v6-svg|icon-rh-ui|Icon.*external|external.*Icon|Link.*Icon" \
  frontend/src

printf '\n## Inspect the source files named by the snapshots if present\n'
for f in \
  frontend/src/routes/Search/components/HeaderWithNotification.tsx \
  frontend/src/routes/Search/components/ReuseableSearchbar.tsx \
  frontend/src/components/TemplateEditor/components/EditorHeader.tsx \
  frontend/src/components/TemplateEditor/components/EditorBar.tsx \
  frontend/src/components/TemplateEditor/controls/ControlPanelSingleSelect.tsx \
  frontend/src/components/TemplateEditor/controls/ControlPanelNumber.tsx \
  frontend/src/components/TemplateEditor/controls/ControlPanelMultiSelect.tsx
do
  if [ -f "$f" ]; then
    printf '\n### %s\n' "$f"
    cat -n "$f" | sed -n '1,220p'
  fi
done

Repository: stolostron/console

Length of output: 39646


Scope the icon override more narrowly.

frontend/src/App.tsx and frontend/src/components/PluginContextProvider.tsx load this stylesheet globally, so .pf-v6-svg .pf-v6-icon-rh-ui hides every matching RH UI icon in the app/plugin—not just the duplicate external-link case. There are multiple ExternalLinkAltIcon render sites in the codebase, so unrelated icons can disappear. Use a wrapper-specific selector or another narrower hook for the duplicate path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/GlobalApplicationStyle.css` around lines 11 - 14, Replace the
global `.pf-v6-svg .pf-v6-icon-rh-ui` rule in GlobalApplicationStyle.css with a
selector scoped to the duplicate ExternalLinkAltIcon wrapper/path, using an
existing wrapper-specific class or adding one at the relevant render site.
Ensure only the duplicate external-link icon is hidden while unrelated RH UI
icons remain visible, including across App and plugin contexts.

Source: Coding guidelines

@KevinFCormier

Copy link
Copy Markdown
Contributor

@oksanabaza shall we just upgrade to PF 6.5.2 if it has the fix?

@oksanabaza

oksanabaza commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@oksanabaza shall we just upgrade to PF 6.5.2 if it has the fix?

@KevinFCormier yes, upgrading OCP Console 4.22 to PF 6.5.2 would fix it (ACM already uses upgraded version), but it's not trivial. I tried locally and the build kept failing due to webpack/asset resolution issues. It would require additional changes beyond just bumping the version

@KevinFCormier

Copy link
Copy Markdown
Contributor

Oh, @oksanabaza I misunderstood. Yeah, 4.22 is already shipped, so we can't really ask them to upgrade PF in it.

@sonarqubecloud

Copy link
Copy Markdown

@KevinFCormier

Copy link
Copy Markdown
Contributor

/cc @KevinFCormier

@openshift-ci
openshift-ci Bot requested a review from KevinFCormier July 21, 2026 13:00

@KevinFCormier KevinFCormier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unfortunately this removes the icon completely when running with OCP 5.0 (CONSOLE_VERSION=5.0 npm run plugins).

Image

}

/* Fix for bold icons when running as plugin in OCP 4.22 - PatternFly 6.5+ dual icon rendering incompatibility */
.pf-v6-svg .pf-v6-icon-rh-ui {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.pf-v6-svg .pf-v6-icon-rh-ui {
.pf-v6-svg .pf-v6-icon-rh-ui :not(.pf-v6-icon-set-rh-ui *) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants