Page MenuHomePhabricator

Don't disable buttons on failed validation, instead, surface errors and highlight missing fields when button is clicked
Closed, ResolvedPublic

Description

Per this slack thread - buttons should always be enabled, and we should show clear error messages when the expected action does not happen. The following buttons are conditionally disabled:

  • Save Function button (this button will be removed as part of T321381)
  • Call Function button
  • Save ZObject (this button will be removed as part of T321381)

Event Timeline

gengh renamed this task from All buttons should be clickable by default to Don't disable buttons on failed validation, instead, surface errors and highlight missing fields when button is clicked.Oct 10 2022, 9:53 AM
gengh added a project: WikiLambda.
gengh moved this task from To triage to Phase θ – Throttling on the Abstract Wikipedia team board.

 Per this slack thread - buttons should always be enabled

I don't have access to slack and I am willing to take this issue. Could you put here a summary of the exchange please?

Yes!

Basically we are shifting the model generally from "You can't click a button until you have reached a particular state" to "you can click a button at any time, and the front end will decide if you are in a state that can communicate with the backend."

What's nice about this is:

  1. we don't need to overload the UI with things about what is/isn't required or explaining why the button isn't clickable
  2. we can instead work on making errors very specific and visible inline

Let me know if more information would be helpful!

Thanks Julia for the details!

This task is closely related to the Publish component development (T321381, being addressed by @Ddwaal-WMF) as well as the error handling task (T315099, being addressed by @JKieserman).

For that reason, the current "Save Function" and "Save ZObject" buttons will disappear.

To avoid conflicts and overwriting each other work, this task should just be limited to the "Call Function" button, and removing the restrictions that conditionally disable it.

Removing myself in favor of T320388. I may take it back later, but until then, I don't mind if anyone claim it!