Skip to content

Event form improvements - #80

Merged
ccruzkauppila merged 6 commits into
ilmo-hackathon-consolidationfrom
admin-panel-improvement
Nov 20, 2026
Merged

ccruzkauppila merged 6 commits into
ilmo-hackathon-consolidationfrom
admin-panel-improvement

Conversation

@ainokotiranta

Copy link
Copy Markdown

What's changed

Improvements to the event create/edit form in the admin panel.

Save bar

  • The "Save as draft" switch and the Create/Update button now sit in a bar fixed to the bottom of the window on the General, Quotas and Questions tabs, with arrow buttons for moving between tabs.
  • Create/Update stays disabled until the form is valid. Hovering the hint lists what's still missing, across all tabs.
  • Save errors are shown in the bar instead of at the bottom of the General tab.

Fixes

  • Event and registration times can be typed into hour/minute/second boxes instead of scrolled.
  • Unsaved edits are kept when switching the site language, and the Quotas and Questions tabs now update to the new language.
  • Question options stay with their question when questions are reordered or removed.
  • The description editor resets properly when switching description language.
  • The form now requires at least one quota row, matching the database rule. Before, an event with only an open quota failed with a server error on save.
  • Switching the open quota off resets its size.
  • Admin and settings pages fill the window height, so a light-blue strip no longer shows at the bottom of short pages.

Production behaviour

  • The Email preview tab in the event form is hidden in production (still visible in development). The Emails page in the side menu is unchanged.

Testing

Tested manually in local dev. The Cypress specs create_event, update_event and update_event_picker may need updating, because saving is now disabled until the form is valid and the time picker changed.

ainokotiranta and others added 6 commits October 17, 2026 11:50
…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>
@github-actions

Copy link
Copy Markdown

📦 Next.js Bundle Analysis for @app/client

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 265.97 KB (🟢 -43 B)
Details

The 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 <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Twenty-four Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (450 KB)
/ 344.34 KB 610.31 KB 135.62% (🟡 +0.02%)
/404 221.69 KB 487.65 KB 108.37% (+/- <0.01%)
/_error 226.61 KB 492.58 KB 109.46% (+/- <0.01%)
/admin/emails 250.91 KB 516.87 KB 114.86% (🟡 +0.05%)
/admin/event-category/create 282.67 KB 548.64 KB 121.92% (+/- <0.01%)
/admin/event-category/list 334.3 KB 600.27 KB 133.39% (+/- <0.01%)
/admin/event-category/update/[id] 282.85 KB 548.82 KB 121.96% (+/- <0.01%)
/admin/event/create 521.21 KB 787.18 KB 174.93% (+/- <0.01%)
/admin/event/update/[id] 521.67 KB 787.64 KB 175.03% (🟡 +0.01%)
/admin/organization/[slug] 310.82 KB 576.79 KB 128.18% (🟡 +0.02%)
/admin/organization/create 259.54 KB 525.51 KB 116.78% (+/- <0.01%)
/admin/users/list 334.59 KB 600.56 KB 133.46% (+/- <0.01%)
/event/[slug] 367.08 KB 633.05 KB 140.68% (🟡 +0.02%)
/event/[slug]/register/[quotaId] 287.41 KB 553.38 KB 122.97% (+/- <0.01%)
/forgot 239.46 KB 505.42 KB 112.32% (+/- <0.01%)
/invitations/accept 223.25 KB 489.22 KB 108.72% (+/- <0.01%)
/reset 245.61 KB 511.58 KB 113.68% (🟡 +0.01%)
/settings/accounts 308.85 KB 574.82 KB 127.74% (🟡 +0.02%)
/settings/delete 243.21 KB 509.18 KB 113.15% (+/- <0.01%)
/settings/emails 286.83 KB 552.8 KB 122.84% (+/- <0.01%)
/settings/profile 248.75 KB 514.72 KB 114.38% (+/- <0.01%)
/settings/security 255.5 KB 521.47 KB 115.88% (+/- <0.01%)
/update-registration/[updateToken] 248.58 KB 514.55 KB 114.34% (+/- <0.01%)
/verify 222.18 KB 488.15 KB 108.48% (+/- <0.01%)
Details

Only 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 next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

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.

@ccruzkauppila
ccruzkauppila changed the base branch from main to ilmo-hackathon-consolidation November 20, 2026 14:48
@ccruzkauppila
ccruzkauppila merged commit 88c043a into ilmo-hackathon-consolidation Nov 20, 2026
14 checks passed
ccruzkauppila added a commit that referenced this pull request Nov 20, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants