Repository navigation
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
Conversation
…ction history table (Junirezz#1746)
|
@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! 🚀 |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
stellarExplorerBaseUrlsinsrc/config/networkrelattributestarget="_blank" rel="noopener noreferrer"<a href="#">— a dead link<span>text insteadtitletooltip; accessible name was the truncated hash (abcd…1234)aria-labelnaming the transactionWhat changed
frontend/src/pages/TransactionHistory.tsx#(i.e.isValidTransactionHashfailed), it renders a<span>rather than a navigable link. The row stays readable — there is simply nowhere to navigate to.aria-labelof "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 ofabcd...1234.data-tx-hashto the cell so tests can locate hash cells regardless of which element rendered.frontend/src/i18n/locales/en.ts/es.tstxHistory.viewOnExplorerAriastring in both locales.frontend/src/pages/TransactionHistory.test.tsxrenderedHashPrefixes()previously selectedgetAllByRole("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>.<span>with no link in the table.Why the existing link was not enough
isValidTransactionHashrequires exactly 64 hex characters. Test fixtures and any row whose hash fails that check were gettinghref="#", which is focusable, announced as a link, and navigates nowhere — a dead end for both keyboard and screen-reader users.Validation
npx tsc -b→ exit 0npx eslinton all 5 changed files → exit 0Full frontend suite:
1458 passed | 14 failed (1472).The 14 failures are pre-existing on
origin/mainand unrelated to this change — they are inNavbar,NotificationBell,TransactionConfirmationModal, andVaultDashboard, none of which this PR touches. Verified by stashing this branch and re-running those four files on a cleanorigin/maincheckout, which reproduced the identical result:4 failed (4) / 14 failed | 60 passed (74).