Page MenuHomePhabricator

In absence of any fields we should show an appropriate message to the user
Closed, ResolvedPublic1 Estimated Story Points

Description

The current design is:

image.png (708×1 px, 63 KB)

When there are no fields, we shouldn't say that the fields have been auto-generated. The message should say that there are no parameters in the template.

  1. With templatedata, in black text in a separate paragraph before or after the template description:
    • There are no parameters defined in this template's TemplateData documentation. You may insert the template without parameters.
  2. Without templatedata, in orange text like the current no-templatedata message:
    • No parameters could be determined for this template due to absence of TemplateData documentation. You may insert the template without parameters.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@cmadeo I'd like to have your thoughts on this ticket. Thanks!

Since there are no fields, should we also remove the separator line?
If removing the line is hard to do, then we might want to consider still having the header 'Optional fields' show with a list item of 'None' or 'No fields available'. Otherwise it looks a bit like it's a loading error on first glance and not a lack of fields / data.

Changing the top message sounds sensible. And I like your idea @cmadeo of keeping the 'optional fields' header and adding a message below it. It wouldn't be too hard to only show one panel, but I think keeping them both makes sense (people would already be used to seeing two and so would know more where to look to find the parameters, and there they'd see the notice).

We could also add a '(no parameters)' message to the search results list, along with the description (we're already retrieving the data at that point, so it wouldn't cost anything). Maybe even add a parameter count there for all templates?

@Samwilson, having slept on it, I agree that keeping both panels and including the no fields message is clearest.
Adding a no parameters message to the search result list also sounds very helpful.

Keeping both panels sounds good. The message can be something like: "There are no parameters specified for this template."? More ideas? I believe it will be the same color shade as the message for Auto-generated fields?

About adding the number of params to the search list - it's a nice to have but we can skip it for now. When we do add it, we need to be wary of not expanding the height of the search element. Maybe it can appear on the right side across from the template title. I made a ticket for it here: T198981

Niharika set the point value for this task to 1.
Niharika moved this task from To Be Estimated/Discussed to Estimated on the Community-Tech board.

In T198981#4448594, @Mooeypoo pointed out that users could want to use this for templates which don't have any parameters. We should make it clearer in the messaging that the template can be inserted even if there are no fields present. We can rephrase the message wording as: There are no known parameters for this template. You may insert the template without the parameters.
Thoughts on this? More ideas?

We could have separate messages for no-parameter templates that do and don't have templatedata. Of course, there's the possibility that templatedata has been defined incorrectly (i.e. no parameters listed, but there are actually some), but that's hopefully not too common. The messages could be:

  1. With templatedata, in black text in a separate paragraph before or after the template description:
    • There are no parameters for this template. You may insert the template without parameters.
  2. Without templatedata, in orange text like the current no-templatedata message:
    • No [TemplateData] has been defined for this template, and no parameters could be auto-generated. Please be aware that this may not be accurate.

(Although, I think the phrase "auto-generated" should be removed from here and the other message, but that's a separate issue and certainly the way we refer to guessed params should match everywhere.)

Change 447978 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/TemplateWizard@master] Fix i18n message params and remove unused message

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

Samwilson moved this task from Ready to In Development on the Community-Tech-Sprint board.

This first patch is just a little thing to correct some out-of-date messages. Proper one for this task will be here soon (if you think my two-message idea above is the way to go?).

Sounds good to me. Let's do two messages.

We could have separate messages for no-parameter templates that do and don't have templatedata. Of course, there's the possibility that templatedata has been defined incorrectly (i.e. no parameters listed, but there are actually some), but that's hopefully not too common. The messages could be:

  1. With templatedata, in black text in a separate paragraph before or after the template description:
    • There are no parameters for this template. You may insert the template without parameters.
  2. Without templatedata, in orange text like the current no-templatedata message:
    • No [TemplateData] has been defined for this template, and no parameters could be auto-generated. Please be aware that this may not be accurate.

Just a very quick 2c from me (and I'm an English-as-second-language person, so please feel free to ignore this 😺 )

I think it's unnecessarily technical. Users may not know what TemplateData is, and they probably shouldn't; as far as they're concerned, there are no identified parameters -- whether it's because we didn't have the preset knowledge with TemplateData or because we couldn't parse the template, is more "our" business than theirs. Power users who care about this can be appeased by a small note in the extension help page where we can explain that when no params are found it could be because both templateData and auto-generation failed.

So, I'd recommend something more along the lines of:

"No parameters found for this template. You may insert the template without parameters, or add parameters manually."

For both cases.

I might be wrong, but I don't know if the user really cares whether there aren't parameters because technical-reasoning-that-might-be-nuanced-A or technical-reasoning-that-might-be-nuanced-B. If we do want to go a little more nuanced, we can split the messages but stay user-language. Something like this:

  • (with TemplateData but no params) "This template has no parameters defined. You may insert the template without parameters."
  • (without TemplateData and no auto-generation) "No parameters were found for the template. You can insert it without parameters, or add parameters manually after insertion."

I would shy away from any technical language -- either autogeneration or "TemplateData". We should assume, I think, that most editors don't know what those are.

Does that make sense?

@Mooeypoo One of the goals from this messaging is to make people aware of TemplateData's existence is and encourage them to use it. A lot of the smaller wikis seem to have no clue and don't use it at all, like Hindi wikipedia. I would be against removing TemplateData from the wording. It's not plain-text either, it's a link so people can click on it and read more about TemplateData if they are curious. TemplateData is really easy to add and it's not at all something that only power users can do. Anyone can add it pretty easily.

We can get rid of 'auto-generation'. We use that word in another message as well so we should find a suitable alternatives for it in both messages.

@Mooeypoo One of the goals from this messaging is to make people aware of TemplateData's existence is and encourage them to use it. A lot of the smaller wikis seem to have no clue and don't use it at all, like Hindi wikipedia. I would be against removing TemplateData from the wording. It's not plain-text either, it's a link so people can click on it and read more about TemplateData if they are curious. TemplateData is really easy to add and it's not at all something that only power users can do. Anyone can add it pretty easily.

We can get rid of 'auto-generation'. We use that word in another message as well so we should find a suitable alternatives for it in both messages.

Maybe, but the target audience are general editors, who don't know about TemplateData, so the mention of it is confusing. If we want to raise attention to it, we could phrase it in less technical terms or specifically point people to it. For instance, for templates that don't have templatedata, we can have a message saying "This template is missing the technical documentation needed for displaying the fields for you. If you want to fix this, plase read more [here]" and send them to the TemplateData dialog for the template.

My point is that I think we're using overly-technical jargon (With TemplateData as well as auto-generated) in a place that I don't think really delivers the goal we want.

That said - I am by far much less familiar with the general workflow of editors and the purpose of this product, so while I share my opinion, your final judgment is obviously the one that actually counts here. I just wanted to raise this as a potential confusion-point for general users.

Change 447978 merged by jenkins-bot:
[mediawiki/extensions/TemplateWizard@master] Fix i18n message params and remove unused message

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

I don't think I quite agree that the wording is confusing. Yes, there will be people reading this who have no clue what 'TemplateData' means. That's why it's a link.
One of the goals is to make people more aware of TemplateData and that will only happen if they click that link and read that term when they use the editor. Once they read it, they'll know what it is and from then on they may choose to ignore it every time it comes up or take the initiative to add TemplateData to the template.

I'm actually looking forward to seeing if deploying TemplateWizard generates an uptick in TemplateData usage on wikis.

I've tried to make them simpler. What do you think of these:
With TemplateData: There are no parameters defined in this template's TemplateData. You may insert the template without parameters.
Without TemplateData: No parameters could be determined for this template due to absence of TemplateData documentation. You may insert the template without parameters.

The last one isn't exactly accurate but I think that's fine. And I took out Please be aware that this may not be accurate because it felt redundant with the first sentence. I don't think we need to point out that they can add parameters manually afterwards. It'll be fairly obvious after their first use.

I still think the term itself is internal, so I'd say we should call it "template definition" rather than naming the technical name of the extension. The result is the same - the user will understand the template lacks the required technical definition, but won't be confused with some term that sounds like it's brand namey sort of thing.

So even going with "There are no parameters defined in this template's [definition]. You may insert the template without parameters"

Where "definition" links to the template data page, is, in my opinion, better.

I always feel like when we insert product names in messaging (and not just us, a lot of online products) it feels more about knowing the brand name than it is about what you actually want to do, sometimes to the level of feeling distancing. It's terminology you end up picking up as a user, but one you shouldn't necessarily encounter as the replacement for the concept, if that makes sense.

But this is totally and utterly bikeshedding. I don't think it's crucial, and I'll adhere to your expertise here.

My feeling is that throwing the feature name out there leads to more awareness of its existence. In this case especially, the term TemplateData is not all that far from what it actually is for. It's not like Flow or Echo which are more abstract, so it makes sense to me to keep it in this case. Brand recognition is not a bad thing. :)

As far as linking to the TemplateData page goes, I would be wary of sending the user directly to the editor. It can be confusing to use if you're not familiar with it. For that reason, I prefer linking to the TemplateData docs in a new tab. Also, to my knowledge, there is no way to directly link to the TemplateData editor dialog for a template.

Do we want to show both the no-description message and the no-parameters message (where there is templatedata). At the moment, it's just the latter.

nodesc.png (66×698 px, 4 KB)

Screenshot_2018-07-27 Editing Main Page - Dev Wiki wiki1.png (86×698 px, 7 KB)

Change 448328 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/TemplateWizard@master] Add new messages for when there are no template parameters

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

Do we want to show both the no-description message and the no-parameters message (where there is templatedata). At the moment, it's just the latter.

nodesc.png (66×698 px, 4 KB)

Screenshot_2018-07-27 Editing Main Page - Dev Wiki wiki1.png (86×698 px, 7 KB)

Just the latter is fine. Although I wonder, if there is no description and no parameters, what does it mean for the template to have TemplateData?

what does it mean for the template to have TemplateData?

Not much! :-) It's surely a pretty unlikely occurrence.

Above patch is ready for review then.

Change 448328 merged by jenkins-bot:
[mediawiki/extensions/TemplateWizard@master] Add new messages for when there are no template parameters

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

Niharika moved this task from QA to Q1 2018-19 on the Community-Tech-Sprint board.