Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multitudes: multiple views, marker layers + area explorer displays per data source #198

Merged
merged 25 commits into from
Jan 28, 2025

Conversation

janbaykara
Copy link
Member

@janbaykara janbaykara commented Jan 27, 2025

This PR reorganises the storage and management of report configuration, to facilitate future roadmap items. It also introduces a few early features based on that refactor.

Closes MAP-935, MAP-923, MAP-911, MAP-931, MAP-817

New features

  • Create more than one map views in a report. Closes MAP-817
  • Configure the area explorer panel: create multiple displays per layer, more configuration options (e.g. MAP-817). Changes are now persisted to the database.
  • Add multiple map markers for a single data source. This is fairly useless right now, but soon we'll add filtering so it will be useful!

Technical changes

  • Moves all layer config, except for the source IDs themselves, out of Django's layer DB field and into displayOptions on a per-view basis. This is so that frontend view changes no longer require changes to the GraphQL type system or other backend work. The logic going forwards can be that we only adjust GraphQL types where other backend logic (e.g. data querying) needs to happen anyway.
  • Migrates existing displayOptions to a default Map view, adds a rig for versioning displayOptions to allow for further migrations, and adds zod schema resolvers with defaults to enforce and flesh out this config.

Testing

Open a map report and the config should auto-migrate to the new schema. Everything should work as expected. For each layer in the report:

  • A marker layer should've been auto-created
  • An area explorer should've been auto-created
    And everything should be configurable.

Copy link

linear bot commented Jan 27, 2025

@commonknowledge-bot commonknowledge-bot deployed to feature/map-923-refactor-maplayer-config - meep-database PR #198 January 27, 2025 16:24 — with Render Active
@janbaykara janbaykara requested a review from joaquimds January 27, 2025 16:25
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-923-refactor-maplayer-config - meep-intelligence-hub-backend PR #198 January 27, 2025 16:25 — with Render Destroyed
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-923-refactor-maplayer-config - meep-intelligence-hub-backend PR #198 January 27, 2025 16:25 — with Render Destroyed
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-923-refactor-maplayer-config - meep-intelligence-hub-frontend PR #198 January 27, 2025 16:25 — with Render Destroyed
@commonknowledge-bot commonknowledge-bot deployed to feature/map-923-refactor-maplayer-config - meep-intelligence-hub-worker PR #198 January 27, 2025 16:25 — with Render Active
Copy link

linear bot commented Jan 27, 2025

Copy link

linear bot commented Jan 27, 2025

@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-923-refactor-maplayer-config - meep-intelligence-hub-worker PR #198 January 27, 2025 17:29 — with Render Destroyed
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-923-refactor-maplayer-config - meep-intelligence-hub-backend PR #198 January 27, 2025 17:29 — with Render Destroyed
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-923-refactor-maplayer-config - meep-intelligence-hub-frontend PR #198 January 27, 2025 18:48 — with Render Destroyed
@janbaykara janbaykara changed the title Refactor maplayer config Multitudes: multiple views, markers, area explorer displays for each layer Jan 27, 2025
@janbaykara janbaykara changed the title Multitudes: multiple views, markers, area explorer displays for each layer Multitudes: multiple views, markers per data source, area explorer displays for each layer Jan 28, 2025
@janbaykara janbaykara changed the title Multitudes: multiple views, markers per data source, area explorer displays for each layer Multitudes: multiple views, marker layers + area explorer displays per data source Jan 28, 2025
}
}, [mapBounds, mapView.mapOptions, activeTileset])

// useEffect(() => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: remove this commented out code

<div className="absolute bottom-12 right-0 z-10 p-4">
<LoadingIcon size={'50'} />
</div>
)} */}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: why is this commented out?

@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-923-refactor-maplayer-config - meep-intelligence-hub-frontend PR #198 January 28, 2025 20:10 — with Render Destroyed
@janbaykara janbaykara merged commit 710e625 into main Jan 28, 2025
4 checks passed
@janbaykara janbaykara deleted the feature/map-923-refactor-maplayer-config branch January 28, 2025 20:13
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.

3 participants