diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a90a08..c5577b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,11 +14,14 @@ each change under the current top section as you work. ## [1.4.1] ### Added -- **Group classes now appear in "Your upcoming lessons".** A class is stored as a term rather than as bookable slots, so nothing that listed lessons could ever show one — a student whose whole term was a group class saw an empty schedule, and an instructor teaching one saw nothing on their My Lessons page. Each remaining session of a class you are enrolled in now sorts in among your lessons by date, labelled **group class**; instructors see every session of the classes they teach, one row per session however many students are in it. A session has no Cancel button, because there is no such thing as cancelling one date of a term — withdrawing from the class is still done from the class page. A class whose date, time or length has not been filled in yields no sessions and is left out rather than shown at a time nobody chose. +- **Group classes now appear in "Your upcoming lessons".** A class is stored as a term rather than as bookable slots, so nothing that listed lessons could ever show one — a student whose whole term was a group class saw an empty schedule, and an instructor teaching one saw nothing on their My Lessons page. Each remaining session of a class you are enrolled in now sorts in among your lessons by date, labelled **group class**; instructors see every session of the classes they teach, one row per session however many students are in it. A session has no Cancel button, because there is no such thing as cancelling one date of a term — withdrawing from the class is still done from the class page. +- A class you are enrolled in shows up **whether or not its schedule is pinned to a clock**. Class time and duration are both optional on the offering form, and the schedule note is there so a studio can simply write "Tuesdays 4:00pm" — so a class with a time but no duration lists its dates and says when each session starts rather than guessing when it ends, and a class with no time at all gets a single row carrying its schedule note (or its term dates) where the time would go. Only a class whose last day has passed drops off the list. - The same group-class sessions now appear in **Upcoming lessons** on a student's admin detail page, so one table answers "what are they booked into next week?". Only upcoming ones — the **Group-class enrolments** table below already holds the history. - **A policy can be renamed.** The title was fixed at creation, so a typo or a change of wording meant creating a second policy and re-collecting everyone's acceptance. Renaming changes only what students read above the policy text: the slug stays put, so every version already accepted stays attached. ### Fixed +- **Deleting a parent now removes the students they booked for.** A managed student account has no login of its own and exists only so its parent has somebody to book for — with the parent gone nobody can reach it, book for it, or be billed for it, so it was left stranded on the roster still holding lesson times. Deleting a parent now releases each of their students' upcoming lessons and enrolments on the same terms as their own, and deletes the accounts. Removing a student from the family screen is unchanged and still refuses one with lessons on record. +- **The upcoming-lessons panel no longer collapses onto itself in some themes.** Rows could render on top of one another and the status badge's colour could stop short of the text inside it. Both came from the same thing: the panel never stated its own line spacing, so a theme setting a line height of zero anywhere above it — a common icon-font reset — was inherited straight through, leaving each line of text taller than the space allotted to it. The panel now sets its own. - **Deleting a student now gives back what they had booked.** WordPress deletes a user without knowing anything about lessons, so their bookings were left behind: the times stayed marked as booked and nobody else could take them, the lessons stayed on the instructor's schedule under a name that no longer resolved, and a group class kept a seat filled by nobody. Deleting an account now cancels each of its upcoming lessons, frees the time for rebooking, cancels its active class enrolments, and voids any payment still pending on them. Past lessons are left exactly as they are — they happened, and the payment report has to keep adding up. A paid lesson is not credited back: a credit could only be spent on the account being deleted, so a refund owed to someone who has left stays the studio's decision to make. - **A weak password is now caught before the form is submitted, not after.** The strength meter scores the password as you type, but zxcvbn's dictionary arrives a moment after the page loads — so a password typed straight away was never scored at all, and the first you heard of it was the server rejecting the whole form. The password is now re-scored on submit, so the verdict is always the one your password actually earns. diff --git a/assets/css/frontend.css b/assets/css/frontend.css index 6f10988..73da434 100644 --- a/assets/css/frontend.css +++ b/assets/css/frontend.css @@ -104,18 +104,41 @@ * explicit flex rules above, but the text itself still sits in inline elements * a theme is free to take out of normal flow — an absolutely positioned, * floated or negatively offset span drops the date/time on top of the title and - * the status pill on top of the Cancel button. Pinning the three properties - * that would have to change keeps the leaves in flow, at the same id-level + * the status pill on top of the Cancel button. Pinning the properties that + * would have to change keeps the leaves in flow, at the same id-level * specificity the rules above rely on. + * + * `line-height` is pinned for the same reason and is the subtler one, because a + * theme does not have to target this panel to break it — it is inherited, so a + * `line-height: 0` anywhere above (the usual icon-font or sprite reset) reaches + * these elements untouched. Below 1 it produces both halves of the same bug: a + * line box shorter than its glyphs, so stacked lines in the details column + * overlap, and an inline-block pill whose background is shorter than the text + * sitting in it. Nothing here should ever inherit a line-height, so the panel + * states its own. */ +#us-booking-app .us-my-lesson, +#us-booking-app .us-my-lesson-info, +#us-booking-app .us-my-lesson-actions, #us-booking-app .us-my-lesson-title, #us-booking-app .us-my-lesson-when, #us-booking-app .us-my-lesson-duration, #us-booking-app .us-my-lesson-who, +#us-booking-app .us-my-lesson-kind, +#us-booking-app .us-lesson-status { + line-height: 1.45; +} + +#us-booking-app .us-my-lesson-title, +#us-booking-app .us-my-lesson-when, +#us-booking-app .us-my-lesson-duration, +#us-booking-app .us-my-lesson-who, +#us-booking-app .us-my-lesson-kind, #us-booking-app .us-lesson-status { position: static; float: none; margin: 0; + vertical-align: middle; } /* diff --git a/assets/js/booking.js b/assets/js/booking.js index 299fa45..6c704b5 100644 --- a/assets/js/booking.js +++ b/assets/js/booking.js @@ -613,6 +613,21 @@ return l.kind === 'group_class'; } + // When a row meets. A class with no class time set has no clock to put it on, + // so it carries `schedule` — the studio's own wording, or its term dates — and + // that is shown verbatim in place of a date and time. A dated row with no + // duration knows when it starts but not when it ends, and says only that + // rather than inventing a finish. + function lessonWhenHtml(l) { + if (l.schedule) { + return escHtml(String(l.schedule)); + } + + const when = `${escHtml(dayLabel(dayKey(l.start_dt)))} · ${escHtml(timeOf(l.start_dt))}`; + + return l.end_dt ? `${when}–${escHtml(timeOf(l.end_dt))}` : when; + } + function lessonRowHtml(l) { const group = isGroupSession(l); const title = l.offering_title ? escHtml(String(l.offering_title)) : (group ? 'Group class' : 'Lesson'); @@ -626,7 +641,7 @@