Repository navigation
Event form improvements - #80
Conversation
…oving The questions tab renders each row's type and options from a snapshot of the form values taken when the tab renders. Form.List's move and remove only re-render the list, so rows kept the type and options of the question previously at that index. Force a re-render after both, as the other structural edits in the tab already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The description editor reuses one Slate editor for every language and only swaps editor.children on switch. The cursor, pending marks and undo history still pointed into the previous language's document, so a cursor past the end of the new document crashed the editor and lost the text, and undo replayed the other language's edits. Clear them on switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent swaps The update event page built initialValues as a new object on every render, and EventForm resets its fields whenever initialValues changes. Any re-render, such as switching the site locale, discarded unsaved edits and replaced the description while the editor's cursor still pointed into the old document, crashing Slate. Memoize initialValues on the event. Move the editor's cursor, marks and history reset from the language menu to wherever the document is swapped, so any outside replacement is safe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the time scroll columns in the event time and registration period pickers with HH : mm : ss boxes next to the OK button. Picking a date selects the hours box, two digits advance to the next box and the arrow keys move between boxes. The registration period defaults to 12:00:00 - 23:59:59, and moving a start past its end clears the end instead of swapping them. Both ends are required, since typing a time can store a half-filled range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the save as draft switch and the create/update button into a bar fixed to the bottom of the window on the general, quotas and questions tabs, with arrows for moving between the tabs. Saving stays disabled until the form is valid; hovering the hint lists what is missing. - Require at least one quota row; an open quota alone is not enough - Reset the open quota size when it is switched off - Re-render the quotas and questions tabs on a language switch so their texts and validation messages follow it - Fill the window below the header on pages without the site footer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
📦 Next.js Bundle Analysis for @app/clientThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Twenty-four Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
Brings in #80 (event form fixes, typed time picker, sticky footer), the EventForm/values.ts extraction and the event templates branch with its templates, form preview and confetti switches. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
What's changed
Improvements to the event create/edit form in the admin panel.
Save bar
Fixes
Production behaviour
Testing
Tested manually in local dev. The Cypress specs
create_event,update_eventandupdate_event_pickermay need updating, because saving is now disabled until the form is valid and the time picker changed.