Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Prerender favorite in autocompletes #150

Merged
merged 3 commits into from
Apr 11, 2019

Conversation

Julien-laville
Copy link

Capture d’écran_2019-03-18_10-53-03

Copy link
Contributor

@jbgriesner jbgriesner left a comment

Choose a reason for hiding this comment

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

Steps to reproduce the bug corresponding to the image below:

  • click "directions"
  • select whatever start and end
  • remove the end point (by clicking the small cross on the right of the field)
  • click in the text field of the end point: tadaa you should see twice "your position"

Qwant Maps - alpha - Chromium_003

@Julien-laville
Copy link
Author

@jbgriesner not related to this feature but still fixed

@Julien-laville Julien-laville force-pushed the QMAPS-722_prefill_favorite_autocomplete branch from 7783e5e to 1b4256d Compare March 21, 2019 10:15
@@ -40,6 +41,9 @@ export default class SearchInput {
this.searchInputHandle = document.querySelector(tagSelector)
this.handleKeyboard()
this.suggest = new Suggest(tagSelector, (selectedPoi) => this.selectItem(selectedPoi))
PoiStore.getAll().then((storeItems) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Initializing suggested favorites in the constructor of the search input component means the suggestions won't be updated when a new favorite is added.

Steps to reproduce the bug:

  1. focus on search focus to see the list of current favorites as suggestion
  2. add a new favorite
  3. focus again on the search input, the new favorite is not displayed

Copy link
Author

Choose a reason for hiding this comment

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

We will fix that in the future ticket favorite synch, thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, there is also an issue when clearing the field of direction input, we don't have the suggestion anymore, but I guess it is not directly related to this PR and will be fixed in a future ticket.

sujeebant
sujeebant previously approved these changes Mar 26, 2019
@amatissart amatissart merged commit e6fb793 into master Apr 11, 2019
@amatissart amatissart deleted the QMAPS-722_prefill_favorite_autocomplete branch May 3, 2019 09:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants