-
Notifications
You must be signed in to change notification settings - Fork 7
RD-888 Refactored Geocoding Control (WIP) #101
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
base: next
Are you sure you want to change the base?
Conversation
lesbaa
left a comment
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 in, I like the look of Lit. But I'm guessing it's all still in progress?
I'm not a big fan of the label / goto code and I think there's definitely some places where the logic could do with some refactoring / simplifying if at all possible (I'm thinking those nested if / else if / else statements)
I'd love for us to get rid of as many of the headaches as possible from the previous implementation.
Also some form of testing (even if it's just the base use cases) would be good and the readme etc.
lesbaa
left a comment
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.
I think this can be merged, maybe with the caveat of doing another pass for code cleanup before release. 👍 Let's create a ticket in Jira for it.
src/types.ts
Outdated
| maxZoom: number | null | undefined, | ||
| type: string, | ||
| ]; | ||
| export type TypeRule = string | [minZoom: number | null | undefined, maxZoom: number | null | undefined, type: string]; |
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.
Maybe this could be updated to include the actual types you can use? eg "locality", "poi"?
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.
We have this type in client. Maybe we should export it from the sdk
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.
I copied the type over as to not introduce dependency on client just for one type.
RD-888
Objective
Refactor the whole component into standalone component without svelte dependency
Description
Svelte has been removed, geocoder has been rewritten into Lit.js, it is now usable standalone, separate classes for MapLibre GL and MapTiler SDK were created, WIP
Acceptance
Manual testing in demos, WIP