Page MenuHomePhabricator

Show sum/average when selecting multiple numeric cells in VE
Closed, ResolvedPublic

Description

This functionality enables contributors editing tables in VE to more easily compute the sum and average for a range of cells they select.

Testing instructions

  1. Find a table with multiple numeric values, and edit in VE
  2. Drag your cursor across a range that includes at least 2 cells with numerical values
  3. Notice the context item displays the following calculations for the cells you've selected:
    • Sum and Average

Deployed:

image.png (478×643 px, 45 KB)

Event Timeline

Change 580121 had a related patch set uploaded (by Jforrester; owner: Esanders):
[VisualEditor/VisualEditor@master] Show sum/average when selecting multiple numeric cells

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

You can test this on live with the following user script:

mw.loader.using( 'ext.visualEditor.desktopArticleTarget.init', function () {
	// Register plugins to VE. will be loaded once the user opens VE
	mw.libs.ve.addPlugin( function () {
		return mw.loader.getScript( 'https://en.wikipedia.org/wiki/User:ESanders%20(WMF)/sumcells.js?action=raw' );
	} );
} );

Great will try this out. So add this here than? https://en.wikipedia.org/wiki/User:Doc_James/common.js

That's what's worked for me, @Doc_James. Tho, @Esanders will be the best person to answer this question.

Change 580121 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Show sum/average when selecting multiple numeric cells

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

ppelberg updated the task description. (Show Details)

Change 580131 had a related patch set uploaded (by Jforrester; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (cf72879d2)

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

Change 581717 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (61d8fefba)

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

Change 581717 abandoned by Esanders:
Update VE core submodule to master (61d8fefba)

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

Change 580131 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (cf72879d2)

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

Change 581717 restored by Jforrester:
Update VE core submodule to master (61d8fefba)

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

ppelberg claimed this task.

This is wonderful. Thank you :-)