Skip to content

Add nested location group; remove address, link, and sniffing #195

Description

@edalzell

Breaking 7.0 cut for #190.

location becomes a declared group for the physical place; online_url stays a sibling (already shipped in 6.2). Nested coords ship here — not as a top-level 6.x field (#194 superseded) — so 6→7 upgrades don't need a separate coords migration.

Warning

Blocked on transformstudios/prime#834 for Prime sites. Duplicate location handles collapse silently. Events must not ship into Prime blueprints until Prime renames its group.

Fieldset

Location section on events::event (already has online_url from #193):

location:                    # group
  name: text                 # localizable — ICS LOCATION (plain desc or address)
  coordinates:               # nested group
    latitude / longitude     # float
online_url:                  # sibling — already declared

No top-level address, link, or top-level coordinates.

Resolution

src/Types/Event.php:

  • icsLocation() → string location.name, else fallback to online_url when empty
  • GEO from location.coordinates (reuse hasValidCoordinates())
  • eventUrl() / optionally rename → icsUrl(): only online_url (drop link + URL-location sniff)
  • delete icsAddress(); stop reading top-level address / coordinates / string location
  • read via get(); if location isn't a group or name isn't a non-empty string, skip — never fatal

Mapping

Event LOCATION: URL: GEO:
Physical only location.name — location.coordinates
Online only online_url online_url —
Hybrid location.name online_url location.coordinates

Tests

TDD first.

  • each mapping row, all four download routes
  • declared nested coords → GEO:; partial/non-numeric still safe
  • foreign/non-group location ignored (collapse Only pass string addresses to ICS downloads #184-style group tests into this)
  • address / link / top-level coordinates / URL sniff no longer read
  • a URL string in location.name is a location, not a join URL

Docs

Branch

feature/location-field off main. Stacks after 6.2 content already on main.

Part of #190.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions