-
Notifications
You must be signed in to change notification settings - Fork 3
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(POI maps): add navigation controls for multi features popup #209
feat(POI maps): add navigation controls for multi features popup #209
Conversation
4416f54
to
dcf0585
Compare
d03deee
to
d42abd1
Compare
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.
Nice ✨
I don't see anything that could block this POC.
IMO We should also generate the close button in the same function that generate the arrow buttons
return; | ||
} | ||
|
||
// FIXME: remove eslint comment. | ||
// eslint-disable-next-line prefer-destructuring | ||
this.activeFeature = features[0]; | ||
|
||
this.availableFeaturesOnClick = features; |
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.
As popup is an optional configuration for a layer we must filter availableFeaturesOnClick
with only features that has a popup config.
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.
Thanks for your feedback, indeed the close button should be part of the same row as the navigation controls, I think. And good catch for the this filter. I'll do the changes if everyone agrees for this first implementation 👍
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.
Done here 7531261
Another thing that I wasn't unsure and wanted to double check with you, is the change from |
Yes, nothing changes, the value returned by |
I kinda think the popup can be its own Svelte component already, without much modifications to Map.ts actually. If That would be one less thing to migrate and unless I miss something, not as much work as it seems in the first place. |
@etienneburdet If a Svelte component controls the popup instance we must remove the 'popup' variable declaration in the IMO all these changes required to completely rework on how the information is circulating between popup and map instance and should be done during our migration to Svelte components. |
d96cd8f
to
e47738f
Compare
@RafaelSzmarowski I can't assign you as reviewer but can you please review it. |
Thanks for the last changes and for taking care of this PR ! As far as I have tested it, it looks very well and the code LGTM 🏅 Nice work ! |
Seen with the design team to always show the navigation controls. So controls must be visible when the content is loading Screen.Recording.2024-01-16.at.16.54.25.mov |
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.
All good for me if we migrate that to a Svelte component later 👌
To prevent 'circle' features being very hard to click after an highlight we need to keep using a match expression. Didn't find the root problem. Probably, it's a Maplibre issue ('symbol' layers have not this kind of issue).
flex-end instead of end
4610afa
to
d237fc2
Compare
Summary
The goal for this PR is
to test a simple implementationto add navigation controls inside the popup when the click event query multiple features.(Internal for Opendatasoft only) Associated Shortcut ticket: sc-44648.
Screen.Recording.2024-01-11.at.11.39.50.mov
Native Popup close button has been removed to add a custom arrow which is at the same level of the navigation buttons.
We also update how a feature is highlight. Highlight and un-highlight strategies are different for each layer type. Currently, only 'symbol' and 'circle' has highlight and un-highlight strategies.
There is a small glitch when a symbol feature is selected: the layer flickers. I didn't find why, but I think this is acceptable.
Review checklist