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

Qmaps 2394 dedup intentions #1259

Merged
merged 6 commits into from
Feb 9, 2022
Merged

Qmaps 2394 dedup intentions #1259

merged 6 commits into from
Feb 9, 2022

Conversation

xem
Copy link
Contributor

@xem xem commented Feb 9, 2022

Description

Searches containing:

  • Known category + place (ex: "hotel nice")
  • Known category "around this position" (ex: "hotel")
  • Unknown category + place (ex: "macdo nice")
    Must be present only once in the history panel, even if the search is performed many times

image

NB: This PR also fixes a React key duplication error in the History Panel.
NB2: until now, the dedup test was looking for the "fullTextQuery" item, but this item has been removed, and afaik, it was not necessary to check the equality between two queries.

Copy link
Contributor

@remi-dupre remi-dupre left a comment

Choose a reason for hiding this comment

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

Currently the deleteQuery function assumes there is at most one duplicate. While this is true in a normal use it may be more robust to remove all stored elements that match the new one? (For example, even though this was not in production yet, changes similar to this one that change the equality criteria may lead to having several duplicates of a same item in the history)

@xem xem merged commit 4666a22 into master Feb 9, 2022
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.

2 participants