Repository navigation
Replies: 2 comments
|
Good proposal, and yes please, I would take this. You have also read the code correctly, which is the part that usually makes these go badly. Accepting it as you describe: a per-event-type setting, default off, showing the next available slot above the calendar and jumping to that day when clicked. No behaviour change for anyone who leaves it off, same as Where the setting goes. Follow migration Six things that will save you a round of review.
i18n. The key goes in Create both templates in step. One process note. First-time contributors sign the CLA, and the bot comments on the PR with a one-line phrase to post. One time only, you keep the copyright. If you want to sanity-check the setting name before writing it, reply here and I will confirm, but do not wait on me otherwise. Looking forward to the PR. |
|
Correction to my earlier reply, before you start writing: I said two templates. There are three surfaces, and the third one changes the work. The booking calendar is implemented separately in Two consequences for this feature. First, Second, decide per surface whether the line belongs there. On the booking page it clearly does. On the manage page the context is rescheduling, so "next available" means the next slot the booking could move to, which is a slightly different question. In the widget it should follow the same rule as the page, but it is inside someone else's layout, so keep it to one line and do not add a control that competes with the host site. If that makes the widget too much for a first PR, do the two pages and open the widget as a follow-up rather than shipping a half-mirrored version. Also verify desktop and mobile on each surface you touch, since the step flow differs between them. |
Uh oh!
There was an error while loading. Please reload this page.
Days with no slots are greyed out and the hint says to select a day. Nothing tells a visitor when the next free slot or three are. When the host is busy for the coming week or two, a visitor lands on a grid of greyed days and has to click through them or change month to find out whether anything is bookable.
Proposal: a per-event-type setting, default off like the greyed-out booked times in #19, that shows a line above the calendar such as "Next available: Wed 18 Nov, 10:00" in the visitor's selected time zone. Clicking it selects that day and lists its slots. Could also add "Next available next week: DD MMM, HH:hh".
loadMonthAvailability() in internal/handler/templates/book.html already fetches /v1/event-types//slots for the displayed month, so the earliest entry is the easy answer. If the displayed month is empty it would fetch the next month, up to the event type's max-future-days.
Same disclosure point as #19: the slots endpoint is already public, so the opt-in setting only changes what the page shows, not what a visitor can find out.
Happy to try a PR if you would take one and tell me which settings and i18n conventions to follow.
All reactions