You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Submit button for the static html task is rendered from within the blueprint. This makes it difficult for users to control, e.g. in cases where they may want to disable the button.
Although we do recommend folks to use React, I think to help transition users with existing projects into using Mephisto, we should support use cases such as this.
Adding an in-line comment to the demo onboarding file in the examples folder explaining why the Submit button isn't shown there and how to "access" it for customization. This is a source of confusion initially for users.
One workaround at the moment is to do something like document.querySelector("button[type=submit]").disabled = true;. At the least, we should add an HTML ID to the submit button to make it easier to target
Allow the default submit button to be "hidden" so users can provide their own implementation. Perhaps configurable via setting a global variable, a la window.HIDE_MEPHISTO_SUBMIT_BUTTON = true. Or perhaps via Hydra config. @JackUrb any recommendations/preferences?
I imagine that it makes sense to control the button via a global variable just because then the code for inserting a personal submit button would be colocated with this option set. It would be doable with hydra, but that feels like it'd be far away from the use of it.
The Submit button for the static html task is rendered from within the blueprint. This makes it difficult for users to control, e.g. in cases where they may want to disable the button.
Although we do recommend folks to use React, I think to help transition users with existing projects into using Mephisto, we should support use cases such as this.
Mephisto/mephisto/abstractions/blueprints/static_html_task/source/dev/app.jsx
Line 122 in 07791f2
Recommendations:
document.querySelector("button[type=submit]").disabled = true;
. At the least, we should add an HTML ID to the submit button to make it easier to targetwindow.HIDE_MEPHISTO_SUBMIT_BUTTON = true
. Or perhaps via Hydra config. @JackUrb any recommendations/preferences?cc/ @edwardguo61
The text was updated successfully, but these errors were encountered: