[Wikidata-tech] Repository of the Wikibase JavaScript API has moved

2017-11-03 Thread Leszek Manicki
Hi,

one more brief announcement:
The gerrit repository of the Wikibase JavaScript API library (
https://www.npmjs.com/package/wikibase-api, previously known as
https://packagist.org/packages/wikibase/javascript-api) was moved yesterday
to a new location at
https://gerrit.wikimedia.org/r/#/admin/projects/wikibase/javascript-api.

The old location
https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/WikibaseJavaScriptApi
has been archived and made read-only.

Should your tools use this little library, please make sure you have update
the URL of the repository in your local copy.

Best regards,
Leszek Manicki

-- 
Leszek Manicki
Software Developer

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
http://wikimedia.de

Imagine a world, in which every single human being can freely share in the
sum of all knowledge. That‘s our commitment.

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.
___
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech


[Wikidata-tech] JavaScript libraries are now submodules of Wikibase git repository

2017-11-03 Thread Leszek Manicki
Hi,

this announcement should be only relevant to people who use a copy of the
git repository of Wikibase. Changes discussed below should be transparent
to other users of Wikibase.

As of yesterday (namely having merged
8f694176c839e98909e7695f6b86b6cff05c372c) JavaScript libraries used in
Wikibase front-end have been integrated into Wikibase git repository as
submodules located under view/lib directory. They are no longer installed
as Composer dependencies of Wikibase.

When updating Wikibase, you might need to run some commands to update
submodules (e.g. to fetch updated files of a particular library). The
commands to be run are:
git submodule init
git submodule update

or simply:
git submodule update --init

Should you have any questions regarding this change, or encounter problems
after recent update, especially in the UI-related code, please reach out to
the development team at WMDE.

Best regards,
Leszek Manicki

-- 
Leszek Manicki
Software Developer

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
http://wikimedia.de

Imagine a world, in which every single human being can freely share in the
sum of all knowledge. That‘s our commitment.

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.
___
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech


[Wikidata-tech] Gadget / userscript editor feedback wanted

2017-11-03 Thread Lucas Werkmeister
Hi everyone! I’m considering to make a change to the HTML output for
statements, and I’d like to gather some feedback from people who work on
gadgets and user scripts :)

The problem is that any gadget that appends to the value of a statement
(e. g. *checkConstraints*) changes the HTML in a way that Wikibase’s own
JavaScript doesn’t expect, and sometimes the appended elements bleed into
Wikibase’s own elements, causing e. g. phab:T167869
 and phab:T169866
. (To clarify: the tasks mention
*checkConstraints* specifically, but at least the first task also affects
other gadgets.)

My proposed solution is to change the layout of the HTML slightly, from the
current


  ...
  ...

into the following:


  ...
  
...

  

There is a new element for “indicators” on a snak, and the value itself is
now a span inside of a new div wrapper. The indicators are hidden while the
statement is edited, and cleared on save. Gadgets can subscribe to the
wikibase.statement.saved hook to populate the indicators again after a
statement has been saved, using the new value. A simple example gadget
using this technique is at User:Lucas Werkmeister (WMDE)/colorIndicator.js

.

Here’s a list of some gadgets and user scripts I’m aware of that could use
this “indicators” area:

   - checkConstraints
   
   - EasyQuery 
   - User:Aude/mapview.js
   
   - User:Lucas Werkmeister (WMDE)/colorIndicator.js
   

   (mentioned above)

Existing gadgets that use something like $( '.wikibase-snakview-value'
).append( … ) will continue to work, though they could be changed to append
to the indicators instead. However, gadgets that select something like
div.wikibase-snakview-value will break, since the element is no longer a div
.
Do you see any problems with this new HTML layout, or do you want to
suggest any improvements? (You can reply to this email, or on the Project
chat
,
or comment on phab:T95403 .)

Cheers,
Lucas

-- 
Lucas Werkmeister
Software Developer (Intern)

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
https://wikimedia.de

Imagine a world, in which every single human being can freely share in the
sum of all knowledge. That‘s our commitment.

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.
___
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech