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

Editor: make use of minCharCount and clearOnSelection of autocomplete component #1036

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Angi-Kinas
Copy link
Collaborator

Description

This PR uses the functionality of the autocomplete component to achieve the following behaviour for the keyword edition:

  • When the user chooses a result, the typed characters should be cleaned
  • When the user clears the input, the dropdown is closed

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Nov 12, 2024

Affected libs: feature-editor, ui-inputs, feature-dataviz, feature-record, feature-router, feature-search, feature-map, ui-elements, feature-notifications, feature-catalog, ui-catalog, ui-search, ui-layout,
Affected apps: metadata-editor, datafeeder, demo, metadata-converter, datahub, webcomponents, search, map-viewer,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

@coveralls
Copy link

coveralls commented Nov 12, 2024

Coverage Status

coverage: 81.218% (+0.5%) from 80.717%
when pulling 586825d on ME-extend-autocomplete-to-clear-input
into e8eb1e1 on main.

Copy link
Contributor

github-actions bot commented Nov 12, 2024

📷 Screenshots are here!

@jahow jahow added this to the 2.4.0 milestone Nov 14, 2024
Copy link
Collaborator

@cmoinier cmoinier left a comment

Choose a reason for hiding this comment

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

Thanks for the work :)

However, while the changes work for the second point (closing the dropdown on clear), it doesn't work for the first one. Here I typed "asia" & selected the keyword, but the typed text wasn't cleared.

image

@Angi-Kinas
Copy link
Collaborator Author

@cmoinier thanks for the review and testing!
You are right, the clearing of the input field did not work after selection. I fixed this now.
While testing I encountered a different bug though.
When selecting a keyword and clicking inside the input field again, the previous selected keyword is being saved as search query and therefore the dropdown suggestions only reflect the previous selected keyword.
This happens just for the keywords (not for the spatial extent keywords).
Until now I could not figure out why this is happening.

@cmoinier cmoinier force-pushed the ME-extend-autocomplete-to-clear-input branch from 5b41632 to 777a839 Compare November 26, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants