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

Should forbid comma in "activity/category" fields in "add/update activity window" #758

Open
rhertzog opened this issue Jan 25, 2024 · 1 comment

Comments

@rhertzog
Copy link
Contributor

rhertzog commented Jan 25, 2024

In the "add/edit activity" window, it's possible to input an activity name or a category name with a comma, but that is not allowed by the (command line) syntax. When you type a comma in those fields, the "Save" button is (correctly) greyed out but that's not a particularly pleasant user experience

Example:
image

In particular because the cmdline is still updated to reflect the comma in the activity or category and if you switch back to the cmdline and make further changes, it will interpret the input entirely differently and will overwrite all the other fields based on this new interpretation and it will thus re-enable the "Save" button:

image

It would be better to simply refuse to input the comma in the activity and category fields. You type it and nothing happens (or it's immediately removed).

/cc @Flupp @GeraldJansen @mwilck

@rhertzog rhertzog changed the title Should forbid comma in "activity" field in "add/update ac Should forbid comma in "activity" field in "add/update activity window" Jan 25, 2024
@rhertzog rhertzog changed the title Should forbid comma in "activity" field in "add/update activity window" Should forbid comma in "activity/category" fields in "add/update activity window" Jan 25, 2024
@mwilck
Copy link
Contributor

mwilck commented Jan 25, 2024

I am unsure if "simply refusing to input the comma" is a good strategy. Some users may think their keyboard is broken.

Instead, when a comma is entered in the activity, we could disable the link between the activity field and the command line / description fields (i.e. stop updating those from the activity field), and add an error highlight to the activity field (e.g. red background) to indicate that there's something wrong in this field, possibly with a toottip explaining that commas aren't allowed. If we do this, greying out the "save" button would be ok IMO.

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

No branches or pull requests

2 participants