Skip to content

perf(a11y): bound uploads, tune query caching, accessible Modal and profile tabs - #1025

Merged
ayshadogo merged 2 commits into
Dfunder:mainfrom
khalyaro:feature/854-857-upload-modal-tabs-cache
Oct 18, 2026
Merged

ayshadogo merged 2 commits into
Dfunder:mainfrom
khalyaro:feature/854-857-upload-modal-tabs-cache

Conversation

@khalyaro

Copy link
Copy Markdown
Contributor

Summary

Four front-end issues around upload throughput, query caching, and two shared a11y primitives.

#854 — Bound upload concurrency, throttle progress (DeliverableUpload)

  • New runWithConcurrency(items, limit, task) helper (unit-tested) drives uploads through a pool of 3 in-flight requests, so selecting 20 files no longer opens 20 presign/PUT/confirm chains at once.
  • Each file records its own uploadStatus/progress/error; a failed file no longer cancels its siblings, and there is no longer a single isPending/error that only reflects the last call.
  • XHR progress events are buffered in a useRef and flushed on a 250 ms timer (~4 Hz) instead of mapping the whole array per event.
  • The unstable useCallback deps are gone (the whole mutation object and the unused listingId are no longer dependencies).

#855 — Tune query caching

  • Global staleTime raised from 30 s to 5 minutes.
  • select projections added to the purchases, transactions and listings list queries so only rendered columns flow through (new response fields no longer churn row identity).
  • Removed the manual window focus listener in WalletBalanceDisplay that duplicated its refetchOnWindowFocus: true.
  • Test asserts the new defaults (5 * 60_000, refetchOnWindowFocus: false).

#856 — Focus management + labelling for Modal

  • Focus moves into the dialog on open, Tab/Shift+Tab cycle within it, and focus returns to the trigger on close/unmount.
  • The backdrop is now a real <button> instead of an interactive div.
  • The dialog keeps its accessible name from the visible title (already aria-labelledby); new optional headingLevel prop (default h2) lets callers fit the page outline.
  • Escape and body-scroll locking keep working. Tests added for focus-in, focus-restore, tab trapping and the button backdrop.

#857 — ARIA tabs on the artist profile

  • The strip is a role="tablist"; each control is a role="tab" with aria-selected, aria-controls, id and roving tabIndex.
  • Arrow Left/Right, Home and End move selection and focus.
  • The panel is role="tabpanel", aria-labelledby the active tab and focusable.
  • The injected <meta name="description"> is restored/removed on unmount, so navigating artist → artist no longer leaks the previous bio. Trustline keyboard-nav test added.

Notes

  • Per the repo instructions I did not run install/CI/tests locally.
  • eslint-plugin-jsx-a11y is unrelated to this branch.

Closes #854
Closes #855
Closes #856
Closes #857

…rofile tabs

- Dfunder#854 DeliverableUpload now uploads through a bounded pool (3 concurrent) with
  one status/error per file and progress buffered to ~4 Hz, so a 20-file drop
  no longer opens 20 XHRs or re-renders on every progress tick.
- Dfunder#855 raise the global staleTime to 5 minutes, add select projections to the
  purchases, transactions and listings list queries, and drop the manual focus
  listener that duplicated refetchOnWindowFocus in WalletBalanceDisplay.
- Dfunder#856 Modal moves focus in on open, traps Tab/Shift+Tab, restores focus on
  close, uses a real button for the backdrop and a configurable heading level.
- Dfunder#857 artist profile tab strip implements the ARIA tabs pattern (roving
  tabindex, Arrow/Home/End) and the injected meta description is cleaned up.

Closes Dfunder#854
Closes Dfunder#855
Closes Dfunder#856
Closes Dfunder#857
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@khalyaro 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

@ayshadogo ayshadogo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

GBEW

@ayshadogo
ayshadogo merged commit 411eb90 into Dfunder:main Oct 18, 2026
0 of 3 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

2 participants