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

feat(storybook): Add story for location marker icon #2278

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

joshlarson
Copy link
Contributor

This is a follow-up to this PR to add a storybook story for the affected icon.

Question: I wasn't able to get the icon to load without being in the map context. It feels like we should have a non-map version of the icon, but I sort of timeboxed the effort to add it. What do you all think?

@joshlarson joshlarson requested a review from a team as a code owner November 13, 2023 21:26
@lemald
Copy link
Member

lemald commented Nov 13, 2023

Question: I wasn't able to get the icon to load without being in the map context. It feels like we should have a non-map version of the icon, but I sort of timeboxed the effort to add it. What do you all think?

I'd say this component only really makes sense in a Leaflet map setting - it uses <ReactMarker/> which in turn uses the react-leaflet <Marker/> that does the under-the-hood effect synchronization between React and Leaflet. The icon itself is the <LocationDotIcon/> component. Because of the CSS involved in Leaflet itself I think it's most meaningful to look at how the icon renders in that environment, unless we decide we're also using this icon in other places, in which case it could make sense to have <LocationDotIcon/> surfaced directly in StoryBook somehow.

import { LocationMarker } from "../../../../src/components/mapMarkers"
import { inMapDecorator } from "../../../../.storybook/inMapDecorator"

const location: LocationSearchResult = {
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: not sure how much luck you've had working through the CI errors you're seeing, but adding import { LocationSearchResult } from "../../../../src/models/locationSearchResult" will help (and then you just have to add location to the args for the two specific stories).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I originally had that, but that led to this kind of meaningless input:
Screenshot 2023-11-14 at 10 49 22 AM

I guess it could be helpful for showing usage, but on the storybook page, that input doesn't have any effect and looks kind of ugly.

Copy link
Member

Choose a reason for hiding this comment

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

looks kind of ugly

Related: #2278 (comment)

@firestack
Copy link
Member

Question: I wasn't able to get the icon to load without being in the map context. It feels like we should have a non-map version of the icon, but I sort of timeboxed the effort to add it. What do you all think?

I agree, I really like having a icon without map story, but I think we may start using IconGallery which would fill the place of having stories for the icon on their own.
We could link to the icon in the icon gallery from this story after we have the gallery.

@lemald
Copy link
Member

lemald commented Nov 14, 2023

Question: I wasn't able to get the icon to load without being in the map context. It feels like we should have a non-map version of the icon, but I sort of timeboxed the effort to add it. What do you all think?

I agree, I really like having a icon without map story, but I think we may start using IconGallery which would fill the place of having stories for the icon on their own. We could link to the icon in the icon gallery from this story after we have the gallery.

Yeah I guess Kayla and I had sort of conflicting responses to this but upon reading hers I've come around, basically I think it's important to have both for different reasons (and I like the idea of a dedicated icon gallery thingy!).

Copy link

Coverage of commit c1da9d6

Summary coverage rate:
  lines......: 94.9% (3014 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

Copy link

Coverage of commit 7aff5f8

Summary coverage rate:
  lines......: 94.8% (3013 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

Copy link

Coverage of commit 1d633eb

Summary coverage rate:
  lines......: 94.8% (3013 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@joshlarson joshlarson force-pushed the jdl/feat/storybook/location-marker branch from 1d633eb to 023043d Compare November 15, 2023 14:04
Copy link

Coverage of commit 023043d

Summary coverage rate:
  lines......: 94.8% (3013 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@joshlarson joshlarson merged commit 37deccf into master Nov 15, 2023
8 checks passed
@joshlarson joshlarson deleted the jdl/feat/storybook/location-marker branch November 15, 2023 17:01
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