Page MenuHomePhabricator

Implementation: When editing, the UX for the Code block doesn’t update when a function is selected until you switch to composition and back
Open, Needs TriagePublicBUG REPORT

Description

Description

Steps to reproduce:

  1. Navigate to https://wikifunctions.beta.wmflabs.org/wiki/Special:CreateZObject?zid=Z14&Z14K1=Z801 to create a new Implementation for Z801/Echo
  2. Select 'Code' for Implementation type and 'JavaScript' for Language
  3. [Observe contents of Code block]
  4. Change function to Z802/If
  5. [Observe contents of Code block]
  6. Switch Implementation type to 'Composition' and back to 'Code'
  7. [Observe contents of Code block]

Observed behavior:

  • Initial code block is pre-filled with function Z801( ) { … } – doesn't add the input (Z801K1)
  • Code block isn't updated when target function is changed – still for Z801
  • Re-created code block is correct after switching back from Composition to Code: function Z802( Z802K1, Z802K2, Z802K3 ) { … }

Expected behaviour (Acceptance criteria):

  • Initial code block should be function Z801( Z801K1 ) { … }
  • On changing function, the code block should be updated to function Z802( Z802K1, Z802K2, Z802K3 ) { … }
  • Switch Implementation type to 'Composition' and back to 'Code' should not create a difference.

Completion checklist