-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[25.1] Use focus/blur to prevent prop updates from changing FormText values while typing
#21300
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
base: release_25.1
Are you sure you want to change the base?
[25.1] Use focus/blur to prevent prop updates from changing FormText values while typing
#21300
Conversation
|
The test errors look legitimate to me. Maybe debounce is not the right thing? it seems that other fields are fine, is that maybe because |
ced3fd1 to
f4528ed
Compare
|
I tried a slightly different approach thought it is still via a debounce. Seleniums are still failing (though fewer fails than earlier) and possibly related? Will investigate the fails to confirm. |
|
Yes, likely still related |
…` values while typing Fixes galaxyproject#21205
f4528ed to
b396761
Compare
FormText values while typing
|
Used a strategy that seems to work well!: Used a combination of blur and focus to prevent prop values from replacing currently typed values (if currently in the focus state, wait for the user to complete typing before replacing with the prop value coming from the backend -> which is eventually replaced by the final typed value if needed). |
|
Have you tried artificially returning values out of order ? I think this is the real issue in production ? I'm not seeing logic that would handle that ? That's what LastQueue does |
| }, | ||
| onBlur() { | ||
| // When field loses focus, sync with the latest prop value | ||
| this.isFocused = false; |
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.
This seems backwards, it's cool that things update in the editor as you type
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.
Things will still update as you type in the editor though, it's just that if for some reason the getModule update tries to change a FormText field's value while the user types, this prevents that (so it's the other way around?).
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
5d68d86 to
2fe3c33
Compare
But aren't we already using galaxy/client/src/components/Workflow/Editor/Index.vue Lines 1048 to 1062 in bf9ea7d
... which this propagates all the way up to? |
We have a bug where in the workflow editor, while typing in a text form element, the value can get unexpectedly trimmed or reset because of the
build_moduleAPI call updating the values. Using a combination of blur and focus to prevent prop values from replacing currently typed values is a solution to this.Fixes #21205
debounce_form_element_text_input_BEFORE.mp4
debounce_form_element_text_input_AFTER.mp4
How to test the changes?
(Select all options that apply)
License