-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update annotation form #4701
Update annotation form #4701
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feedback from running this on metra:
- the hover button text shows ask question instead of add comment (the global button does show add comment)
- if there are no saved annotations, the area to the right of the textarea is left blank. I would add an empty state there or show the textarea full width.
- if you check "save annotation", the title form is shown to the right of the text area. This somewhat breaks the flow. Maybe placing it inline after the checkbox + save annotation text would make more sense?
-
when save annotation is checked, it would make sense to change the text on the submit button to also say something that hints that the annotation will be saved. - the help text under the "search for annotations" combobox is too long (at least in Dutch)
- in the search annotations input, the list of suggestions is not the same width as the text input
- in the search annotations input, the list of suggestions "flickers" when searching
- when picking a suggestion, the "save annotation" checkbox is disabled, but it is also shown as checked which might be confusion. Maybe replace it with a link to the page where you can edit that annotation?
- when loading a saved annotation and then changing the text, a "not equals" sign is shown in the search annotation input. The icon is not aligned well (shown somewhere in the middle of the input field)
This page does not exist yet (It is a modal currently) |
I am not the biggest fan of this. I find it hard to come up with better wording for the button. A longer text is also makes it harder to properly layout the buttons (as they are on the same line as the checkbox currently) The checkbox is also right next to the button, so the information is already provided on almost the same place |
I removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The wording of "sla opmerking op om te hergebruiken" is quite verbose. Maybe make it "Opmerking opslaan" (maybe with an info icon with tooltip?). This would also help with my previous comment that it wasn't really clear that the comment would also be save when clicking the submit button
- The "Titel:" label is a bit strange. Maybe floating labels are an option here?
- Upon clicking "sla opmerking op", the titel input should get the focus
- On smaller screens, the form layout isn't optimal:
The floating labels don't work for our inputs, as we have a lot less vertical padding compared to the bootstrap default. Thus their is no vertical space for a label inside the input, without making the input look comically large compared to others. I did make some custom styling based on the bootstrap css to put the label inside the input before the typing area |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a JS error on mestra when signed in as staff. Otherwise, looks good 👍
updated(changedProperties: Map<string, any>): void { | ||
// Focus the newly shown title input if the user wants to save the annotation. | ||
if (changedProperties.has("saveAnnotation") && this.saveAnnotation) { | ||
this.titleRef.value.focus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also call select()
here: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select
This pull request restructures the annotation form in such a way that the saved annotations options don't take up to much extra space.
New:
Old:
New (save annotation):
Old (save annotation):
New (mobile):
Old (mobile):
Part of #4564