Page MenuHomePhabricator

DefaultView: Create ZImplementation View and Component
Closed, ResolvedPublic

Assigned To
Authored By
JKieserman
Jan 19 2023, 4:55 PM
Referenced Files
F36855116: image.png
Feb 16 2023, 2:16 PM
F36754580: image.png
Feb 6 2023, 1:07 PM
F36754567: image.png
Feb 6 2023, 1:07 PM
F36754561: image.png
Feb 6 2023, 1:07 PM
Tokens
"Party Time" token, awarded by AAlhazwani-WMF.

Description

Description

  • Create ZImplementation custom component following the same patterns as other default/* components created for the DefaultView
  • Create ZImplementation view page, which shows the ZImplementation component as central content, plus other pieces that enrich the implementation creation:
    • function data panel
    • direct navigation with url setup of function ID
    • tester table
    • etc

Desired behavior/Acceptance criteria

  • Objects of type Z14/Implementation should be rendered by default with this component in both edit and view mode
  • Editing the selector should effectively set the correct key: Z14K2 or Z14K3
  • The correct views for Z14K2 or Z14K3 should be accordingly rendered
  • Styles according to the attached designs*

Devices and Design (URLs or screenshots)

Figma: https://www.figma.com/file/AZmeEwIq2H2Et4hvjs3J82/implementation-T327421?node-id=90%3A13080&t=QmupPlZ6WPfamK0I-1


Completion checklist

Event Timeline

here's a proposal for the zimplementation component, ready for review before drafting the design specs @gengh and @DVrandecic

if we create an implementation from scratch, for example from the 'Create a new object' flow, we display an untitled implementation, where both the function selector and the type selector are empty

image.png (1×2 px, 111 KB)

once an editor selects a function, or if they come from the 'Create a new implementation' link from a function details page, we display the selected function with a 'Show details' call to action. this action displays (inline) the inputs and output of said function, plus a call to action to directly go to the function page (we could/should open this in a new tab?)

image.png (1×3 px, 152 KB)

the type selector is unselected by default, once an editor picks one of the two (binary) options, we display the corresponding component.

image.png (1×3 px, 150 KB)

here's the link to the figma file if you prefer to leave comments over there https://www.figma.com/file/AZmeEwIq2H2Et4hvjs3J82/zimplementation-T327421?node-id=1%3A20275&t=Fq7SGd9mQbAeO35s-1

This is great, thank you!

I was wondering if we could put the function signature, i.e. the input and output types into one of the side columns instead over the main content, in order to give more space to them in parallel.

I was also wondering if, once we have the function selected, we should display the relevant testers, and offer a button to run those. Preferably also in one of the side columns.

gengh renamed this task from DefaultView: Create ZImplementation Component to DefaultView: Create ZImplementation View and Component.Feb 8 2023, 5:54 PM
gengh updated the task description. (Show Details)

the figma file is ready for review @DVrandecic @gengh, link in description. for additional visibility, here an example (in both read, and edit mode) displaying the different parts of the implementation view, and component:

left-side sidebar

  • label box
  • function viewer

center content area:

  • function implementation (code or composition)
  • documentation TBD

right-right sidebar

  • evaluate function TBD
  • testers

image.png (1×2 px, 280 KB)

gengh removed a project: Design.
gengh added a subscriber: AAlhazwani-WMF.

Designs approved and ready for development! \o/

Change 909297 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Add Implementation Component

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

Change 909297 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add Implementation Component

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

I don't see the testers and the function data panel yet on the implementation:

https://wikifunctions.beta.wmflabs.org/wiki/Z10748?view=default-view

https://wikifunctions.beta.wmflabs.org/wiki/Z10748?view=default-view&action=edit

Having said that, I am happy with filing own tasks for that, but just wanted to make sure here.

@DVrandecic yes! once we do the "switch" we will inherit the function explorer widget, and the tester widget that you can find at the bottom of this page for instance https://wikifunctions.beta.wmflabs.org/wiki/Z10748

Yes, now that the switch is one, I see it! Thank you!