fix(homepage): replace "View X entities" with "Browse the catalog"#2702
Conversation
Changed Packages
|
Review Summary by QodoReplace misleading entity count with "Browse the catalog" label
WalkthroughsDescription• 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 Diagramflowchart 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"]
File Changes1. workspaces/homepage/plugins/dynamic-home-page/src/components/EntitySection/EntitySection.tsx
|
Code Review by Qodo
1. E2E references removed key
|
christoph-jerolimov
left a comment
There was a problem hiding this comment.
Lgtm! Thanks @Eswaraiahsapram 🙏
| {entities?.length > 0 && ( | ||
| <Box sx={{ pt: 2 }}> | ||
| <ViewMoreLink to="/catalog"> | ||
| <Trans | ||
| message="entities.viewAll" | ||
| params={{ count: data?.totalItems?.toString() || '' }} | ||
| /> | ||
| {t('entities.browseTheCatalog')} | ||
| </ViewMoreLink> |
There was a problem hiding this comment.
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
9a7bc26 to
5f7a06d
Compare
|
teknaS47
left a comment
There was a problem hiding this comment.
Tested locally, looks good and tests passing



Hey, I just made a Pull Request!
Fix - https://redhat.atlassian.net/browse/RHDHBUGS-1941
Description
Screenshot
✔️ Checklist