Skip to content

fix(homepage): replace "View X entities" with "Browse the catalog"#2702

Merged
Eswaraiahsapram merged 2 commits intoredhat-developer:mainfrom
Eswaraiahsapram:fix/homepage-RHDHBUGS-1941
Apr 6, 2026
Merged

fix(homepage): replace "View X entities" with "Browse the catalog"#2702
Eswaraiahsapram merged 2 commits intoredhat-developer:mainfrom
Eswaraiahsapram:fix/homepage-RHDHBUGS-1941

Conversation

@Eswaraiahsapram
Copy link
Copy Markdown
Member

@Eswaraiahsapram Eswaraiahsapram commented Apr 6, 2026

Hey, I just made a Pull Request!

Fix - https://redhat.atlassian.net/browse/RHDHBUGS-1941

Description

  • The "Explore Your Software Catalog" card previously displayed a link labeled with a dynamic entity count (e.g., “View 10 entities”), which was misleading. The count did not accurately reflect the entities visible after navigation (e.g., showing only components instead of all entity types).
  • To improve
    • Updated the link label from “View X entities” to "Browse the catalog".
  • Impact
    • Improves UX by removing misleading information

Screenshot

image

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app bot commented Apr 6, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-dynamic-home-page workspaces/homepage/plugins/dynamic-home-page patch v1.11.0

@rhdh-qodo-merge
Copy link
Copy Markdown

Review Summary by Qodo

Replace misleading entity count with "Browse the catalog" label

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Replace misleading "View X entities" label with "Browse the catalog"
• Remove dynamic entity count from catalog link across all languages
• Update translation keys from entities.viewAll to entities.browseTheCatalog
• Simplify component implementation by removing count parameter
Diagram
flowchart LR
  A["EntitySection Component"] -- "uses misleading label" --> B["View X entities"]
  B -- "replaced with" --> C["Browse the catalog"]
  D["Translation Files"] -- "updated keys" --> E["entities.browseTheCatalog"]
  F["ViewMoreLink Component"] -- "simplified" --> G["Remove count parameter"]
Loading

Grey Divider

File Changes

1. workspaces/homepage/plugins/dynamic-home-page/src/components/EntitySection/EntitySection.tsx 🐞 Bug fix +1/-5

Remove entity count from catalog link

workspaces/homepage/plugins/dynamic-home-page/src/components/EntitySection/EntitySection.tsx


2. workspaces/homepage/plugins/dynamic-home-page/src/translations/ref.ts 🐞 Bug fix +1/-1

Update reference translation key

workspaces/homepage/plugins/dynamic-home-page/src/translations/ref.ts


3. workspaces/homepage/plugins/dynamic-home-page/src/translations/de.ts 🐞 Bug fix +1/-1

Update German translation for catalog link

workspaces/homepage/plugins/dynamic-home-page/src/translations/de.ts


View more (6)
4. workspaces/homepage/plugins/dynamic-home-page/src/translations/es.ts 🐞 Bug fix +1/-1

Update Spanish translation for catalog link

workspaces/homepage/plugins/dynamic-home-page/src/translations/es.ts


5. workspaces/homepage/plugins/dynamic-home-page/src/translations/fr.ts 🐞 Bug fix +1/-1

Update French translation for catalog link

workspaces/homepage/plugins/dynamic-home-page/src/translations/fr.ts


6. workspaces/homepage/plugins/dynamic-home-page/src/translations/it.ts 🐞 Bug fix +1/-1

Update Italian translation for catalog link

workspaces/homepage/plugins/dynamic-home-page/src/translations/it.ts


7. workspaces/homepage/plugins/dynamic-home-page/src/translations/ja.ts 🐞 Bug fix +1/-1

Update Japanese translation for catalog link

workspaces/homepage/plugins/dynamic-home-page/src/translations/ja.ts


8. workspaces/homepage/plugins/dynamic-home-page/report-alpha.api.md 📝 Documentation +1/-1

Update API documentation for translation key

workspaces/homepage/plugins/dynamic-home-page/report-alpha.api.md


9. workspaces/homepage/.changeset/late-dolphins-dream.md ⚙️ Configuration changes +5/-0

Add changeset for patch release

workspaces/homepage/.changeset/late-dolphins-dream.md


Grey Divider

Qodo Logo

@rhdh-qodo-merge
Copy link
Copy Markdown

rhdh-qodo-merge bot commented Apr 6, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX Issues (0)

Grey Divider


Action required

1. E2E references removed key 🐞 Bug ≡ Correctness
Description
homepageCards.test.ts still asserts on translations.entities.viewAll, but the PR renamed the
EntitySection link label to entities.browseTheCatalog. This will fail the e2e suite (and may fail
TypeScript compilation) because viewAll no longer exists on HomepageMessages.
Code

workspaces/homepage/plugins/dynamic-home-page/src/components/EntitySection/EntitySection.tsx[R320-324]

        {entities?.length > 0 && (
          <Box sx={{ pt: 2 }}>
            <ViewMoreLink to="/catalog">
-              <Trans
-                message="entities.viewAll"
-                params={{ count: data?.totalItems?.toString() || '' }}
-              />
+              {t('entities.browseTheCatalog')}
            </ViewMoreLink>
Evidence
The PR changes the rendered link text to use t('entities.browseTheCatalog'), and the reference
messages object defines browseTheCatalog (not viewAll). However the e2e test still dereferences
translations.entities.viewAll, which is now an invalid property and/or will assert the wrong
label.

workspaces/homepage/plugins/dynamic-home-page/src/components/EntitySection/EntitySection.tsx[320-324]
workspaces/homepage/plugins/dynamic-home-page/src/translations/ref.ts[81-93]
workspaces/homepage/packages/app/e2e-tests/homepageCards.test.ts[135-147]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The Entities card e2e test asserts the old `entities.viewAll` translation (including `evaluateMessage(..., '5')`), but the UI now renders `entities.browseTheCatalog` with no interpolation.

### Issue Context
`HomepageMessages` is typed from `homepageMessages` (ref translations). Since the key was renamed, the e2e test will fail (TS property missing and/or wrong expected link text).

### Fix Focus Areas
- workspaces/homepage/packages/app/e2e-tests/homepageCards.test.ts[17-23]
- workspaces/homepage/packages/app/e2e-tests/homepageCards.test.ts[135-147]

### Suggested change
- Replace `evaluateMessage(translations.entities.viewAll, '5')` with `translations.entities.browseTheCatalog`.
- Remove the now-unused `evaluateMessage` import if it’s no longer referenced in this test file.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Copy link
Copy Markdown
Member

@christoph-jerolimov christoph-jerolimov left a comment

Choose a reason for hiding this comment

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

Lgtm! Thanks @Eswaraiahsapram 🙏

Comment on lines 320 to 324
{entities?.length > 0 && (
<Box sx={{ pt: 2 }}>
<ViewMoreLink to="/catalog">
<Trans
message="entities.viewAll"
params={{ count: data?.totalItems?.toString() || '' }}
/>
{t('entities.browseTheCatalog')}
</ViewMoreLink>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. E2e references removed key 🐞 Bug ≡ Correctness

homepageCards.test.ts still asserts on translations.entities.viewAll, but the PR renamed the
EntitySection link label to entities.browseTheCatalog. This will fail the e2e suite (and may fail
TypeScript compilation) because viewAll no longer exists on HomepageMessages.
Agent Prompt
### Issue description
The Entities card e2e test asserts the old `entities.viewAll` translation (including `evaluateMessage(..., '5')`), but the UI now renders `entities.browseTheCatalog` with no interpolation.

### Issue Context
`HomepageMessages` is typed from `homepageMessages` (ref translations). Since the key was renamed, the e2e test will fail (TS property missing and/or wrong expected link text).

### Fix Focus Areas
- workspaces/homepage/packages/app/e2e-tests/homepageCards.test.ts[17-23]
- workspaces/homepage/packages/app/e2e-tests/homepageCards.test.ts[135-147]

### Suggested change
- Replace `evaluateMessage(translations.entities.viewAll, '5')` with `translations.entities.browseTheCatalog`.
- Remove the now-unused `evaluateMessage` import if it’s no longer referenced in this test file.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@Eswaraiahsapram Eswaraiahsapram force-pushed the fix/homepage-RHDHBUGS-1941 branch from 9a7bc26 to 5f7a06d Compare April 6, 2026 10:15
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 6, 2026

Copy link
Copy Markdown
Member

@teknaS47 teknaS47 left a comment

Choose a reason for hiding this comment

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

Tested locally, looks good and tests passing

@Eswaraiahsapram Eswaraiahsapram merged commit 4e40bf1 into redhat-developer:main Apr 6, 2026
10 checks passed
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.

3 participants