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

Search API #779

Merged
merged 21 commits into from
Nov 11, 2024
Merged

Search API #779

merged 21 commits into from
Nov 11, 2024

Conversation

modos189
Copy link
Contributor

@modos189 modos189 commented Nov 3, 2024

  • Search moved to namespace IITC.search
  • The code is rewritten in modern JS, without jQuery and with separation of logic and display
  • IITC.search is divided into separate files: IITC.search, IITC.search.Query, IITC.search.QueryResultsView.
  • The geolocation button is always placed in the search field
  • Added an accordion to expand and collapse search results without jQuery
  • Updated icons, added search icon and search field cleanup icon FR: Clear field (X) button for Search location #742
  • The window.search.addSearchResult method has been moved to IITC.search.Query.addPortalResult, just like before plugins could call query.addResult to add a search result
  • Search supports input in both decimal format (e.g., 51.5074, -0.1278) and DMS format (e.g., 50°31'03.8"N 7°59'05.3"E)
  • Backward compatibility with older function calls is provided

screenshot

TODO:

  • I think we should mark the methods as private except for the ones that are suggested to be used. For example, query.addResult and query.addPortalResult are public, while the others in IITC.search.Query are private
  • Write tests
  • Write documentation on migration
  • In a separate PR to use the new API in our codebase

close #771

@modos189 modos189 added enhancement New feature or request development general development issue labels Nov 3, 2024
Copy link

github-actions bot commented Nov 3, 2024

🤖 Pull request artifacts

file commit
IITC_Mobile-test.apk 44c0d20
test-0.39.1.20241104.085854.zip 44c0d20

See build on website

@modos189 modos189 merged commit c81b019 into IITC-CE:master Nov 11, 2024
4 checks passed
@modos189 modos189 deleted the feature/search_api branch November 11, 2024 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development general development issue enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The keypress event is deprecated
1 participant