add an ajax based 'refresh current bid' toggle

Created on 2 November 2023, 8 months ago
Updated 3 January 2024, 6 months ago

reported:
"no idea another person had increased the 'current bid', had to reload page several times"

Story:
a user loads an auction page, sits for a moment, then hits the 'place your bid" submit. meanwhile: someone else has already submitted. true auction value is now higher. this first/current user get Bid error..
- update & new current (unless focused*, submitting)
- update Current Offer (formatter value) value
- balance 'you hold hightest bid' messaging.

a11y forward toggle to below BID number for user to opt into ajax refresh.
-> inspiration: https://kittygiraudel.com/2021/04/05/an-accessible-toggle/

dev notes:
  • route based access.
    • perm 'Access Bidding Form'
    • auction_item entity route upcast from new refresh controller
    • dev: db logger with mircrotime, ip, uid
        Keeping Watchdog log of Refresh Controller
      • \Drupal::state()->set('auctions.bid_refresh_log',true);
      • \Drupal::state()->delete('auctions.bid_refresh_log');
  • admin options for 'default on',
  • admin option time to refresh
  • [right side 'refresh' icon]
    • (opactiy .1) if input focus (pause refresh of input)
    • *back/forth when refresh promise is triggered — no amount update happening.
    • *(scale/pulse up, back to normal) — when refresh promise had NEW BID .
    • *(scale-in-2-zero back to normal) INHERIT refresh — if user has focus on Amount Input (user maybe adding their own value)
  • when refresh is active/enabled and user has focus. amount will not update if user has focus (is changing amount). *testing/ux needs verifications
  • 'user hits submit' refresh automatically pauses while html submit is happening..
  1. Admin Settings:
  2. (nov24/23) Active work now on dev 2.0.x BRANCH. UX testing in progress.
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada SKAUGHT

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024