Frontend: AddressRow primitive (short address + copy + explorer) #188

Closed
opened 2026-05-25 02:13:50 +00:00 by PlasticDigits · 19 comments
PlasticDigits commented 2026-05-25 02:13:50 +00:00 (Migrated from gitlab.com)

Summary

Cross-cutting AddressRow primitive (shortened text + copy + explorer) per #140 audit — umbrella for ~5 partial-info surfaces, separate from wallet-chip-only work.

Surfaces (non-exhaustive)

  • TraderPage.tsx — search / result header
  • PoolPage.tsx — LP token address
  • Pair address chips on Pool / Charts / Limit orders
  • TxResultAlert.tsx — explorer present, copy missing

Acceptance criteria

  • Reusable component API (address, optional shorten props, network for explorer).
  • Uses #183 CopyButton + explorer address URL helper.
  • Migrate at least wallet dropdown OR one secondary surface in same MR; remaining surfaces can be follow-ups linked here.
  • Agent doc under skills/ + docs/frontend.md cross-link.

Relates to: #140, #183

cc @Brouie @PlasticDigits

## Summary Cross-cutting **AddressRow** primitive (shortened text + copy + explorer) per [#140](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/140) audit — umbrella for ~5 partial-info surfaces, separate from wallet-chip-only work. ## Surfaces (non-exhaustive) - `TraderPage.tsx` — search / result header - `PoolPage.tsx` — LP token address - Pair address chips on Pool / Charts / Limit orders - `TxResultAlert.tsx` — explorer present, copy missing ## Acceptance criteria - [ ] Reusable component API (address, optional `shorten` props, network for explorer). - [ ] Uses [#183](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/183) CopyButton + explorer address URL helper. - [ ] Migrate at least wallet dropdown OR one secondary surface in same MR; remaining surfaces can be follow-ups linked here. - [ ] Agent doc under `skills/` + `docs/frontend.md` cross-link. **Relates to:** [#140](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/140), [#183](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/183) cc @Brouie @PlasticDigits
PlasticDigits commented 2026-05-25 02:13:51 +00:00 (Migrated from gitlab.com)

marked as related to #140

marked as related to #140
PlasticDigits commented 2026-05-25 02:13:52 +00:00 (Migrated from gitlab.com)

marked as related to #183

marked as related to #183
PlasticDigits commented 2026-05-25 02:14:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #140

mentioned in issue #140
PlasticDigits commented 2026-05-25 02:14:13 +00:00 (Migrated from gitlab.com)

mentioned in commit 574dfdf4e6

mentioned in commit 574dfdf4e6a43d0c7f2b0933301f440bf326b679
PlasticDigits commented 2026-05-25 02:28:02 +00:00 (Migrated from gitlab.com)

mentioned in commit a04549c267

mentioned in commit a04549c2679dea9628eeaf5079452bcc4ff19883
PlasticDigits commented 2026-05-25 02:28:12 +00:00 (Migrated from gitlab.com)

Implementation summary (@brouie — please verify)

Shipped AddressRow on main (a04549c): reusable shortened/full address + CopyButton (#183) + getExplorerAddressUrl (#184).

What changed

Verification checklist

  • Connect wallet → open menu → full address shows with copy + explorer icon; copy announces via screen reader
  • Explorer links open correct network (local LCD / mainnet / testnet Finder) for wallet address
  • Pool → remove liquidity panel → LP Token row has copy + explorer
  • /trader/:addr header shows shortened address with copy + explorer
  • npm run test:unit — AddressRow.test.tsx + WalletButton.test.tsx pass
  • Wallet menu still closes on Escape and semantic dismiss backdrop (#187)

Still open under #188 (follow-ups)

  • Pair address chips (Pool / Charts / Limit orders)
  • TxResultAlert tx hash copy (explorer link already present)

Leaving issue open for the remaining surfaces and QA sign-off.

/cc @Brouie

## Implementation summary (@brouie — please verify) Shipped **`AddressRow`** on `main` (`a04549c`): reusable shortened/full address + **`CopyButton`** ([#183](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/183)) + **`getExplorerAddressUrl`** ([#184](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/184)). ### What changed - New [`AddressRow.tsx`](frontend-dapp/src/components/ui/AddressRow.tsx) + Vitest coverage - Migrated: wallet dropdown full address (`wallet-menu-address-row`), pool LP token line (`pool-lp-token-address-row`), trader profile header (`trader-profile-address-row`) - Docs: [`docs/frontend.md#addressrow-primitive`](docs/frontend.md#addressrow-primitive) - Agent playbook: [`skills/AGENTS_FRONTEND_ADDRESS_ROW.md`](skills/AGENTS_FRONTEND_ADDRESS_ROW.md) (cross-linked with copy/explorer/wallet-chip skills) ### Verification checklist - [ ] Connect wallet → open menu → full address shows with **copy** + **explorer** icon; copy announces via screen reader - [ ] Explorer links open correct network (local LCD / mainnet / testnet Finder) for wallet address - [ ] Pool → remove liquidity panel → **LP Token** row has copy + explorer - [ ] `/trader/:addr` header shows shortened address with copy + explorer - [ ] `npm run test:unit` — `AddressRow.test.tsx` + `WalletButton.test.tsx` pass - [ ] Wallet menu still closes on **Escape** and semantic dismiss backdrop ([#187](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/187)) ### Still open under #188 (follow-ups) - Pair address chips (Pool / Charts / Limit orders) - `TxResultAlert` tx hash **copy** (explorer link already present) Leaving issue **open** for the remaining surfaces and QA sign-off. /cc @Brouie
PlasticDigits commented 2026-05-25 02:30:03 +00:00 (Migrated from gitlab.com)

mentioned in issue #186

mentioned in issue #186
PlasticDigits commented 2026-05-25 02:34:04 +00:00 (Migrated from gitlab.com)

mentioned in commit f81f620f6b

mentioned in commit f81f620f6b7d55e63b17df816fd133f8561f49b7
PlasticDigits commented 2026-05-25 02:34:21 +00:00 (Migrated from gitlab.com)

mentioned in issue #185

mentioned in issue #185
Brouie commented 2026-05-25 03:04:09 +00:00 (Migrated from gitlab.com)

verified at source+unit-test layer on QA stack — a04549c is in main at HEAD f81f620.

source: AddressRow.tsx API matches AC. uses CopyButton (#183) + getExplorerAddressUrl (#184). a11y: rel="noopener noreferrer", aria-label / aria-hidden, tooltip via title.

migrations grep-confirmed: WalletButton.tsx:83 (wallet dropdown), PoolPage.tsx:819 (LP token), TraderPage.tsx:170 (trader profile).

unit tests:

  • AddressRow.test.tsx 4/4 PASS
  • WalletButton.test.tsx 8/8 PASS — covers item 1 (copy + explorer + switch wallet visible at line 144) and item 6 (Escape dismiss at line 118)
  • CopyButton.test.tsx 4/4 PASS
  • terraExplorer.test.ts 6/8 PASS — mainnet + testnet address URL paths PASS (covers item 2 for those networks). 2 local-build tests fail due to test fragility (stubs VITE_NETWORK=local but does not override VITE_TERRA_LCD_URL, so it picks up the QA .env value 127.0.0.1:1317 vs hardcoded localhost:1317). production behavior is correct.

e2e + visual browser walk: queued for next pass with full stack up. Simulated Wallet fixture (e2e/fixtures/dev-wallet.ts) expects terra1*20k38v address but did not produce it on REQUIRE_LOCALTERRA=0 run — separate fixture-env concern.

@PlasticDigits — terraExplorer.test.ts local-build fragility worth a small followup (stub both VITE_NETWORK and VITE_TERRA_LCD_URL together, or pin the local-build fallback independent of env). does not block #188 from code-correctness — primitive layer is verified.

verified at source+unit-test layer on QA stack — `a04549c` is in main at HEAD `f81f620`. source: `AddressRow.tsx` API matches AC. uses `CopyButton` (#183) + `getExplorerAddressUrl` (#184). a11y: `rel="noopener noreferrer"`, `aria-label` / `aria-hidden`, tooltip via `title`. migrations grep-confirmed: `WalletButton.tsx:83` (wallet dropdown), `PoolPage.tsx:819` (LP token), `TraderPage.tsx:170` (trader profile). unit tests: - `AddressRow.test.tsx` 4/4 PASS - `WalletButton.test.tsx` 8/8 PASS — covers item 1 (copy + explorer + switch wallet visible at line 144) and item 6 (Escape dismiss at line 118) - `CopyButton.test.tsx` 4/4 PASS - `terraExplorer.test.ts` 6/8 PASS — mainnet + testnet address URL paths PASS (covers item 2 for those networks). 2 local-build tests fail due to test fragility (stubs `VITE_NETWORK=local` but does not override `VITE_TERRA_LCD_URL`, so it picks up the QA `.env` value `127.0.0.1:1317` vs hardcoded `localhost:1317`). production behavior is correct. e2e + visual browser walk: queued for next pass with full stack up. Simulated Wallet fixture (e2e/fixtures/dev-wallet.ts) expects `terra1*20k38v` address but did not produce it on `REQUIRE_LOCALTERRA=0` run — separate fixture-env concern. @PlasticDigits — `terraExplorer.test.ts` local-build fragility worth a small followup (stub both VITE_NETWORK and VITE_TERRA_LCD_URL together, or pin the local-build fallback independent of env). does not block #188 from code-correctness — primitive layer is verified.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-05-25 04:05:25 +00:00
PlasticDigits commented 2026-08-17 03:45:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #541

mentioned in issue #541
PlasticDigits commented 2026-08-17 03:45:37 +00:00 (Migrated from gitlab.com)

marked as related to #541

marked as related to #541
PlasticDigits commented 2026-08-17 04:19:20 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1070

mentioned in merge request !1070
PlasticDigits commented 2026-08-26 03:07:39 +00:00 (Migrated from gitlab.com)

mentioned in issue #656

mentioned in issue #656
PlasticDigits commented 2026-08-26 04:15:27 +00:00 (Migrated from gitlab.com)

mentioned in issue #664

mentioned in issue #664
PlasticDigits commented 2026-08-26 04:16:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #665

mentioned in issue #665
PlasticDigits commented 2026-08-26 04:16:14 +00:00 (Migrated from gitlab.com)

marked as related to #665

marked as related to #665
PlasticDigits commented 2026-08-26 04:22:42 +00:00 (Migrated from gitlab.com)

mentioned in issue #671

mentioned in issue #671
PlasticDigits commented 2026-08-26 04:22:44 +00:00 (Migrated from gitlab.com)

marked as related to #671

marked as related to #671
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#188
No description provided.