Page MenuHomePhabricator

Inform about licensing
Closed, ResolvedPublic5 Estimated Story Points

Description

This task depends on task T301234: Create basic form with text inputs

As a user creating a new Lexeme I would like to be informed about the licensing in order to have knowledge of what others can do with my contributions.

Problem:
We need to inform the editor about the license of their contribution.

Screenshots/mockups:
https://www.figma.com/file/XoYktoKEBnC0VIf1SRuxJK/Lexicographical-Data-UI?node-id=493%3A3179

BDD
GIVEN the special page to create new Lexemes
WHEN viewing the page
THEN a message indicating the license of the contribution is shown

Acceptance criteria:

  • message informing about the license is shown
  • the used message is the same as the one on the existing Special:NewLexeme page
  • if possible, link opens in a new tab. Otherwise, link functionality is the same as the existing one

Notes:
wikit token styles do not yet exist in wikit. @Sarai-WMDE is create them posthaste
includes i18n set up as its the first text

Event Timeline

karapayneWMDE set the point value for this task to 5.
karapayneWMDE added a subscriber: Sarai-WMDE.

Task Breakdown Notes:

  • The complexity with opening the links in a new tab stems from the fact that the anchor tags are hard-coded into the message, and the messages are defined in the WikimediaMessages. Wikibase
  • We may be able to submit a patch to that repository, otherwise we should consider whether we want to copy these messages into the WikibaseLexeme repo.
  • The extra tokens required for this task were created in WiKit and are available in #498.
  • The above PR also includes the small-text mixin which can be used in lieu of specifying each css property with it's correct token
  • WiKit also includes a Link mixin which can be used to style the anchors within the message
  • We assume that i18n is set up to be used within the Form

Potential Plan of Action:

  • Add text
  • Create CSS classes utilizing mixins
  • Apply styles to text with classes

After picking up the task, it became clear that multiple aspects and repositories are involved:

  • The copy right text and the copy right url are actually determined by settings in WikibaseRepo.
  • The copyright and terms for creating any new entity in a Wikibase instance should be identical.
  • Thus, the translation message wikibase-shortcopyrightwarning should not be decoupled and rewritten in WikibaseLexeme.
  • The copyright message is constructed in WikibaseRepo, by passing a wikitext link as the third parameter to the message.
  • This, however, cannot be done in JS using mw.msg, which complicated the message construction in the Vue application.

Therefore, we should:

  • Get settings from Lexeme to vue app:
    1. Find a way to inject the settings into our new lexeme form component (new-lexeme-special-page.git)
    2. Pass the settings down from WikibaseLexeme (WikibaseLexeme.git).
  • Make the message more usable in JS:
    1. Update the wikibase-shortcopyrightwarning to accept a $3rd and $4th parameters instead of the currently passed wikitext link (Wikibase.git).
    2. Use the message in the new lexeme form component with the new parameters (new-lexeme-special-page.git)

Change 764357 had a related patch set uploaded (by Noa wmde; author: Noa wmde):

[mediawiki/extensions/WikibaseLexeme@master] LexiData: get URL and text settings for CC0 lience message

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

Change 764368 had a related patch set uploaded (by Noa wmde; author: Noa wmde):

[mediawiki/extensions/Wikibase@master] LexiData: add parameter to copyright translation message

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

Change 764368 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] LexiData: add parameter to copyright translation message

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

Change 766817 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] LexiData: add parameter to copyright translation message (take 2)

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

Change 766817 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] LexiData: add parameter to copyright translation message (take 2)

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

Change 764357 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] LexiData: get URL and text settings for CC0 license message

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