Page MenuHomePhabricator

Add CC0 License overlay popup on termbox editing
Closed, ResolvedPublic5 Estimated Story Points

Description

Given I am editing Termbox content
When I click the Publish button
I will to be informed what license will my contributions be under
so that I can participate in the open data movement with confidence

Mock:

Bildschirmfoto 2019-06-03 um 12.08.02.png (964×538 px, 97 KB)

Acceptance Criteria

  • When a user clicks the save button when being in editing mode, they are confronted with an overlay as seen in the mock (exception: "Remember decision for future edits" - checkbox is not part of this ticket)
  • The text above the checkbox should reflect the first part of the text shown in the current License Popup in the V1 Desktop Termbox: By clicking "publish", you agree to the <a href="/w/index.php?title=Wikidata:Copyrights&amp;action=edit&amp;redlink=1" class="new" title="Wikidata:Copyrights (page does not exist)">terms of use</a>, and you irrevocably agree to release your contribution under the <a rel="nofollow" class="external text" href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 License</a>.
  • The terms of use and CC0 licence links open in new tabs. They should direct to the same pages the desktop version links to.
  • have a layer effect on the editable page (i.e. transparent white overlay --> 50% white)
  • When clicking cancel, the user goes back to edit mode. this allows e.g. to review or at least copy all edits already made
  • when clicking save the user agrees to the licensing for once --> the pop up will be shown again next time editing as long as the user avoids clicking the checkbox mentioned in T221836

Remarks:

  • license pop up cannot be "clicked away" without making a decision
  • this story only concerns the mobile termbox. For the desktop behaviour refer to T221779.

Notes from Task Breakdown
There is a similar message key wikibase-shortcopyrightwarning which could be reused or we could create a new one
There is a global in php which links to the license link $wgRightsUrl
We are happy to only inject the message etc into the client. It doesn't also need to make it to the SSR.
There exists window.mw.config.get('wbCopyright') which includes the totally assembled message using the message form wikibase not the new text/copy from the mock-up
We could use this with the config mixin: https://gerrit.wikimedia.org/r/plugins/gitiles/wikibase/termbox/+/master/src/client-entry.ts#22
We could also "improve" the MessageRepo to build something similar and add it as an additional message

Event Timeline

Note to myself and you: What happens, if users do not check the accept line? Will the pop up be shown over and over again?
I believe that's what is currently happening on desktop, right?

Lea_WMDE updated the task description. (Show Details)
Lea_WMDE updated the task description. (Show Details)
WMDE-leszek set the point value for this task to 5.May 8 2019, 2:23 PM

@Lea_WMDE Just a heads up that in general this message is configurable on mediawiki.

See for example: https://www.mediawiki.org/wiki/Manual:$wgRightsUrl. We assume that we should take this into account. The most consistent way for us to do this is to use the same message that is constructed in Wikibase however this contains a slight textual difference: It reads

By clicking "publish", you agree to the <a href="/w/index.php?title=Wikidata:Copyrights&amp;action=edit&amp;redlink=1" class="new" title="Wikidata:Copyrights (page does not exist)">terms of use</a>, and you irrevocably agree to release your contribution under the <a rel="nofollow" class="external text" href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 License</a>.

This is very similar but not the same. note: publish vs save. Is making this change an acceptable change to the copy? In task breakdown this seemed the best way forwards to us devs.

@Tarrow yes, sorry, there was even still a TODO to rephrase for publish. Updating the task description now.

@Lea_WMDE @Hanna_Petruschat_WMDE I believe it does not explicitly mention it - is the focus/tab order to be in line with what we did for the IP warning? T223542

Change 517406 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] Update Termbox

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

@Hanna_Petruschat_WMDE This story is almost complete from the dev side. While testing it in integration locally I noticed that the license link looks funny, because Minverva tries to mark external links with a special icon.
Screenshot:

Screenshot from 2019-06-17 13-08-54.png (194×452 px, 21 KB)

Do we want to have the icon too, or should it be removed? Either way is fine, but it obviously cannot stay the way it is.

As per email from Lea to Jakob we should keep the external link sign present. He says this is *probably* just adding a pad right to make it fit.

Decisive moment: this is the first time (I am aware of) we want to inherit a style. The reset CSS does what it can, removing the padding in the process - only the background image (which is not a "usual" style for a tags) remains. We have to decide if we want to (a spectrum which probably more shades of gray in between)

  • avoid resetting for this class altogether
  • compensate for what was reset (= "just adding a pad right to make it fit")
  • provide a custom implementation for the generic class

Change 518041 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[wikibase/termbox@master] reset css: ability to replace some selectors

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

Change 518048 had a related patch set uploaded (by Jakob; owner: Jakob):
[wikibase/termbox@master] reset css: ability to replace some selectors

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

Change 518048 abandoned by Jakob:
reset css: ability to replace some selectors

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

Change 518248 had a related patch set uploaded (by Jakob; owner: Jakob):
[wikibase/termbox@master] Re-add padding to externally styled .external link

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

Change 518248 merged by jenkins-bot:
[wikibase/termbox@master] Re-add padding to externally styled .external link

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

Change 518041 abandoned by Pablo Grass (WMDE):
reset css: ability to replace some selectors

Reason:
This does work somewhat but is costly (as in "not clear") and still does not resolve the task at hand completely as the use of the :not pseudo-selector causes too low specificity on some of our existing rules (e.g. EventEmittingButton)

https://bitsofco.de/on-not-and-specificity/#whataboutnot

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

Change 517406 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Update Termbox

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

Change 518676 had a related patch set uploaded (by Jakob; owner: Jakob):
[wikibase/termbox@master] License overlay: ensure links open in new tab

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

Change 518676 merged by jenkins-bot:
[wikibase/termbox@master] License overlay: ensure links open in new tab

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

Change 519637 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] Update termbox

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

Change 519637 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Update termbox

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

Yay! For me, terms of use is a red link, and looking at the task description this is even what is pasted there. If I removed "beta.wmflabs", I do get the page: https://www.wikidata.org/wiki/Wikidata:Copyright, however I am wondering if this is the right one, since it again mentions Terms of Use, which is the title of the link you orginally followed. I'm currently failing to reproduce the state on actual Wikidata, so could you please check, if these really are the pages we _target? And could you just confirm that we will not be seeing red links once we are on production?

What is working:

  • nice display of external link icon
  • the links open in new tabs
  • white overlay
  • cancel button
  • repeated showing of this message if checkbox is not checked

@Lea_WMDE The message is the same as on Desktop. There's no risk of getting red links :)

Beta Desktop red link:

Screenshot from 2019-07-01 12-55-43.png (161×224 px, 18 KB)

  NODES
chat 7
Note 6
Project 6
todo 1
USERS 1