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: simple typeahead search #1335

Merged
merged 11 commits into from
Aug 9, 2024
Merged

Conversation

mvexel
Copy link
Contributor

@mvexel mvexel commented Jul 29, 2024

This adds a simple typeahead search to the layer and style overview. Useful for instances with a lot of layers!

tgl-480.mov

Copy link
Contributor

@akx akx left a comment

Choose a reason for hiding this comment

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

I'd suggest adding custom data attributes to the elements being filtered, so we don't need to traverse the DOM as much :)

public/templates/index.tmpl Outdated Show resolved Hide resolved
public/templates/index.tmpl Outdated Show resolved Hide resolved
public/templates/index.tmpl Outdated Show resolved Hide resolved
mvexel and others added 3 commits July 31, 2024 17:44
Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Aarni Koskela <akx@iki.fi>
@mvexel
Copy link
Contributor Author

mvexel commented Jul 31, 2024

@akx haha yes that would be better for sure!
Do you otherwise see this as a useful thing to merge (before I spend more time on it)?

@acalcutt
Copy link
Collaborator

acalcutt commented Aug 1, 2024

I think this looks like a nice feature i would merge.

@mvexel
Copy link
Contributor Author

mvexel commented Aug 2, 2024

Thanks @acalcutt! I will make the improvements @akx suggested to reduce strain from DOM traversal.

@mvexel
Copy link
Contributor Author

mvexel commented Aug 2, 2024

all done and as promised we are actually filtering on both name and identifier now :)
We could extend this with another data attribute to filter on style, layer only with some checkboxes but I propose not overcomplicate things.
Thanks for considering!

@akx
Copy link
Contributor

akx commented Aug 2, 2024

Looks nice and clean with hidden and the dataset stuff! Thanks for taking my suggestions into account :)

@mvexel
Copy link
Contributor Author

mvexel commented Aug 6, 2024

Looks nice and clean with hidden and the dataset stuff! Thanks for taking my suggestions into account :)

Thanks for the suggestions! I hope this is ready to merge but please do let me know if you have any additional changes you would like to see.

@acalcutt
Copy link
Collaborator

acalcutt commented Aug 7, 2024

Just an FYI, I will try to test this soon so it can be merged. I have just been slammed this week at my real job and haven't had much time to test PRs this week.

Copy link
Collaborator

@acalcutt acalcutt left a comment

Choose a reason for hiding this comment

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

Seems simple and worked fine in testing.

@acalcutt acalcutt merged commit 5cb0047 into maptiler:master Aug 9, 2024
6 checks passed
@acalcutt
Copy link
Collaborator

The one thing I haven't liked about this is how much room the logo + filter take up. one of these days I need to shrink that logo

@mvexel
Copy link
Contributor Author

mvexel commented Aug 24, 2024

Have to agree with you. With a little bit of work the filter element could be made smaller. Honestly I think the entire page could benefit from a tighter layout. Let me think about this a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants