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

Select all text upon focus on map search input for Google Maps #9204

Merged

Conversation

diegoamc
Copy link
Contributor

What? Why?

Closes #8755

On the map page, when we search a location and than want to search for
another, we would have to delete letter by letter of the previous search
text.

Now, when we click on the search input to type another search text, the
previous text will be all selected and we can remove everything with
just hitting the backspace once

What should we test?

Search input behavior on the map page using Google Maps. See gif below.

search-input

Release notes

Changelog Category: User facing changes

On the map page, when we search a location and than want to search for
another, we would have to delete letter by letter of the previous search
text.

Now, when we click on the search input to type another search text, the
previous text will be all selected and we can remove everything with
just hitting the backspace once
Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

Cool, this is an improvement but I think that it's not quite what was asked for.

You can select the input in the search field with the mouse (by selecting with the left mouse key pressed or double clicking to select the whole word) and then delete or overwrite the whole input in one step.

It says that you can select the text and not that it is already selected after on focus. @drummer83 Do you have an opinion on this?

@drummer83
Copy link
Contributor

Thanks @diegoamc for this pull request and @mkllnk for reviewing!

You are right, that's not exactly what I was asking for, but it might be even better. Selecting the text on focus seems like a common and widely used approach to me. I would be very happy with this solution.

@sigmundpetersen
Copy link
Contributor

What about supporting all 3 select modes? Wouldn't that be great 🙂
Click to focus, double click, click and drag.

Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

What about supporting all 3 select modes?

That would be cool. But I'll approve this as first step already.

@mkllnk mkllnk requested a review from jibees May 24, 2022 00:02
Copy link
Contributor

@jibees jibees left a comment

Choose a reason for hiding this comment

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

Perfect!

@diegoamc
Copy link
Contributor Author

Thanks for reviewing and for the messages!

@drummer83 drummer83 added the pr-staged-uk staging.openfoodnetwork.org.uk label May 29, 2022
@drummer83 drummer83 self-assigned this May 29, 2022
@drummer83
Copy link
Contributor

Hi @diegoamc and thank you for this pull request! 💪
It's your first, isn't it? 🚀

Before this pull request the input in the search field could only be deleted letter by letter:
Peek 2022-05-29 17-59

After this pull request the input is selected and can be deleted all at once:
Peek 2022-05-29 18-07

This is a great improvement! Thank you! 🥳

As discussed above there is still room for more improvement (which was not expected within this issue). I will open a new issue for that!

This one is ready to go! 🕺

@drummer83 drummer83 removed the pr-staged-uk staging.openfoodnetwork.org.uk label May 29, 2022
@drummer83 drummer83 removed their assignment May 29, 2022
@mkllnk mkllnk merged commit 8645277 into openfoodfoundation:master May 31, 2022
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.

[Map] Search input can't be selected/deleted using the mouse (back space only)
5 participants