Skip to content

fix: wire Details card edit to event details modal (#1631)#2222

Open
aasimsyed wants to merge 17 commits into
activist-org:mainfrom
aasimsyed:fix/1631-event-details-edit-modal
Open

fix: wire Details card edit to event details modal (#1631)#2222
aasimsyed wants to merge 17 commits into
activist-org:mainfrom
aasimsyed:fix/1631-event-details-edit-modal

Conversation

@aasimsyed

Copy link
Copy Markdown
Member

Contributor checklist


Description

Fixes #1631 by wiring the Details card pencil on the event About page to a new ModalEventDetails instead of the text edit modal. The modal supports editing organizations, location type/link, and event schedule (all-day and timed).

Backend

  • Add EventPUTSerializer for partial updates to orgs, times, location type, online link, and physical location
  • Extract _prepare_event_times() shared by create and update flows
  • Route EventDetailAPIView PUT through the new serializer

Frontend

  • Add ModalEventDetails with form validation and useEventDetailMutations
  • Distinguish Details edit (edit-event-details) from About text edit (edit-event-texts)
  • Fix org pre-population in the combobox (ID-based selection)
  • Fix schedule hydration: single-day all-day no longer reopens as two days with all-day unchecked
  • Add shared date helpers for calendar range normalization and API payload mapping

Tests

  • Backend: test_event_update_details.py
  • Frontend unit: date helpers, updateEvent, mutations, CardDetails
  • E2E: event-about-details-content.spec.ts and event-about-details-permissions.spec.ts (permissions, orgs, schedule, online link)

Docker (dev convenience)

  • Add PREVIEW_CLEAN to force preview rebuilds
  • Reuse existing .output when unchanged
  • Switch frontend healthcheck from curl to wget

Testing performed

  • Backend event update tests (Docker)
  • Frontend unit tests: date, mutations, CardDetails, event service
  • E2E: 10/10 passing for event-about-details-*.spec.ts against local preview

Related issue

Extract shared time normalization for create and update, and route event
PUT through EventPUTSerializer so orgs, schedule, and location can be
updated without the read serializer.
Add date utilities to map API event times to form state, normalize
v-calendar ranges, and build PUT payloads for all-day and timed entries.
Wire the Details card pencil to ModalEventDetails for orgs, location,
and schedule edits, fixing org pre-population, all-day checkbox state,
and single-day calendar hydration on reopen.
Cover Details card edit wiring, detail mutations, updateEvent service
calls, and schedule mapping behavior.
Add PREVIEW_CLEAN to force fresh builds, reuse existing .output when
unchanged, and switch the frontend healthcheck to wget.
Add content and permissions specs for the Details card modal, covering
organizations, schedule, location saves, and member access rules.
@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for activist-org ready!

Name Link
🔨 Latest commit e68d0f2
🔍 Latest deploy log https://app.netlify.com/projects/activist-org/deploys/6a49fa174ffbf40007d47dee
😎 Deploy Preview https://deploy-preview-2222--activist-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for the pull request! ❤️

The activist team will do our best to address your contribution as soon as we can. The following are some important points:

  • Those interested in developing their skills and expanding their role in the community should read the mentorship and growth section of the contribution guide
  • If you're not already a member of our public Matrix community, please consider joining!
    • We'd suggest that you use the Element client as well as Element X for a mobile app
    • Join the General and Development rooms once you're in
  • Also consider attending our bi-weekly Saturday developer syncs!
    • Details are shared in the Development room on Matrix each Wednesday before the sync
    • It would be great to meet you 😊

Note

activist uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions

Copy link
Copy Markdown
Contributor

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • Tests for changes have been written and the TypeScript, pytest and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The Playwright end to end and Zap penetration tests have been ran and are passing (if necessary)

  • The changelog has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

Satisfy numpydoc lint for validate_times, validate, and update on the
event details PUT serializer.
Move detail update cases into test_event_update.py so test function names
match the file prefix required by validate_pytest_structure.
…y CI.

Extract focused helpers for event time validation and PUT update steps so cyclomatic complexity stays within the allowed limit.
Move shared schedule labels to _global keys and modal-specific strings to modal_event_details so key-naming and sorted-keys CI checks pass.
Document the extracted serializer helpers so numpydoc lint passes in CI.
Tighten event time and location types, format frontend files, and fix lint ordering and unused imports on the event details edit branch.
Retry async org option loading and next-step navigation so create-event and create-group modal specs stop flaking on Mobile Chrome CI.
Target edit-event-texts on the About card and share a stronger loadSecondPage helper for list pagination specs.
@andrewtavis andrewtavis added the frontend Relates to the project frontend label Jun 20, 2026
Resolve conflicts from the upstream dependency/feature updates:

- i18n locales (en-US, de, es, fr, id, it, uk): drop the stale
  components._global.action key (main renamed it to _global.action and
  updated all call sites) while keeping components._global.all_day_long_event,
  which the event details/time components use.
- Combine the duplicated "Physical location" value (PR's
  modal_event_details.physical_location and main's
  use_get_label_by_key_filter.location_type_physical) into a shared
  _global.physical_location key and repoint both call sites, satisfying the
  i18n-check repeat-values rule.
- backend/complexipy-snapshot.json: regenerate from the merged
  events/serializers.py (both EventPUTSerializer and main's create refactor
  are present; all functions now within the complexity limit).
…ils-edit-modal

# Conflicts:
#	docker-compose.yml
#	frontend/i18n/locales/ar.json
#	frontend/i18n/locales/de.json
#	frontend/i18n/locales/en-US.json
#	frontend/i18n/locales/es.json
#	frontend/i18n/locales/fr.json
#	frontend/i18n/locales/id.json
#	frontend/i18n/locales/it.json
#	frontend/i18n/locales/uk.json
#	frontend/test-e2e/component-objects/CreateGroupModal.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Relates to the project frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Details card edit icon opens wrong modal on Event About page

2 participants