Page MenuHomePhabricator

When creating an implementation, the Publish button is clickable even when only boilerplate code is there
Closed, DeclinedPublic

Description

If I open a function and click the + to add an implementation, the default will be composition and not code, and the Publish button will be grayed out.

If I change from composition to code, the code field will be an empty textarea (with syntax highlighting), the language field will be an empty dropdown, and the Publish button will be grayed out. So far, so good.

If I select "javascript" or "python" as the programming language in the dropdown, short boilerplate code will be inserted into the textarea, and the Publish button will become clickable.

Is it by design? It would make more sense to me to make it clickable only after I change the boilerplate. Is there ever a reason to publish the boilerplate that doesn't do anything?

Another small corollary is that if select a specific programming language from the dropdown, but then change back to composition, the publish button stays clickable, but if I actually try to click, the user interface complains that I didn't fill the function for the composition. I guess that it's not harmful, but it would make more sense to me if the Publish button went back to grayed out.

Event Timeline

Amire80 renamed this task from When creating an implementation, the Publish button is to When creating an implementation, the Publish button is clickable even when only boilerplate code is there.Jul 17 2025, 12:02 PM
Amire80 updated the task description. (Show Details)
Jdforrester-WMF changed the subtype of this task from "Bug Report" to "Task".Jul 23 2025, 3:35 PM
Jdforrester-WMF subscribed.

This is akin to MW's edit tools letting you submit blank/auto-created sections without much obvious value. Leaving to Product to decide if this is wanted behaviour.

Product: Let's not divert away from MW standards here.