Skip to content

feat(frontend): add a view-on-explorer link to each row of the transaction history table (#1746) - #1778

Open
amehsamuel200225-sketch wants to merge 1 commit into
Junirezz:mainfrom
amehsamuel200225-sketch:feat/1746-explorer-link-transaction-row
Open

amehsamuel200225-sketch wants to merge 1 commit into
Junirezz:mainfrom
amehsamuel200225-sketch:feat/1746-explorer-link-transaction-row

Conversation

@amehsamuel200225-sketch

Copy link
Copy Markdown

Summary

Closes #1746.

The transaction history table already rendered the transaction hash as an explorer link, but it did not meet all four acceptance criteria. This PR closes the three real gaps.

Acceptance criteria

Criterion Before After
Network-correct explorer base URL ✅ already read from stellarExplorerBaseUrls in src/config/network unchanged
New tab + safe rel attributes ✅ target="_blank" rel="noopener noreferrer" unchanged
Only shown when a valid hash exists ❌ invalid hashes rendered <a href="#"> — a dead link ✅ renders plain <span> text instead
Accessible label clear to assistive technology ❌ only a title tooltip; accessible name was the truncated hash (abcd…1234) ✅ aria-label naming the transaction

What changed

frontend/src/pages/TransactionHistory.tsx

  • The hash cell now resolves the explorer URL first; if it is # (i.e. isValidTransactionHash failed), it renders a <span> rather than a navigable link. The row stays readable — there is simply nowhere to navigate to.
  • Valid hashes get an aria-label of "View transaction {full hash} on the Stellar explorer". The visible text stays truncated for layout, while the label carries the full 64-character hash so screen readers announce something unambiguous instead of abcd...1234.
  • Added data-tx-hash to the cell so tests can locate hash cells regardless of which element rendered.

frontend/src/i18n/locales/en.ts / es.ts

  • New txHistory.viewOnExplorerAria string in both locales.

frontend/src/pages/TransactionHistory.test.tsx

  • renderedHashPrefixes() previously selected getAllByRole("link"), which assumed every hash cell was a link. It now selects [data-tx-hash], so it keeps working now that an unparseable hash is not an <a>.
  • Added two tests: the accessible label is present and carries the full hash, and an invalid hash renders as a <span> with no link in the table.

Why the existing link was not enough

isValidTransactionHash requires exactly 64 hex characters. Test fixtures and any row whose hash fails that check were getting href="#", which is focusable, announced as a link, and navigates nowhere — a dead end for both keyboard and screen-reader users.

Validation

Test Files  2 passed (2)
     Tests  87 passed (87)
  • ✅ npx tsc -b → exit 0
  • ✅ npx eslint on all 5 changed files → exit 0
  • ✅ Targeted tests: 87/87 pass (TransactionHistory + security)

Full frontend suite: 1458 passed | 14 failed (1472).

The 14 failures are pre-existing on origin/main and unrelated to this change — they are in Navbar, NotificationBell, TransactionConfirmationModal, and VaultDashboard, none of which this PR touches. Verified by stashing this branch and re-running those four files on a clean origin/main checkout, which reproduced the identical result: 4 failed (4) / 14 failed | 60 passed (74).

@drips-wave

drips-wave Bot commented Nov 22, 2026

Copy link
Copy Markdown

@amehsamuel200225-sketch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

This branch has not been deployed

No deployments
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.

feat(frontend): add a view-on-explorer link to each row of the transaction history table

1 participant