Skip to content

Mobile sticky CTA, toast viewport, view import, and saved-view timestamps - #748

Open
jhayniffy wants to merge 4 commits into
stellar-vortex-protocol:mainfrom
jhayniffy:drips/621-622-623-624
Open

jhayniffy wants to merge 4 commits into
stellar-vortex-protocol:mainfrom
jhayniffy:drips/621-622-623-624

Conversation

@jhayniffy

Copy link
Copy Markdown

Summary

Mobile sticky CTA, toast viewport, view import, and saved-view timestamps

What was solved

#621 — [Trivial] Add a sticky action bar for primary CTAs on mobile viewports

Add a reusable StickyActionBar component that pins a single primary CTA to the bottom of the viewport on mobile widths (using the existing max-sm:/sm: breakpoint convention), respects iOS safe-area insets via env(safe-area-inset-bottom), and wire it into VotePanel's "Submit Vote" action as the first real consumer. Keep the action reachable by the same selector/label so existing tests pass.

Addressed:

  • Changed: src/components/StickyActionBar.tsx, src/components/StickyActionBar.tsx, src/components/VotePanel.tsx, src/components/StickyActionBar.tsx
  • Create new src/components/StickyActionBar.tsx as a small wrapper component for a single primary CTA
  • Use the existing max-sm:/sm: breakpoint convention so the bar is sticky only on mobile widths
  • Respect iOS safe-area insets using env(safe-area-inset-bottom)

#622 — [Medium] Add swipe-to-dismiss gesture support for toast notifications on touch devices

Implement the currently empty src/components/ToastViewport.tsx as the toast queue integration point, rendering toasts from useToastStore with pointer/touch swipe-to-dismiss (respecting prefers-reduced-motion/data-motion="reduce") plus a visible, keyboard-operable close button fallback. Satisfy the existing ToastViewport.test.tsx expectations and add pointer-event and keyboard-dismiss tests. Keep useToastStore queue/dedup semantics untouched.

Addressed:

  • Changed: src/components/ToastViewport.tsx, src/components/ToastViewport.tsx
  • Implement ToastViewport in src/components/ToastViewport.tsx consuming useToastStore, matching the shape expected by the existing ToastViewport.test.tsx
  • Add pointer/touch-based swipe-to-dismiss for toasts on touch devices
  • Provide a visible close button fallback for non-touch and keyboard users, keyboard-operable with visible focus and correct ARIA semantics

#623 — [Medium] Add an "import view from URL" action to SavedViews

Add an "Import view" action to SavedViews that accepts a pasted URL or query string, validates it through the existing sanitizeViewParams/viewParamsToSearch path (with degraded notice on partial sanitization), and saves it via saveView, respecting MAX_VIEWS. New user-facing strings go through the i18n catalog (en.ts and es.ts).

Addressed:

  • Changed: src/components/SavedViews.tsx, src/store/views.ts
  • Add an "Import view" action in src/components/SavedViews.tsx accepting a pasted URL or just its query string
  • Parse the pasted input to extract query params, then run through existing sanitizeViewParams and viewParamsToSearch validation before calling saveView
  • Reject/sanitize exactly as the existing apply-a-view path does, including the degraded notice on partial sanitization, since input is untrusted

#624 — [Trivial] Add a last-used indicator to SavedViews entries

Add optional createdAt/lastUsedAt timestamps to SavedView, migrate persisted views safely via sanitizeViews, update lastUsedAt when a view is applied in SavedViews.tsx, and render a small relative-time label per entry using i18n strings.

Addressed:

  • Changed: src/store/views.ts, src/components/SavedViews.tsx
  • Add optional lastUsedAt and createdAt fields to the SavedView type in src/store/views.ts
  • Ensure sanitizeViews migration safely defaults missing timestamps (undefined / 'never' display) for existing persisted views
  • Update lastUsedAt whenever apply() is called in src/components/SavedViews.tsx

Changes

  • src/components/VotePanel.tsx (modify)
  • src/store/views.ts (modify)
  • src/components/ToastViewport.tsx (create)
  • src/components/StickyActionBar.tsx (create)
  • src/components/SavedViews.tsx (modify)

Approach

  1. [Trivial] Add a sticky action bar for primary CTAs on mobile viewports #621 — [Trivial] Add a sticky action bar for primary CTAs on mobile viewports (Changed: src/components/StickyActionBar.tsx, src/components/StickyActionBar.tsx, src/components/VotePanel.tsx, src/components/StickyActionBar.tsx)
  2. [Medium] Add swipe-to-dismiss gesture support for toast notifications on touch devices #622 — [Medium] Add swipe-to-dismiss gesture support for toast notifications on touch devices (Changed: src/components/ToastViewport.tsx, src/components/ToastViewport.tsx)
  3. [Medium] Add an "import view from URL" action to SavedViews #623 — [Medium] Add an "import view from URL" action to SavedViews (Changed: src/components/SavedViews.tsx, src/store/views.ts)
  4. [Trivial] Add a last-used indicator to SavedViews entries #624 — [Trivial] Add a last-used indicator to SavedViews entries (Changed: src/store/views.ts, src/components/SavedViews.tsx)

Issues

Closes #621
Closes #622
Closes #623
Closes #624

@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant