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

Enhance select step to choose not only by option value, but also option text - done #1001

Closed
kensoh opened this issue Apr 8, 2021 · 5 comments
Assignees
Labels

Comments

@kensoh
Copy link
Member

kensoh commented Apr 8, 2021

TagUI's select step helps users select options. The default design assuming best web design practices is to select using the value attribute. This is because value is the 'source-of-truth' that gets submitted when someone submits a form.

See this page from W3Schools on option value - https://www.w3schools.com/tags/att_option_value.asp

Screenshot 2021-04-08 at 1 29 17 PM

However, using value is non-intuitive for a non-developer user because 'value' is not something that is visible on the screen. Only text is visible. Furthermore, sometimes 'value' is some unique number that has nothing to do with the text of the option being selected. A TagUI workflow would be hard to understand in such situation what is being selected.

After thinking through, the best approach should be matching by value but should that fail, then match by text. It is not advisable to match by text first because 'value' is still the unique source-of-truth when submitting a form. But having this fallback should open up new use cases without causing problems for existing users use cases.

@kensoh
Copy link
Member Author

kensoh commented Apr 8, 2021

Code enhancement implemented will let the following flow run correctly whether you give value or text.

https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option_value
frame iframeResult
    wait 1
    select cars as Volvo XC90
    wait 1
    select cars as Saab 95
    wait 1
    select cars as Mercedes SLK
    wait 1
    select cars as Audi TT
    wait 3
    select cars as volvo
    wait 1
    select cars as saab
    wait 1
    select cars as mercedes
    wait 1
    select cars as audi
    wait 3

@kensoh kensoh self-assigned this Apr 8, 2021
@kensoh kensoh added the feature label Apr 8, 2021
@kensoh kensoh changed the title Enhance select step to choose not only by option value, but text - to implement Enhance select step to choose not only by option value, but also option text - to implement Apr 8, 2021
@kensoh
Copy link
Member Author

kensoh commented Apr 8, 2021

Above commit implements this enhancement. You can download the latest copy of TagUI with this fix and unzip to overwrite your existing installation (please drag the folders under tagui\src to overwrite your existing installation) - https://github.com/kelaberetiv/TagUI/archive/master.zip

In the next release, this fix will become part of the packaged zip files. Thanks Novianto for suggesting this!

@kensoh kensoh changed the title Enhance select step to choose not only by option value, but also option text - to implement Enhance select step to choose not only by option value, but also option text - done Apr 8, 2021
@noviantonugroho4
Copy link

Above commit implements this enhancement. You can download the latest copy of TagUI with this fix and unzip to overwrite your existing installation (please drag the folders under tagui\src to overwrite your existing installation) - https://github.com/kelaberetiv/TagUI/archive/master.zip

In the next release, this fix will become part of the packaged zip files. Thanks Novianto for suggesting this!

Thank you so much for adding new feature select by text 🔥🔥🎉🎉🎉

@kensoh
Copy link
Member Author

kensoh commented Apr 8, 2021

Thanks Novianto for raising this!! :D

@kensoh
Copy link
Member Author

kensoh commented Jun 18, 2021

Closing issue, change included in latest packaged release - https://github.com/kelaberetiv/TagUI/releases/tag/v6.46.0

@kensoh kensoh closed this as completed Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants