Commit Graph

46 Commits

Author SHA1 Message Date
NikG
dde48f50ab Add separate buttons for 'add languages' and language settings menus
Bug: T323694
Change-Id: I23cb4687d841025905224a52b843572206fa9ddb
2023-01-25 11:47:24 +00:00
Santhosh Thottingal
5e6838ebdf Add actions menu inside content language selector
This patch replaces the display and input settings menu bar at the
bottom of the content language selector, with a floating icon that
opens a menu containing all the available language actions. In case
that only the language settings action is available, the language
settings menu is being opened instead.

In order to provide extensibility and support the addition of new
action items from other extensions, a registry class that inherits
from OO.Registry class is created. This class is used to create a
singleton registry object that holds all action items that should
be rendered inside the menu. Other modules/extensions can use this
registry to add new actions items to the menu, by passing the item
as argument, in the following form:
{ name: "", icon: "", text: "", handler: function() {} }

Bug: T289840
Change-Id: Iee017a9e3e6a654145e9fdd2b7df35baa348697d
2022-04-11 05:24:08 +00:00
Volker E
5abe986953 build: Update 'svgo' to latest v2.8.0 & re-crush images
Updating 'svgo' to v2.8.0 and newest Wikimedia SVG guidelines –
mainly around new whitespace features of SVGO.

Change-Id: I7c9eb84fdaeb50f6ff04c9e5cd2f005e129d555a
2022-02-27 23:59:05 +00:00
Volker E
8354e280b6 build: Update SVGO to latest v2.3.0 and re-optimize SVGs
SVGO v2.x changed configuration to JS, amending configuration.
Adding new 'minify-svg' npm script.
Also re-optimize SVGs.

Bug: T278656
Change-Id: I88ebed650be0d20b71bca6f15f3aa70b6b5eb42a
2021-05-27 11:53:05 -07:00
Volker E
8d54c3faf7 Amend compact links icon to use latest WikimediaUI version
Also amending `color` & `padding` to be closer to button standard appearance and
increase `margin-bottom` to make “Edit links” link not stick to button.

Bug: T170137
Change-Id: Iabb6abfdb8fa69c9f2634b190cb5fa6c005eb17c
2020-11-02 07:00:55 -08:00
Volker E
6ea7307df9 Amend Base10 color and remove (affected) PNG fallbacks
Amending Base10 to slightly darker `#202122` to fulfill WCAG
requirements in connection to Accent50.
Also removing all PNG fallbacks as they are only used in JS-only.

Bug: T248393
Change-Id: I07fa4e23320763a634e5340ab125634842b86454
2020-04-21 11:43:23 +00:00
Volker E
aa15e2eda3 Update 'help' icon to standard
Bug: T90414
Change-Id: I3906d452bacb312dd6c97118ad5bf34168fe1da7
2018-11-21 06:47:31 +00:00
Volker E
f3d48beef7 build: Bring SVGO optimization to build step
Enabling SVGO automation with 'grunt-svgmin' and conservative
plugin settings to build step, among those:
- enable removeRasterImages and sortAttrs,
- disable cleanupIDs, removeDesc, removeTitle, removeViewBox &
  removeXMLProcInst and
- make use of pretty, indent and multipass options.

Also updating SVG accordingly.

Bug: T185596
Change-Id: I0030a711a2947ca8c1eb4e56d8540661c72a2639
2018-05-20 08:55:05 +00:00
Volker E
72cf0a7f23 BetaFeatures SVGs: Merge logo and title path
In the process of updating BetaFeatures logo it got
identified that the logo is better marked up as one
`<path>` element.
Follows up I57f2f4890e980992db2c25506bbdc330530d67b1

Bug: T180427
Change-Id: I3bd8eb032943e00c93975db2911a9f7d26c0bcb2
2017-11-28 16:06:05 -08:00
Volker E
300d69b92d Unify BetaFeatures SVG screenshot markup
Unifying BetaFeatures SVG screenshot markup by:
- changing `id`s for better readability,
- sorting attributes,
- using full pixel values where applicable and
- generalizing attributes on `g` where applicable

Also fixing a visual glitch in the RTL version.
Follows up Idace90e945a2bd5efa869ee717224274fd94e91a.

Bug: T180427
Change-Id: I57f2f4890e980992db2c25506bbdc330530d67b1
2017-11-27 19:40:49 -08:00
Prateek Saxena
a9dc4a0f1a betafeatures icons: Correct contrast between light blue and gray
Change-Id: Idace90e945a2bd5efa869ee717224274fd94e91a
2017-11-23 11:41:33 +05:30
Prateek Saxena
963ce22b9f Update colors betafeatures icon
Updated light gray (Base80) and light blue (Accent90).

Old: https://phabricator.wikimedia.org/F10912040
New: https://phabricator.wikimedia.org/F10912039

Bug: T180427
Change-Id: I88d74a0b7447a9a3effb0bb56f3666991558f1fd
2017-11-21 11:23:55 +05:30
Volker E
c8b391564e Align SVGs to WikimediaUI color palette and optimize
Aligning SVGs to WikimediaUI color palette, optimizing
by help of SVGO and align markup to each other, among changes:
- unifying XML declaration
- removing `standalone=no` as it's default
- adding `viewBox` attribute for cross-browser compatibility
- removing unnecessary groups and ids where applicable
- unifying identation
- bringing attributes in order

Bug: T178867
Change-Id: Ie7803dd904cee14fa401331e082982794dc0a225
2017-11-02 00:25:40 -07:00
Volker E
7e228ecb02 Use consistent close icon
Using close icon of WikimediaUI icon collection, which is also
already in use by OOUI.

Bug: T50067
Bug: T175295
Change-Id: I83e435a7215708c5a5eae77eeca29632ed64f608
2017-09-07 16:54:26 -07:00
Ed Sanders
6fe8a31267 Update beta feature screenshots to use proper layout and colours
Bug: T144428
Change-Id: I755d0d3b3fdcf569d2470a4a9980ae0e2df66a37
2016-10-12 15:26:32 -07:00
Niklas Laxström
a19e8c0dba Update jquery.uls and adapt styling
jquery.uls.compact module is kept for now as some other
extensions depend on it. But it does not do anything
anymore.

There are some styles which should be in jquery.uls
upstream, but given the current state that is easiest
done in a follow-up later.

The main change is that language selection is now
compact by default: no heading etc.

Includes style changes for the dialogs, and especially
for the new position of the callout caret.

Bug: T85519
Change-Id: Iade8005439b4f58ab241752f69a5365d8bb88d2c
2016-05-18 11:40:58 +02:00
Santhosh Thottingal
0022983fae Add width and height attributes to svg for correct rendering in IE 10
If this values are missing from svg, the image is rendered very small.

Bug: T131842
Change-Id: I5ba750e577d09dd6e5119e287c3a34a85ec750f6
2016-05-02 11:08:00 +05:30
Santhosh Thottingal
cac3e709de Compact links: Add png background image for trigger
Converted the css to less file too.

Change-Id: I2f01c170336b0d19f0dbac10ebd9a3eac769d104
2016-04-19 14:23:04 +02:00
Santhosh Thottingal
62d05ed78d Update compact language links icon
Changed the background-size of the icon from 17px to 18px

Bug: T131912
Change-Id: I46977bcfac216b48648ee186ec0fda13f8262a0d
2016-04-19 15:44:14 +05:30
Niklas Laxström
c76a7d579d Revert wrong image update in I7f0ef09941
Change-Id: I12636762036d34c33d02a9c9472700aa1a4c3f7d
2016-03-30 10:44:08 +02:00
Ori Livneh
1f4827670a Compress PNGs with zopflipng
Zopfli is the most efficient DEFLATE compression algorithm, trading run-time
performance for file sizes that are typically 3-8% smaller than those produced
by zlib with the maximum compression setting. Its output is Deflate-compatible,
so no specialized decoder is needed.

This change was created by running zopflipng against all the PNG files in this
repository. The exact invocation was:

  git ls-files --exclude-per-directory=.gitignore -- '*.png' \|
    parallel zopflipng -m -y {} {} \;

Files which zopflipng was not able to compress more efficiently were left unmodified.

Bug: T127608
Change-Id: I7f0ef09941cffb964acb3c67ef755e8538904084
2016-03-30 11:02:22 +03:00
m4tx
e1a4469748 Fix preferences ('gear') icons to be consistent
Resources are based on:
https://www.mediawiki.org/wiki/File:Gear_icon.svg
made by MGalloway.

Bug: T52843
Bug: T76515
Change-Id: Iabd3139fcdb033712550a3d61a8cc96fe90ee57c
2015-01-10 00:08:54 +01:00
Niharika Kohli
bdb7b9c3d3 Compact Links: Redesign the more languages button
Change-Id: Ie4d1cb5bf89ac47bac141b0f5a83452cfa9a0783
2014-12-01 14:32:31 +05:30
Niharika Kohli
5ca0d5d400 Compacting the interlanguage links with the ULS
Displays a shorter version of the language list with the languages that are more relevant to you.
More info at https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links

Due to a problem with duplicate patchsets we had to create a new one. 
The history and info on code and security revisions is available at
https://gerrit.wikimedia.org/r/#/c/104793/

Change-Id: I109bfb10f6181b6408aab170db5e8ca32493d657
2014-03-04 09:41:47 +00:00
Bartosz Dziewoński
c9cd0fc401 resources/images: Optimize all SVGs (partially by hand)
Passed with svgo 0.4.2 <https://github.com/svg/svgo>, then prepended
'<?xml version="1.0" encoding="UTF-8"?>' prolog to each file since
svgo sees it fit to remove it and that breaks file type detection.
svgo truncated all numerical values to a maximum of 3 decimal places
of precision.

Applied some additional optimizations by hand (with a text editor or
in Inkscape).

Did not touch upstream-managed SVG files, will submit separate
patches for them.

File size changes:

* cog-sprite.svg:    2,520 → 1,253 bytes – 50.3% smaller
* cog.svg:          17,961 → 1,154 bytes – 93.6% smaller
* display.svg:       2,591 → 1,053 bytes – 59.4% smaller
* help.svg:          1,790 →   674 bytes – 62.3% smaller
* input.svg:         5,515 → 2,092 bytes – 62.1% smaller
* remove-input.svg:  5,956 → 2,208 bytes – 62.9% smaller

Total:              36,333 → 8,434 bytes – 76.8% smaller

Details:

* cog-sprite.svg:
  * Use <defs> and <use> instead of duplicating the path data.

* cog.svg:
  * Vacuumed defs with Inkscape, there were weird leftovers there.

* input.svg:
  * Simplified the shapes.

* remove-input.svg:
  * As above. Reused the same path data with a transform to improve
    compression when embedded.

Bug: 56292
Change-Id: Iad1771829ba2711e4827befc1c73e34453734640
2014-02-19 00:54:42 +01:00
Pau Giner
7e50cae662 Optimize Cog sprite SVG
Reducing the size of the SVG by:
- Simplifying the shape (two anchor points removed)
- Removal of XML attributes not needed (namespace declarations not used, attributes with the default value, etc.)

Change-Id: I3dc810313d1bd9ebd5933a92ee90210cbf6f4fb4
2013-11-08 08:52:55 +01:00
Niklas Laxström
883e87ea56 Help links for ime selector menu
Change-Id: Ia6a0db9af25216f3d03c5130de96000141ccaa57
2013-07-15 13:24:12 +00:00
Pau Giner
d8c1f40f66 Cog size adjustments
SVG and PNG versions have been modified to be of the same dimensions.
The sprite now is a 14x14px cog with an additional transparent pixel
above and below. resulting in two 14x16px areas. The added margin solves
the problem of image being cropped when zooming.

Bug: 50742
Change-Id: Iab4f578bdb1ea55c51eb528527fc38ce44c7be69
2013-07-05 13:05:20 +00:00
Pau Giner
6075f79871 Huge icons in language settings
Graphic assets have been modified so hat they are of the size at which
they are displayed. This makes them safer for browsers not supporting
background-size property.

Bug: 49107
Change-Id: Ifdce9ff5034e2b11d3e1dd24ac649cb99a151312
2013-06-04 10:09:18 +00:00
Niklas Laxström
d10f685eb9 Remove unused resources
Change-Id: I80eb3dc02e99fd0dda5990a3a690d897e054cfcd
2013-05-24 18:51:28 +00:00
Niklas Laxström
6705754c75 Optimize images
Change-Id: I8cf0ec50425374e8abb89dcedc9663375e3d1edd
2013-05-22 09:16:42 +00:00
Santhosh Thottingal
4a49c25f10 Provide disable input tools option in IME menu
Bug: 48533
Change-Id: Ie856cbda344ae2624567fb6c2d6206996c3b10dc
2013-05-22 08:52:10 +00:00
Amir E. Aharoni
f4f332a459 Add the sidebar ULS cog icon and $wgULSPosition variable
Change-Id: I6acf1e21316a41ab8fcb4fd65e065be68693430f
2013-04-23 14:53:58 +02:00
Niklas Laxström
1c383fb8f9 Optimize pngs
Change-Id: I8666484a23228358a5f4ece449123c6458bb76d1
2013-03-13 09:53:48 +00:00
Pau Giner
10078d1b65 SVG versions of icons
SVG assets added and CSS adjusments made to make use fo SVG for compatible browsers.

Change-Id: Ib04b7bd72b528fc0c8159362f03f2a9828342aa4
2013-02-18 15:22:33 +01:00
pginer
3b60c50d8e Updated cog icon for the IME menu
The cog icon has been updated to better integrate with the IME menu.
Changes: color, margin at the sides and removal of triangle.

Change-Id: Id03d3bd3c6401a4a9542c12581ad50626e6c959c
2012-11-23 15:20:06 +01:00
pginer
833f8f63d6 Fix to reduce the ammount of settings text
Settings text on the main ULS view can grow longer for some languages running out of space.
This change does the following to avoid that:
* Removes setting section explanations and shows them as a tooltip on hover.
* Adjusts style for adjusting space between setting sections.
* Keyboard image has been adjusted to match the display settings image.

Change-Id: I42ec5cb35b3d4df977a6eff28ad55891f4135356
2012-10-31 18:37:06 +05:30
Santhosh Thottingal
f13e474e43 Input method integration with ULS
The file ext.uls.settingspanel.js is a draft for common
code in the different settings panels.

Change-Id: I057274f16b27b2c18d43d41c1d43f485a18ef0bf
2012-10-26 11:14:02 +05:30
Reedy
0f0732f865 Fixup a few minor documentation issues
Added some newlines

Left a FIXME in LanguageNameIndexer.php

Losslessly compressed display.png

Change-Id: I884b423d3812ddb964a6a70f75a6331a73371165
2012-08-19 01:19:46 +01:00
Amir E. Aharoni
a3ab65906a Add Language settings dialog
Change-Id: Ie3455f32ac6ceff3c52d79643a6f7f82106ab7f1
2012-08-14 10:42:13 +05:30
Santhosh Thottingal
1648899c45 Introduce display settings link at the top of ULS
Extend $.fn.uls render method to add additional rendering of display
settings link.

Add css for the new element.

Add display.png icon from the Agora icon set.

Change-Id: I7a29b4892be02526969b0dd786c74bdb7551c074
2012-08-09 16:25:16 +03:00
Santhosh Thottingal
878313d2ec Rearranging Files
* Seperating standalone jQuery ULS plugin and extension related code
* lib/jquery.uls can be submodule, but not now.

Change-Id: I7d9cb47daa88dd1a27ceda602a08cab0073caf33
2012-08-03 12:24:04 +05:30
pginer
fa16376501 Trigger icon size fix
Reduce the icon size to fit the size of the language trigger label of the personal
toolbar.

Change-Id: I1946c91a2aa8b47eefa61f10c84b8059949dfc3d
2012-08-02 15:47:52 +02:00
Santhosh Thottingal
b1b7c2feb3 Use grid based css design (made css resets local)
Introduced foundation based grid css
Related changes in example, template html

Change-Id: I8b1c1bae1c733ea0ed997d8317b9954592cf6eca
2012-07-23 16:49:00 +05:30
Santhosh Thottingal
9087825e6d Basic language selector
* uses setlang attribute in URL to switch language
* introduced a language filter widget by extending
  jquery.ui.autocomplete
* UI rendering is done by using SkinAfterContent hook

Change-Id: Ifa63a04ba1d060b6db8fba14bb868045cf6b97c3
2012-06-21 20:08:47 +05:30
Santhosh Thottingal
8527e33475 Skeleton extension for Universal Language Selector
* Basic extension code with i18n
* Adds a link to personal links to trigger ULS
* Core uls javascript code, to plug to the given trigger.
* Qunit, PHPUnit framework in place.
* and lot of TODOs and FIXMEs

Patch set 2:
* A tiny whitespace fix.

Change-Id: I300647a21e0b7f65b7d9dc6101014ea9389c9f2a
2012-06-15 10:49:18 +03:00