Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

Lexeme lemma, sense or form editing should have a licence note
Closed, ResolvedPublic8 Estimated Story Points

Description

As an editor, I want to be informed about the license of contributions when I am editing a lemma, sense or form of a Lexeme.

Problem:
We currently don't show a "license of contributions" message when a lemma, sense or form of a Lexeme is edited like we do when a statement is added or edited.

We need to have the same message appear when a lemma, sense or form of a Lexeme is edited

Screenshot

image.png (294×330 px, 28 KB)

Copy
By clicking "Publish", you agree to the terms of use, and you irrevocably agree to release your contribution under the Creative Commons CC0 License.

I accept these terms for my future edits. Do not show this message again.

BDD
GIVEN a Lexeme page
AND an editor wants to make a change
WHEN the edit button is clicked for a lemma, sense or form of a Lexeme
THEN the "license of contributions" message is displayed

Acceptance criteria:

  • "license of contributions" message is displayed when a lemma, sense or form of a Lexeme is edited

Event Timeline

Arian_Bozorg renamed this task from Lexeme lemma, sense or form editing should have a licence note to [SW] Lexeme lemma, sense or form editing should have a licence note.Aug 11 2023, 9:15 AM
Arian_Bozorg renamed this task from [SW] Lexeme lemma, sense or form editing should have a licence note to Lexeme lemma, sense or form editing should have a licence note.Aug 16 2023, 9:12 AM
Arian_Bozorg updated the task description. (Show Details)

Task Breakdown Notes:

  • This uses wbtooltip, and therefore will rely on the tipsy jQuery UI plugin
  • A good place to start looking at thisa is attachCopyrightTooltip in repo/resources/wikibase.ui.entityViewInit.js

I looked a bit into it, and the following patch

diff --git a/repo/resources/wikibase.ui.entityViewInit.js b/repo/resources/wikibase.ui.entityViewInit.js
index d88740deb1..bc83d49b82 100644
--- a/repo/resources/wikibase.ui.entityViewInit.js
+++ b/repo/resources/wikibase.ui.entityViewInit.js
@@ -355,7 +355,7 @@
 	 */
 	function attachCopyrightTooltip( $entityview, viewName ) {
 		$entityview.on(
-			'entitytermsviewafterstartediting sitelinkgroupviewafterstartediting statementviewafterstartediting',
+			'entitytermsviewafterstartediting sitelinkgroupviewafterstartediting statementviewafterstartediting lexemeviewafterstartediting',
 			function ( event ) {
 				var $target = $( event.target ),
 					gravity = 'sw';

is sufficient to have showCopyrightTooltip() get called when editing (lexemeheaderafterstartediting also works, but then we’d presumably also have to register lexemeformviewafterstartediting and senseviewafterstartediting – not sure which is better); but then showCopyrightTooltip() doesn’t do anything. It apparently has two mechanisms to show the copyright tooltip, either on an EditableTemplatedWidget or on an edittoolbar; in the case of the lexeme header, neither exists, so there’s nowhere to attach the message. We’ll have to look into which of these mechanisms fits us better, and how we can integrate it with the use of Vue.

Change 990719 had a related patch set uploaded (by Hoo man; author: Hoo man):

[mediawiki/extensions/Wikibase@master] entityViewInit: Add hacks for Lexeme copyright notices

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

Attachment to the code review discussion (since I can’t upload images on Gerrit): here’s what the change looks like on my end for the lemmas :/

image.png (418×368 px, 25 KB)

Change 990719 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] entityViewInit: Add hacks for Lexeme copyright notices

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

Looks good to me :) thanks so much!