bcgov/parks-reso-public

[M] DUP: Passes are bookable prior to 7:00am without a refresh

Closed this issue · 22 comments

Describe the bug
Currently, DUP are bookable if a user is on the site at 6:59 and when it rolls over to 7:00am the greyed out box becomes clickable. To prevent any possibility of skipping the line, and improve user experience, we need to force users to refresh if they are on the site before 7:00am, or bookable only after arriving after 7:00am.

To Reproduce
Steps to reproduce the behavior:

  1. Anytime before 7:00am, go to https://reserve.bcparks.ca/dayuse/registration
  2. When it rolls over to 7:00am, proceed with booking a pass, without needing a refresh

Expected behavior
Users should be required to refresh prior to booking passes at 7am.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

  • Developer approach could be to pull system time from the /api/config endpoint, and use that as the current tme instead of new Date() in the front-end in order to show/hide certain options in the UI. Calculating calculating based on the user's tz or currently set time(and sometimes incorrect) puts the browser into modes that are not reflective of actual server-based timings.
  • Prior to the user hitting next after selecting facility/date/type and immediately going to the turnstile, we may want an additional check on whether that is an allowable action before the front-end goes through the turnstile challenge.

Separate - public heads-up of future ideas to make it more fair

@marklise to add in a bit more dev checklist-y things

@MarshallHenson

I had a quick call with @pavelcreates today and he gave me a great starting point for a design when a user is trying to book a pass outside the allowed window.

Image

Pavel had also suggested using the yellow warning box instead of the red in the image, but just so you have an idea of the path forward I figured I would share. Let me know if you would like any immediate changes or I can give you a demo once we have first pass implemented.

This is great. Agree w/ yellow. Demo would be appreciated. Reminder to prompt people to refresh!

@MarshallHenson

Here is a quick iteration which lead to some more conversations with @pavelcreates .

Image

As we were discussing this version. I brought up the potential problem of a user opening this page prior to 7am, but not selecting a booking date or facility until after 7am. The user would not receive the warning telling them to refresh until after the selection is made. Pavel has suggested removing the date select functionality when loading outside the allowed booking window. Leaving just the back button and the warning. I am going to switch things around to match that work flow but figured I give you an idea of the wording and color that I currently have.

Here is what the page will load as if it is outside the booking now. Marshall I will try to schedule a call tomorrow to do a quick demo and see if we can come up with any other issues a user could come across with this process.

Image

Thanks for the screenshots @Christopher-walsh22. The most recent screenshot does not show their date or facility selection - I think we want those to remain.

@MarshallHenson I have changed it back to the previous version where you can see the booking window, and facility selection. Let me know if you want a demo from my local machine.

Tested on TEST: Failed

  • When a park is set to Booking Days Ahead: 3 days and Booking Opening Time: 5PM, I cannot book a pass for the current date or the next 2 days. The logic should only apply for passes beyond the booking days ahead number. Refer to Garibaldi, Cheakamus facility on TEST environment. Please let me know if I have misunderstood the logic.

FYI @Christopher-walsh22

@manuji I believe your right. I just got off a call talking through this with @cameronpettit and he was able to break down the reasoning/logic clearer for me. I went the wrong way implementing this. Ill switch back over to it and post a comment when a new iteration is in DEV.

@MarshallHenson @manuji @pavelcreates

I just had another call figuring out what needs to be done for this ticket. As it is written, I had implemented a feature to make no passes available prior to 7am. What is actually required is that passes are not able to be booked more than 48hrs prior to the pass's facility opening hour. You will need to refresh you page if it was opened more than 48hrs in advance. AM/PM/ALL-DAY pass will effect this. Passes for the current day and next day will still be available for booking at this time. This ticket will only effect the handling of passes at the furthest out booking day when the date is available but the current time is not past the facility is not opening hour (AM/PM).

If I am missing any parts of this please let me know and we can arrange a call.

@Manufacturing @pavelcreates

After doing a demo for @MarshallHenson on Thursday October 17th it was decided the best implementation was to not use warning alert and instead add the information regarding the required refresh to the "Important Booking Information" section. I will move this ticket to blocked until the approved wording is available for that. Once that we have that I will be able to update this tickets acceptance criteria.

It was also determined all passes would become available at 7am so the differentiating between AM and PM to apply the warning would not be required in the facility selection process. The system time supplied from API will still be used on page load to determine if the booking window is open or closed.

Hi @Christopher-walsh22 where can I find the copy that was approved to be added to the "Important Booking Information" ?

Tested on TEST: Pending

  • When booking a pass for a facility which has the booking window is only on the same day, if the user tries to book before the booking window is open, it shows the error given below; which doesn't explain the actual situation.
    Image
  • Verified for the other booking window options, the date is disabled until the booking window is open.

@Christopher-walsh22, I also would like to know where to find the approved copy updates.

@manuji

Sorry I never posted the screen shot from my conversation with @MarshallHenson

This was the wording from our last conversation:

Image

@LindsayMacfarlane & @Dianadec what do you think about the issue I have reported in my previous comment?

@Christopher-walsh22 do you know if this message can be customized depending on the error? or is it only one error message? cc @cameronpettit

Image

@Dianadec This can be changed, I can jump onto finding a fix for it this afternoon.

Ill dig into finding the exact error and make a toast message for it if someone can lock down the wording the wording we want to use.

@MarshallHenson if we want to customize this toast message error, would the wording be similar to:
"It is not currently within the booking window." ? cc @LindsayMacfarlane

Setting the passes to be booked on the same is contradictory to the Booking information copy. Just for your information;
Image

Just realized after re-reading the copy.

Tested on TEST: Passed

  • Verified that when the Booking ahead days set to 2 days and Booking opening time set to 7 am, the date picker won't enable the date until after 7 am. Changing computer time does not allow users to take any advantage.
  • Passing this ticket to PO review.

Observations:

  • If Booking opening time is set to a time in the PM, then booking AM passes create issues reported here -> #471
  • For a specific park, all the facilities should be set up in the same settings (booking ahead days and Booking opening time) to avoid errors.
  • Booking ahead days set to same day shows incorrect error messages reported here -> #476
  • If the booking ahead days set to 2 days or 3 days in advance, then on the Public site the calendar enables the date after the Booking opening time.
  • Verified that adjusting the local time does not allow the user to booking prior to the booking opening time.