Skip to content

feat: enable "back" & "edit" navigation for List map fields and MapAndLabel using @opensystemslab/map v1.0.0-alpha.2#3612

Merged
jessicamcinchak merged 6 commits intomainfrom
jess/list-map-field-edit
Sep 3, 2024
Merged

feat: enable "back" & "edit" navigation for List map fields and MapAndLabel using @opensystemslab/map v1.0.0-alpha.2#3612
jessicamcinchak merged 6 commits intomainfrom
jess/list-map-field-edit

Conversation

@jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Sep 2, 2024

A few key changes in here!

  • Bumps @opensystemslab/map to v1.0.0-alpha.2
    • Fixes shifty labels when modifying features; now when you modify it should keep the same label
    • Enables processing a GeoJSON "FeatureCollection" passed into drawGeojsonData prop which is required for "back" navigation when drawMany is enabled (previously supported single "Feature")
  • [List] Pre-populates drawing layer on the map when you click "Edit" for an existing item
  • [List] Fix bug preventing existing/pre-populated features from being successfully "cleared"
  • [MapAndLabel] Updates handleSubmit to produce GeoJSON data
  • [MapAndLabel] Pre-populates map drawing layer and tab fields when you come "back" or "change" from the Review page
  • [MapAndLabel] Adds a very basic Review page summary
  • [MapAndLabel] Fixes bug where no tabs were active when coming "back"/"changing" - always default to tab 0 as active

Testing:

Known bugs:

@github-actions
Copy link

github-actions bot commented Sep 2, 2024

Removed vultr server and associated DNS entries

@jessicamcinchak jessicamcinchak marked this pull request as ready for review September 2, 2024 21:02
@jessicamcinchak jessicamcinchak requested a review from a team September 2, 2024 21:02
@jessicamcinchak jessicamcinchak changed the title chore: bump to @opensystemslab/map v1.0.0-alpha.2 & implement features feat: enable "back" & "edit" navigation for List map fields and MapAndLabel using @opensystemslab/map v1.0.0-alpha.2 Sep 2, 2024
@jessicamcinchak
Copy link
Member Author

@jamdelion
Copy link
Contributor

I'm getting this error when I try to view Map+Label cannot read properties of undefined (reading 'boundaryBBox' ):

Screenshot 2024-09-02 at 22 19 02

I'm also not sure how developed this feature is yet, but I get a blank map on the list component:

Screenshot 2024-09-02 at 22 23 44

@jessicamcinchak
Copy link
Member Author

jessicamcinchak commented Sep 3, 2024

@jamdelion thanks for quickly catching both of these bugs !

  • The boundaryBBox was an error on my side & we need to account for this occassionally being undefined in teams like "Testing" that don't have an obvious spatial boundary. When it is set, the zoom/pan on the map is more restricted
  • The empty map & corresponding Unimplemented type 3 error thrown in the console is a weird one that can pop up related to failing to properly fetch OS Vector Tiles (see threads like this & this)
    • I can't recreate this locally or on staging/production (& no direct changes to OS Vector Tiles in this PR) - so hoping it's something specific to pizza domain headers set on requests or similar (recent instances of this error in #planx-errors seem to also confirm only pizza issue) - will double-check after merge and revert if necessary !
    • I've updated the List to use the satellite basemap in the meantime which is loading without issue, just the OS basemaps that are failing here !

@jamdelion
Copy link
Contributor

@jamdelion thanks for quickly catching both of these bugs !

  • The boundaryBBox was an error on my side & we need to account for this occassionally being undefined in teams like "Testing" that don't have an obvious spatial boundary. When it is set, the zoom/pan on the map is more restricted

  • The empty map & corresponding Unimplemented type 3 error thrown in the console is a weird one that can pop up related to failing to properly fetch OS Vector Tiles (see threads like this & this)

    • I can't recreate this locally or on staging/production (& no direct changes to OS Vector Tiles in this PR) - so hoping it's something specific to pizza domain headers set on requests or similar (recent instances of this error in #planx-errors seem to also confirm only pizza issue) - will double-check after merge and revert if necessary !
    • I've updated the List to use the satellite basemap in the meantime which is loading without issue, just the OS basemaps that are failing here !

Nice, those are both fixed for me now. :)

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