generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 55
RHIDP-9035: Update the QuickAccess card icons on the Homepage #1513
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
Merged
pabel-rh
merged 5 commits into
redhat-developer:main
from
jmagak:PlatformRHIDP-9035-Enhance-QuickAccess-card-icon-rendering-to-support-multiple-icon-sources
Nov 6, 2025
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
686d537
Update the QuickAccess card icons on the Homepage
invalid-email-address ab33af4
Minor fix
invalid-email-address 5b23be0
Minor fix
invalid-email-address 5d398db
Apply suggestions
invalid-email-address 4d852ab
Apply suggestions
invalid-email-address File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
...the-home-page/proc-customizing-quickaccess-card-icons-on-the-rhdh-homepage.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
|
|
||
| [id="customizing-quickaccess-card-icons-on-the-rhdh-homepage_{context}"] | ||
| = Customizing QuickAccess card icons on the {product} homepage | ||
|
|
||
| As an administrator, you can customize the QuickAccess card icons on the {product} homepage to enhance its visual appeal and user experience. You can integrate custom branding or standard icons by leveraging a remote JSON configuration file. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Add the JSON Data source. The QuickAccess Cards on the homepage supports loading data from a JSON file. This JSON file can be hosted in your GitHub repository or any accessible endpoint. | ||
|
|
||
| . Configure the Proxy in `{my-app-config-file}` | ||
| + | ||
| To allow the homepage to fetch data from the hosted JSON file, add the following proxy configuration to your `{my-app-config-file}`: | ||
jmagak marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
jmagak marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| [source,yaml] | ||
| ---- | ||
| proxy: | ||
| endpoints: | ||
| # customize your backstage instance | ||
| '/developer-hub': | ||
| target: https://raw.githubusercontent.com/ # For example, https://raw.githubusercontent.com/ | ||
| pathRewrite: | ||
| '^/api/proxy/developer-hub$': <path-to-your>.json # For example, /redhat-developer/rhdh/main/packages/app/public/homepage/data.json | ||
| changeOrigin: true | ||
| secure: true | ||
| ---- | ||
|
|
||
| The following table lists the supported icon types: | ||
|
|
||
| [cols="25%,25%,50%", frame="all", options="header"] | ||
| |=== | ||
| |Icon type | ||
| |Example | ||
| |Rendered as | ||
|
|
||
| |*Backstage System Icon* | ||
jmagak marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| |`"catalog"` | ||
| |Uses Backstage system [icons](https://github.com/backstage/backstage/blob/master/packages/app-defaults/src/defaults/icons.tsx) | ||
jmagak marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| |*SVG String* | ||
| |`"<svg>...</svg>"` | ||
| |Renders inline SVG | ||
|
|
||
| |*Image URL* | ||
| |`"https://example.com/icon.png"` | ||
| |Renders external image. External images might be be restricted to Content Security Policy (CSP) which can be configured in the `app-config.yaml`. | ||
jmagak marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| |*Relative Path* | ||
| |`"/homepage/icons/icon.png"` | ||
| |Loads the icon from the app public folder (if present) | ||
| |=== | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| SVGs must be valid strings when stored inside JSON (use single quotes inside `<svg>`) | ||
jmagak marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ==== | ||
|
|
||
| The following is an example of a JSON file: | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| [ | ||
| { | ||
| "title": "Community", | ||
| "isExpanded": true, | ||
| "links": [ | ||
| { | ||
| "iconUrl": "https://img.icons8.com/ios/50/globe--v1.png", | ||
| "label": "Website", | ||
| "url": "https://developers.redhat.com/" | ||
| }, | ||
| { | ||
| "iconUrl": "https://img.icons8.com/ios/50/link--v1.png", | ||
| "label": "Blog", | ||
| "url": "https://developers.redhat.com/blog" | ||
| }, | ||
| { | ||
| "iconUrl": "github", | ||
| "label": "GitHub", | ||
| "url": "https://github.com/redhat-developer" | ||
| }, | ||
| { | ||
| "iconUrl": "https://img.icons8.com/color/48/slack.png", | ||
| "label": "Slack", | ||
| "url": "https://join.slack.com/xyz" | ||
| }, | ||
| { | ||
| "iconUrl": "https://img.icons8.com/color/48/youtube-squared.png", | ||
| "label": "Videos for developers", | ||
| "url": "https://developers.redhat.com/videos" | ||
| }, | ||
| { | ||
| "iconUrl": "<svg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='2048' height='2048' style='shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;fill-rule:evenodd;clip-rule:evenodd'><defs><style>.fil0{fill:none}.fil4{fill:#bdbdbd;fill-rule:nonzero}</style></defs><g id='Layer_x0020_1'><path class='fil0' d='M0 0h2048v2048H0z'/><path class='fil0' d='M255.999 255.999h1536v1536h-1536z'/><path class='fil0' d='M256 256h1536v1536H256z'/><g id='_342647616'><path id='_342648000' style='fill:#e53935;fill-rule:nonzero' d='m273.04 666.226 737.28-367.843 13.68-6.824 13.68 6.824 737.28 367.843 17.04 8.503v234.834L993.281 1418.52 255.999 909.563V674.729z'/><path id='_342647880' style='fill:#fff' d='M609.28 711.961h829.439V1541.4H609.28z'/><path id='_342647808' style='fill:#c62828;fill-rule:nonzero' d='m1024 1279.73 723.6-361.079 44.4-22.156v859.945H255.999V896.495l44.402 22.156z'/><path id='_342647736' class='fil4' d='M1331.2 896.285H716.716v-61.442H1331.2z'/><path id='_342647688' class='fil4' d='M1203.22 1049.88H844.698v-61.439h358.522z'/></g></g></svg>", | ||
| "label": "Mailing List", | ||
| "url": "https://groups.google.com/g/xyz" | ||
| }, | ||
| ] | ||
| } | ||
| ] | ||
| ---- | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.