Wikipedia:Workflow improvements
This idea is in the brainstorming stage. Feel free to add new ideas; improve, clarify and classify the ideas already here; and discuss the merits of these ideas on the talk page. |
Wikitext forms are awful! If I have to fill out another form that has {{subst:void}} or HTML comments everywhere, I'm going to get extremely irritated.
Let's replace wikitext forms with real forms. WP:RFPP is an example of this. You used to have to fill out this form, but now you can fill out this form.
There are multiple ways to proceed. We could go individually, process by process, making custom scripts for each. We could also try to come up with a way to let people specify a form in JSON, so that creating and editing forms would be easier. (Yes, this has been done before: for example, mw:Extension:FormWizard. But that's sort of stalled.)
We could go even further with the JSON idea: once you've specified a form, there should magically be a script that lets you review requests; there should be an archiving bot; and there should be a tool that lets you search through requests. Right now, for each process, these four things (requesting, responding, archiving, searching) all need to be done from scratch. That's a big waste of time.
So let's talk about this! The talk page is open for business.
Potential venues
[edit]- WP:Edit requests
- WP:RFPP - JS request form
- WP:PERM - wikitext request form, search tool (broken)
- WP:XfD - request form in Twinkle (works, no need to mess with it)
- WP:RM/TR
- WP:DYK - workflow too complicated, probably
- WP:BRFA - user-script request form
- WP:DRN - JS request form
- WP:ANI - automatically leave notices on user talk pages!
- WP:AFC/R
- WP:Teahouse
- WP:ITNC
- WP:GAN
- WP:EF/FP
Timeline
[edit](Leaving out many previous attempts to do this, I'm sure...)
- meta:Community Wishlist Survey 2021/Miscellaneous/Input Forms
- Wikipedia:Village pump (idea lab)/Archive 37#Bold idea: the Generic Queue Toolkit - initial discussion, August 2021
Shared functionality
[edit]- Live preview. Perhaps have the user write a function to create the wikitext for the submission given the current state of the form inputs, then provide
activatePreview(/* jQuery object */ previewContainerElement, /* function */ createSubmissionWikitext);
? - Automatically add signature where possible - and indicate this clearly in preview.
ensureSignatureAtEnd(wikitext)
? - Input validations. Provide
doesPageExist()
? - beforeunload handler: you shouldn't be able to accidentally navigate away from the form and lose any entered text.
activateBeforeUnloadHandler(formContainer)
(the handler goes through each form input and checks if any have non-default values)? - Gracefully handling failures: If the browser crashes, you should be able to retrieve the "lost" content from the browser localStorage. If the submission failed for an unexpected reason, again the form contents entered should be recoverable.
activateFormPersistence(formContainer)
(every N seconds, or every keystroke (TBD), form inputs saved to localStorage)? - Transcluding requests:
transcludeUnderMarkerComment(...)
(looks for exactly<!-- Add new entries below this line -->
),transcludeUnderDateHeading(...)
(for DYK or ITNC) - Status log for displaying a list of status messages to the user as a request gets submitted
- ...
Sample script
[edit]const MAIN_REQUEST_PAGE = '...';
function createSubmissionWikitext() {
var wikitext = '';
for (/* each form input */) {
// modify wikitext appropriately
}
return ensureSignatureAtEnd(wikitext);
}
function validate() {
// ... (display error messages as appropriate)
return isValid;
}
function displayForm(formContainer) {
// append each form input to formContainer, wiring up input validation
activatePreview($("#preview"), createSubmissionWikitext);
activateBeforeUnloadHandler(formContainer);
activateFormPersistence(formContainer);
$("#submit").click(function() {
if (validate()) {
var statusLog = startStatusLog();
var requestSubpageName = MAIN_REQUEST_PAGE + '/' + $('#name').val(); // for example
createRequestSubpage(requestSubpageName, createSubmissionWikitext(), statusLog, /* ... */);
transcludeUnderMarkerComment(MAIN_REQUEST_PAGE, requestSubpageName, statusLog, /* ... */);
}
});
}
if (mw.config.get('wgArticleId') === /* form page */) {
displayForm($('#form'));
}
See also
[edit]- mw:Flow (RIP - because this was in the original spec somewhere)