-
Notifications
You must be signed in to change notification settings - Fork 0
ERA-10349: Support EFB schemas in ER > Location Field [2] #1263
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,18 +34,15 @@ const useLocationMarkersLayer = (eventLocation, onMarkerClickCallback) => { | |
)) | ||
), [markers]); | ||
|
||
// GeoJSON feature collection with line strings connecting each marker to the event location. | ||
const markerConnectingLinesFeatureCollection = useMemo(() => { | ||
if (eventLocation?.latitude && eventLocation?.longitude) { | ||
return featureCollection( | ||
Object.values(markers).map((markerLocation) => lineString([ | ||
[markerLocation.longitude, markerLocation.latitude], | ||
[eventLocation.longitude, eventLocation.latitude], | ||
])) | ||
); | ||
} | ||
return null; | ||
}, [eventLocation?.latitude, eventLocation?.longitude, markers]); | ||
// GeoJSON feature collection with line strings connecting each marker to the event location if it is defined. | ||
const markerConnectingLinesFeatureCollection = useMemo(() => featureCollection( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes the source data inconsistency issue. I was returning null for the source data, which isn't handled properly by mapbox. Returning an empty feature collection instead works fine 😄 |
||
eventLocation?.latitude && eventLocation?.longitude | ||
? Object.values(markers).map((markerLocation) => lineString([ | ||
[markerLocation.longitude, markerLocation.latitude], | ||
[eventLocation.longitude, eventLocation.latitude], | ||
])) | ||
: [] | ||
), [eventLocation?.latitude, eventLocation?.longitude, markers]); | ||
|
||
// Map sources for the marker points and connecting lines. | ||
useMapSources([{ data: markerPointsFeatureCollection, id: MARKERS_SOURCE_ID }]); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,5 @@ describe('TrackLegend - TimeOfDaySettings - TimeZoneSelect', () => { | |
userEvent.click(screen.getAllByRole('option')[100]); | ||
|
||
expect(setTimeOfDayTimeZone).toHaveBeenCalledTimes(1); | ||
// This test may break if someday the IANA standard updates. | ||
expect(setTimeOfDayTimeZone).toHaveBeenCalledWith('America/Marigot'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happened here, why to delete this assert? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the line that has been bothering us for a couple weeks with tests breaking in different timezone servers. Joshua sent a fix in another PR removing the entire test, but that is not necessary, removing this line is enough and we still keep some coverage 😄 |
||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the issue when chosing a location and clicking something that is not the map. We just remove the listener while user picks a location so its logic doesn't un-focuses the location picker getting the app into a broken state.