forked from Qortal/q-shop
5.7 KiB
5.7 KiB
Q‑Shop v1.1.0 — Road to Release
Goal: Ship new coin support and UI fixes with a clean build and verified UX.
Scope
- Stabilize Edit Store modal interactions and advanced actions.
- Unify coin iconography across dropdowns and cards using PNG assets.
- Clean up and enhance sidebar filtering UX (Prices In, Exchange Rate, Date sort).
Tasks
- EditStoreModal: Cancel button closes modal
- Wire Cancel to dispatch
toggleEditStoreModal(false)via GlobalWrapper pattern. - Maintain existing optional
closeEditStoreModalprop flow for back‑compat.
- EditStoreModal: Coin dropdown icons use PNGs
- Replace QORT/ARRR SVG usage with PNGs via
coinPng(). - Ensure all supported coins (QORT, ARRR, BTC, LTC, DOGE, DGB, RVN) have PNGs imported in
src/constants/coin-icons.ts.
- EditStoreModal: Restore Advanced Settings + Recreate Shop Data
- Add an “Advanced Settings” checkbox next to action buttons.
- When checked, show a red “Recreate Shop Data” button.
- Handler publishes an empty Data Container document to QDN using:
- identifier:
${storeIdentifier}-${DATA_CONTAINER_BASE} - structure:
{ storeId, shortStoreId, owner, products: {} }
- identifier:
- Show progress/errors via global loader + notifications. Confirm outcome.
- Sidebar: Fix Prices In duplicate header
- In
src/pages/Store/Store/Store.tsx, remove the extra Typography header under the FiltersTitle.
- Sidebar: Exchange rate card behavior
- Hide the exchange rate card when
coinToUse === 'QORT'. - Use
coinPng('QORT')for the left icon andcoinPng(coinToUse)for the right icon. - Keep title “1 QORT = {rate} {COIN}” and error fallback notifications as‑is.
- Sidebar: Restore Date Product Added sort checkboxes
- Add a new “Date Product Added” group with:
- “Most Recent” → sets
filterDate = DateFilter.newestand resets price filter - “Oldest” → sets
filterDate = DateFilter.oldestand resets price filter
- “Most Recent” → sets
- Leverage existing
filterDatelogic already present in the selector.
File Targets
src/components/modals/EditStoreModal.tsx- Cancel wiring to close
- PNG icons in coin dropdown
- Advanced Settings checkbox + Recreate Shop Data button and handler
src/pages/Store/Store/Store.tsx- Remove duplicate Prices In header
- Conditional exchange rate card with dynamic right icon
- Add “Date Product Added” group and two checkboxes
src/constants/coin-icons.ts- Verify PNG imports for BTC/LTC/DOGE/DGB/RVN exist and are referenced by
coinPng()
- Verify PNG imports for BTC/LTC/DOGE/DGB/RVN exist and are referenced by
src/assets/img/*- Ensure PNG assets for all supported coins are present; add missing ones if needed.
Validation
- Typecheck + build:
npm run buildon Node LTS. - Manual checks:
- Edit Store modal: Cancel closes; Advanced → Recreate button visible and functional.
- Coin dropdown in Edit/Store pages shows PNG icons for all coins.
- Prices In has a single header; exchange card hidden for QORT and dynamic for others.
- Exchange card shows both directions:
1 QORT = X COINand1 COIN = Y QORT. - Date sort toggles between Most Recent / Oldest and matches product ordering.
Release Prep
- Smoke test store creation/edit flows and product list in a test profile.
- Verify new coin prices and iconography across product cards and details.
- Update changelog/README for new coins and UI fixes.
- Bump
package.jsonto 1.1.0. - Add
docs/RELEASE_NOTES_v1.1.0.mdanddocs/USER_ANNOUNCEMENT_v1.1.0.md. - Add
.gitea/workflows/release.ymlto build on tag and zipdist/as artifact. - Create tag
v1.1.0and push to trigger workflow. - Draft Gitea release and attach
dist.zip(then publish to Qortal).
v1.1.1 Patch Plan
- Show price inputs for all supported coins in ProductForm.
- Unify product card pricing with PNG icons + QORT equivalency (2‑decimals).
- Simplify Exchange Rate card visuals and format values compactly.
- Bump to 1.1.1, add release/announcement docs, tag and release.
v1.1.1 Progress
- Implemented ProductForm price fields for all supported coins.
- Updated product cards and Exchange Rate card per spec.
- Added docs/RELEASE_NOTES_v1.1.1.md and docs/USER_ANNOUNCEMENT_v1.1.1.md.
Open Questions
- Recreate Shop Data: ok to publish immediately from Edit modal, or should we gate behind an extra confirmation modal?
- Should
onPublishParamEditincludestoreIdentifierfor edits, or remain excluded as now?
Progress Log
- Implemented EditStoreModal fixes:
- Cancel now dispatches
toggleEditStoreModal(false)and supports legacy close flag. - Restored Advanced Settings with “Recreate Shop Data” flow and confirmation modal; publishes empty data container and resets product cache.
- Switched Supported Coins dropdown icons to PNG via
coinPng()for all coins.
- Cancel now dispatches
- Sidebar Store page updates:
- Removed duplicate “Prices In” header.
- Exchange rate card now hidden for QORT and shows dynamic coin icon for the selected coin.
- Restored “Date Product Added” section with Most Recent/Oldest.
- Verified a clean production build with Vite.
- Added reverse rate display to exchange card.
- Bumped version to 1.1.0 in
package.json. - Added release notes and user announcement under
docs/. - Added Gitea workflow to build and archive
dist.zipon tag. - Product pricing form now shows price fields for all supported coins in the shop (hides non‑supported coins) and pre-fills values when editing.
- Product card pricing now uses PNG icons for all coins; for non‑QORT selections the card shows both the selected coin amount and the QORT equivalent (QORT rounded to 2 decimals) using icons only.
- Exchange rate card updated: removed background, switched to icons, shows both directions with compact formatting (>=1 → 4 decimals; <1 → 4 significant digits), and removed the arrows row.