Page MenuHomePhabricator

CodeEditor: When selecting ZCode language, the CodeEditor is not set back to disabled=false
Open, In Progress, HighPublicBUG REPORT

Description

Description

When the ZCode language is not selected, the CodeEditor is disabled, after this change: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikiLambda/+/1047501

However, the disabled is not reset to false when the language is chosen.

Steps to reproduce:

  1. Go to https://wikifunctions.beta.wmflabs.org/w/index.php?title=Special:CreateObject&Z14K1=Z10014&uselang=en&zid=Z14
  2. Select "code" implementation
  3. Select language from the dropdown
  4. Try to write some code inside the code editor area

Observed behavior:

  • The field is disabled, although the style is set to the enabled state

Expected behavior (Acceptance criteria):

  • Every time the field has a chosen language (on edit and on create) the field should be editable

Technical details

Similarly to the "readOnly" watcher, "disabled" prop should also have a watch that triggers re-setting the option in the ACE editor


Devices and Design (URLs or screenshots, if applicable):

  • Desktop: ...
  • Small screens/mobile: ...

Completion checklist

Event Timeline

Change #1049836 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] CodeEditor.vue: add watcher for disabled state

https://gerrit.wikimedia.org/r/1049836

Change #1049836 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] CodeEditor.vue: add watcher for disabled state

https://gerrit.wikimedia.org/r/1049836

Change #1049857 had a related patch set uploaded (by Jforrester; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@wmf/1.43.0-wmf.11] CodeEditor.vue: add watcher for disabled state

https://gerrit.wikimedia.org/r/1049857

DSmit-WMF changed the task status from Open to In Progress.Wed, Jun 26, 12:19 PM

Change #1049857 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@wmf/1.43.0-wmf.11] CodeEditor.vue: add watcher for disabled state

https://gerrit.wikimedia.org/r/1049857

Mentioned in SAL (#wikimedia-operations) [2024-06-26T13:59:09Z] <jforrester@deploy1002> Started scap: Backport for [[gerrit:1049857|CodeEditor.vue: add watcher for disabled state (T368504)]]

Mentioned in SAL (#wikimedia-operations) [2024-06-26T14:01:52Z] <jforrester@deploy1002> jforrester: Backport for [[gerrit:1049857|CodeEditor.vue: add watcher for disabled state (T368504)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-06-26T14:07:10Z] <jforrester@deploy1002> Finished scap: Backport for [[gerrit:1049857|CodeEditor.vue: add watcher for disabled state (T368504)]] (duration: 08m 00s)