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

Merged
merged 9 commits into from
Dec 12, 2024

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, map-viewer, search,

  • 🚀 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.764% (-0.02%) from 81.783%
when pulling e589636 on ME-extend-autocomplete-to-clear-input
into decc890 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
@CLAassistant
Copy link

CLAassistant commented Dec 8, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@tkohr tkohr 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 fix @Angi-Kinas ! Works like a charm. Happy to see it needed less logic than expected :-)

@Angi-Kinas Angi-Kinas force-pushed the ME-extend-autocomplete-to-clear-input branch from 300b3df to 5ec61f8 Compare December 12, 2024 12:29
@tkohr
Copy link
Collaborator

tkohr commented Dec 12, 2024

Thanks for the added test! LGTM

@Angi-Kinas Angi-Kinas merged commit a63d6d0 into main Dec 12, 2024
14 checks passed
@Angi-Kinas Angi-Kinas deleted the ME-extend-autocomplete-to-clear-input branch December 12, 2024 14:41
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.

6 participants