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

Add mock data for layers and soft stories #95

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

nickvisut
Copy link
Collaborator

@nickvisut nickvisut commented Nov 23, 2024

WARNING: This PR depends on #88 being merged in first. Blocked by #88.

Description

This PR introduces Mapbox layers for seismic and tsunami data. It also replaces Mapbox markers with a Mapbox layer for soft stories. This data should be considered unvetted mock data regardless of resemblance to final data. Its usage is intended as a tech demo until it is reviewed at a later date.

The method of integration is through direct imports for ease of use while using the "mock" or placeholder data. It will likely be grabbed from the back end and passed in through props in a future PR.

Type of changes

  • Bugfix
  • Chore
  • New Feature

Testing

  • I added automated tests
  • I think tests are unnecessary

How to test

Run app locally.
Compare styling of layers and soft stories dots to Figma.

Here are some screenshots:
Screenshot 2024-11-24 at 7 26 42 PM
Screenshot 2024-11-24 at 7 25 09 PM
Screenshot 2024-11-24 at 7 24 31 PM

Here is the Figma for comparison:
https://www.figma.com/design/AGadwQcQH5kNn2D93TVOAC/Design?node-id=503-1542&t=GEGeRaMT0ZpP8Mk8-4

Please also refer to requirements in #92, also linked in the right panel under "Development".

@nickvisut nickvisut linked an issue Nov 23, 2024 that may be closed by this pull request
9 tasks
@nickvisut nickvisut force-pushed the feature/add-mapbox-gl-layers branch from 002714b to b994553 Compare November 24, 2024 00:37
@nickvisut nickvisut force-pushed the feature/add-mapbox-gl-layers branch 3 times, most recently from 7c9fd84 to 999193d Compare November 24, 2024 07:47
@nickvisut nickvisut changed the title Add mock data for layers and soft stories, first pass Add mock data for layers and soft stories Nov 24, 2024
@nickvisut nickvisut force-pushed the feature/add-mapbox-gl-layers branch from 999193d to 9b0234c Compare November 24, 2024 08:29
import tsunamiData from "../../tsunami-11212024.json";
import softStoriesData from "../../soft-stories-11232024.json";

const typedSeismicData: FeatureCollection<Geometry> =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pulling in mock data

.addTo(map);

softStories.forEach(({ lng, lat }) => {
const el = document.createElement("div");
// Add sources
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add data

data: typedSoftStoriesData,
});

// Add layers
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

render data

@@ -1,3 +1,4 @@
/* TODO: line up property values with ./theme.ts OR add automation that outputs design tokens for both CSS (SCSS?) and TS */
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this file is just comment changes and autoformatting; can ignore

@nickvisut nickvisut requested a review from mantuok November 25, 2024 00:13
@nickvisut nickvisut marked this pull request as ready for review November 25, 2024 00:13
@mantuok
Copy link
Collaborator

mantuok commented Dec 6, 2024

Looks good to me! However, I'm wondering if we should display the pin (Mapbox marker) before the user searches for an address. What do you think?

@nickvisut
Copy link
Collaborator Author

Looks good to me! However, I'm wondering if we should display the pin (Mapbox marker) before the user searches for an address. What do you think?

You're right, the marker is just a mock one to match the original task. Once search is in, it'll def not show up until a search is done.

@nickvisut nickvisut force-pushed the feature/add-mapbox-gl-layers branch from 2f910d1 to b221269 Compare December 12, 2024 01:52
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.

Add mock soft stories and polygons to Mapbox Map
3 participants