Page MenuHomePhabricator

VE Dialog on the Test Instance: Add undocumented parameters
Closed, ResolvedPublic3 Estimated Story Points

Description

Adjusting the 'Add more information' component to only add undefined parameters. The search functionality will be moved to the sidebar in T263474: VE Dialog on Test Instance: Search for parameters within a template. Implement T261504: VE on Test Instance: Change behavior for adding/removing params and T263474: VE Dialog on Test Instance: Search for parameters within a template before working on this task.

Requirements

  • Confirm that T265029 works when removing an undocumented parameter or the parameter placeholder
  • Rename title to 'Add undocumented parameter' in sidebar and in main component
  • Add description underneath the title: 'Add an undocumented parameter by typing the name below and clicking to add it to the template'
  • Change placeholder text in the field: 'Type name of parameter'
  • Hide dropdown until typing (currently says 'No unused fields')
  • Add trashcan in sidebar when component is in use, but user has not clicked to add the parameter yet, to remove the dropdown component without having to add a parameter first
  • After clicking to add a parameter, remove dropdown component and add the parameter to the template, shown in the sidebar as a selected checkbox. Add to the bottom of the list, in the order that they are added.
  • If an undefined parameter is added, then unchecked, it removes it from the template completely (and outline element disappears). Then it can only be added back by going through the same process
  • The add parameter component should should always be at the bottom of the content pane, even if other parameters are added while it's visible
  • When editing an existing template, include any undocumented parameters present in the wikitext, in the sidebar.

Note: validation/notice is added in T263405: VE Dialog on the Test Instance: Implement soft validation

Mocks

With TemplateData - add parameter.png (642×700 px, 54 KB)
With TemplateData - add parameter-1.png (642×700 px, 56 KB)
With TemplateData - add parameter-2.png (642×700 px, 51 KB)

Event Timeline

Lena_WMDE renamed this task from DRAFT - VE Dialog on the Test Instance: Add parameter to VE Dialog on the Test Instance: Add parameter.Sep 23 2020, 8:04 AM
Lena_WMDE moved this task from Backlog to Ready for pickup on the WMDE-Templates-FocusArea board.

Note that this task is currently blocked by subtasks.

Whoever does this task should know that the "Add content" button is implemented in the new_sidebar branch and then reverted in https://gitlab.com/wmde/mediawiki-extensions-VisualEditor/-/commit/8f59115ac33909b06aec1bd81697e166c76f1956 .

ECohen_WMDE renamed this task from VE Dialog on the Test Instance: Add parameter to VE Dialog on the Test Instance: Add undocumented parameters.Oct 13 2020, 10:07 AM

Results of scoping discussion
Discussed a back-up plan if you start running into difficulties with the sidebar @Andrew-WMDE:

  • keep the current location of the trashcan (next to the title of the adding component), instead of putting the trashcan in the sidebar
  • the sidebar item would still need to be added, which then becomes a checkbox (matches the behavior described in the ticket)

@Andrew-WMDE Is there a branch for this yet? I was going to peek at the current state and see if I can carve off an unobtrusive subtask...

Andrew-WMDE changed the point value for this task from 5 to 13.Oct 20 2020, 10:48 AM
Lena_WMDE changed the point value for this task from 13 to 3.Oct 21 2020, 8:09 AM
awight added a subscriber: Andrew-WMDE.

Another edge case to fix: Given {{!!}}{{!!|undoc=foo}}{{DMCA|1=lol}}, we're currently unable to add undocumented parameters to the first "!!" template.

Several conditions cause the "Add parameter" option to become permanently disabled--sometimes, immediately after clicking on a label to select a parameter.

Update: this seems to have been fixed.

Given that an undocumented parameter "abc" already exists on a template,
When I try to add another undocumented parameter with the same name,
Then ...

Currently, the autocomplete list becomes empty, and the <return> key doesn't submit the new parameter. There is no visual feedback explaining why the parameter can't be added.

Another edge case to fix: Given {{!!}}{{!!|undoc=foo}}{{DMCA|1=lol}}, we're currently unable to add undocumented parameters to the first "!!" template.

This is the last detail I'm planning to work on. My plan is to make the template title selectable. Once a template is selected, the "Add parameter" will apply to that template.

Noting here for the record: after daily decided that this last functionality is not necessary for testing and will not implement (adding undocumented parameters to templates without parameters). Even though this is definitely an important use case, we are not testing this feature.

awight removed awight as the assignee of this task.Nov 2 2020, 5:03 PM
thiemowmde claimed this task.