This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
Fetch all facilities by default on main page when vector tile feature is active #771
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
When the vector tile feature is active, fetch all facilities by default
on the main map and sidebar page. Also make the "Facilities" tab the
initially displayed tab on loading the map page if the vector tile
feature is active.
Add guards to retain prior map behavior when the vector tile feature is
not active.
Connects #765
Demo
Notes
Making this work while keeping the same functionality as before when the feature flag is off was a little tricky, but I think I came up with a good way to handle it which was to defer rendering any components that need to know the state of feature flags until the feature flags have returned from the API.
Testing Instructions
Using the standard set of fixtures, serve this branch, then...
With the
vector_tile
switch turned off, use the app and verify that it still works as it did before.With the
vector_tile
switch turned on, use the app and verify that the facilities tab populates with data as expected.In particular: clicking the "reset" button for the vector tiles version will now undertake a new search.
Checklist
fixup!
commits have been squashed