Page MenuHomePhabricator

[Task] Mention that a page is ArticlePlaceholder generated
Closed, ResolvedPublic3 Estimated Story Points

Description

Context:
Extension:ArticlePlaceholder

User story:
As a reader, I want to be informed about articles that are automatically created to understand where the information is coming from and what options I have.

Problem:
Currently, no information like this is shown (e.g. https://se.wikipedia.org/wiki/Erenoamáš:AboutTopic/Q13520818). Thanks to @lucamauri we now have a patch for this.

Mockup:

automatic-preview.png (1×1 px, 563 KB)

Acceptance Criteria:

  • patch is reviewed
  • text change is made (-> "This is an automatic view based on data from [repoSiteName with link to source entity].<br />There is no article on this topic yet, but you can help to create one.").

Original:
Either by showing a little dialog, like it is done post edit, or by showing a message like on edit preview.

Event Timeline

Lucie claimed this task.
Lucie raised the priority of this task from to Medium.
Lucie updated the task description. (Show Details)
Lucie subscribed.
hoo renamed this task from [Task] Add mention this page is a ArticlePlaceholder generated page to [Task] Mention that a page is ArticlePlaceholder generated.Jan 22 2016, 5:15 PM
hoo claimed this task.
hoo updated the task description. (Show Details)
hoo set Security to None.
hoo added a subscriber: Lydia_Pintscher.

@hoo How's the progress on this one going? Should we have a short chat about it soon?

Possible message:

This is not a Wikipedia article, but an ArticlePlaceholder generated from the wikidata item [[Qxxxx]]. You can see the list of contributors [here].

Lydia_Pintscher added subscribers: Jan_Dittrich, hoo.

Me and @Jan_Dittrich need to come up with a good wording.

I made a quick exploration during the Wikimedia-Developer-Summit (2017) in this area.

The goal was to communicate the following:

  • The content displayed is not a regular article. Preferably not as an error or in a negative way since the content provided is useful.
  • Users can still create an article on the topic, and they are welcome to do so.

I explored some alternatives based on the following ideas: using the background color to distinguish data from other content, explain briefly the key ideas defined above and provide a clear call to action without distracting from the content.

The alternatives represent variations on the prominence for the message:

A) Showing a message on top of the card area

automatic-preview.png (1×1 px, 563 KB)

B) Showing a panel from the bottom of the viewport

automatic-preview-bottom.png (1×1 px, 565 KB)

C) Integrating the information as another card

automatic-preview-card.png (1×1 px, 563 KB)

D) Keeping cards in the right column (where people are used to see infoboxes) to make it more obvious that the article is missing (sidebar can be kept while editing to facilitate the creation of the article)

automatic-preview-sidebar.png (1×1 px, 499 KB)

I think stuffing all of the content into the right/a single column/some such as in D "distracts from the content", though the subtle hint the blank space leaves is cute.

Bottom of the viewport seems like it's not going to have a high impact factor (page-reading studies).

Integrating on the right seems like it could get lost or forgotten (or misses the "oh, I can change things" call to action).

Top feels good, but is also a little distract-y.

What kind of user is this message+button (or message, or button) targeting?

Lydia, Lucie and I like option b) most. We would like for it to be dismissible (for a single page view only), but we're not sure what would happen to the create a page button… would it move to the bottom of the page body like we have it now?

My 2cnt:
a) Integrates very well. People are used to notifications/boxes at this place
b) Similar to a, but may be a bit distracting, since it is an unusual position (do we have it anywhere else?).
c) Semantically problematic; some boxes are data, one is a dialog
d) I like it; semantically it is the best imho,though with the current design we get some space concerns.

What kind of user is this message+button (or message, or button) targeting?

I think there are two main scenarios by different users we want to consider for this:

  • A reader that just wants to get a piece of information (e.g., the population of Mumbai) and it is able to find it.
  • A casual editor that wants to expand the "article" and we want to make it clear that it is possible, and how to do it.

These different solutions have different pros and cons. I'd recommend putting them in front of some users and check if they are able to (a) find the information without much distraction, (b) understand that the article can still be created and (c) identify how to create it. From our perspective these questions may be clear, but some users may have not even heard about Wikidata before.

What kind of user is this message+button (or message, or button) targeting?

I'd recommend putting them in front of some users

In case it helps, the original Sketch file is

and I made SVG exports out of it for those using other editors:

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see https://phabricator.wikimedia.org/T228575#6237124 for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)

lucamauri subscribed.

For my own purpose, I am implementing this interface element on my own Wikibase instance.
I choose a layout along the lines of the design shown in option A, so I am claiming this task and I will soon post my code contribution.
I hope you'll find it satisfying.

Change 703661 had a related patch set uploaded (by Luca Mauri; author: Luca Mauri):

[mediawiki/extensions/ArticlePlaceholder@master] Add an explanatory message

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

Lydia_Pintscher added a subscriber: Manuel.

Oh awesome. Thank you Luca.
@Manuel handing over to you for code review in camp.

The term "data" is very obscure to new users. We should explicitly mention that the data come from Wikidata.

The term "data" is very obscure to new users. We should explicitly mention that the data come from Wikidata.

"data" might be obscure, but "Wikidata" is not applicable. Remember this extension can be installed on any Wikibase-enabled Mediawiki instance, not only Wikidata.
We might use repoSiteName to name the instance.
I see you made a suggestion earlier in this conversation and I also see that @Lydia_Pintscher and @Jan_Dittrich should have contributed with text, so I am not sure how the decision process should be here.
At any rate, the text is contained in a message so it's easily editable as soon as we reached a decision here.

Hi @lucamauri, pretty cool, thank you! I made a suggestion about the message text. What do you think? Would you like to make the change or should the Wikidata team?

Addshore set the point value for this task to 3.Jul 14 2021, 10:51 AM

Hi @lucamauri, pretty cool, thank you! I made a suggestion about the message text. What do you think? Would you like to make the change or should the Wikidata team?

Thanks :-)
I think your proposal makes much sense. I'll work on implementing it in the coming days.

Quick recap of the open tasks related to this modification as suggested here and in Gerrit (by @Lucas_Werkmeister_WMDE and @Ladsgroup):

  • Implement the new message with link
  • Add database icon image as internal resource
    • possibly submit it as new graphics in OOUI
  • remove CSS class mw-articleplaceholder-createarticle-buttons for the now unused "Create an article" button's DIV
  • Use Html::messageBox() to envelop the messagebar

Hi @lucamauri, pretty cool, thank you! I made a suggestion about the message text. What do you think? Would you like to make the change or should the Wikidata team?

It seems I have underestimated the complexity of this task. While modifying the message is straightforward, generating the link is not.
My line of reasoning is that I should instantiate the WikibaseClient::getRepoLinker class to call the getEntityUrl() function, but I am unable to do so.
Anyone can point me to documentation or code examples on how use the function?
Any help will be appreciated. Thanks a lot.

@Lucas_Werkmeister_WMDE or @Michael could you please help? Maybe it is me who has underestimated the complexity, so just let me know!

I uploaded a new patch set to inject and use a RepoLinker.

I uploaded a new patch set to inject and use a RepoLinker.

@Lucas_Werkmeister_WMDE thanks a lot, but it seems I have a problem in my test envirnoment. I implemented all the changes as you wrote in the patch, but I keep getting:

…/extensions/ArticlePlaceholder/includes/Specials/SpecialAboutTopic.php: Call to undefined method Wikibase\Client\WikibaseClient::getRepoLinker()

at the row with the code

WikibaseClient::getRepoLinker( $mwServices )

Any hint on what am I doing wrong?
Thanks.

That sounds like you’re using an old Wikibase version? WikibaseClient::getRepoLinker() exists since 1.36.0-wmf.34 (before this change it was newRepoLinker()).

That sounds like you’re using an old Wikibase version?

Indeed I am: I usually stick to LTS version so I am on 1.35.

WikibaseClient::getRepoLinker() exists since 1.36.0-wmf.34 (before this change it was newRepoLinker()).

That did the trick.
Thanks once again for your help, I will now continue the work on the modification.

@Manuel you originally proposed the message text

This is an automatic view based on data from [repoSiteName with link to source entity].<br />There is no article on this topic yet, but you can help to create one.

@Lucas_Werkmeister_WMDE correctly pointed out that I arbitrarily changed the link like

This is an automatic view based on [data from repoSiteName with link to source entity].<br />There is no article on this topic yet, but you can help to create one.

My line of reasoning is that the link points to the specific item ("data") and not the homepage of repoSiteName so I thought about including words "data from" in the link.
Is this acceptable to you, or shall I stick to the original text?

Thanks

  • Use Html::messageBox() to envelop the messagebar

@Ladsgroup I've looked into messageBox() as you suggested, but I am not sure I got your point.
As far as I understood, messageBox() cannot be used directly, but only as errorBox(), successBox(), and warningBox(), right?
If this is correct, then I fail to understand the advantage of using these methods: none is suitable out-of-the-box for the kind of message we want to show here, so it seems we would need to tweak CSS classes to make it look like what we want.
At first sight, it seems to me we would add complexity without any advantage: evidently something escapes me, so I kindly ask you if you can elaborate on your suggestion with more details?

Thanks

(5.5 years later)

Maybe as a start, one could just include a blank message that people can configure in their wiki ..

This is an automatic view based on [data from repoSiteName with link to source entity].<br />There is no article on this topic yet, but you can help to create one.

My line of reasoning is that the link points to the specific item ("data") and not the homepage of repoSiteName so I thought about including words "data from" in the link.
Is this acceptable to you, or shall I stick to the original text?

This makes a lot of sense to me! Thank you @lucamauri!

Quick recap of the open tasks related to this modification as suggested here and in Gerrit (by @Lucas_Werkmeister_WMDE and @Ladsgroup):
[cut]

With some unexpected complications, I finally completed the modifications on the code itself and on testing: Jenkins just gave me the +2
So to summarize:

  • Implement the new message with link

done with the modifications discussed above

  • Add database icon image as internal resource

done using OOUI icon with the informational i for the time being

  • possibly submit it as new graphics in OOUI

done in T287329, hopefully this will be accepted and could be integrated in a future update of this extension

  • remove CSS class mw-articleplaceholder-createarticle-buttons for the now unused "Create an article" button's DIV

done as planned

  • Use Html::messageBox() to envelop the messagebar

As stated above, I frankly don't see any advantage in implementing this, on the contrary it seems to complicate the code. I haven't read any additional comments in weeks, so I assume is safe to drop this suggestion

I would say the work is done now — @Manuel correct me if I am wrong — and I hope the patch can be accepted.

Regardless of the use of messageBox or similar, tables must not be used for layout as in the current patch.

Regardless of the use of messageBox or similar, tables must not be used for layout as in the current patch.

This topic was not brought up before, but surely this is a best practice.
The box now is constructed using DIV elements.

After a conversation with @Lucas_Werkmeister_WMDE I also resolved to not inject markup directly, but to construct it using Html::rawElement

I uploaded the final patch and just received the +2

This comment was removed by Izno.

Change 703661 merged by jenkins-bot:

[mediawiki/extensions/ArticlePlaceholder@master] Add an explanatory message

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

Addshore subscribed.

Looks good to me on beta

image.png (431×1 px, 41 KB)

Awesome! \o/
Thank you again @lucamauri!

Glad to have been able to contribute with useful stuff :-)