mw.widgets.TitleWidget: Update icons, use OOUI where possible
authorEd Sanders <esanders@wikimedia.org>
Mon, 29 Apr 2019 16:09:43 +0000 (17:09 +0100)
committerEd Sanders <esanders@wikimedia.org>
Mon, 29 Apr 2019 16:09:43 +0000 (17:09 +0100)
Bug: T222079
Change-Id: I7ff1ca9410236b7404556cb0b90cab3340ee7b0b

12 files changed:
resources/Resources.php
resources/src/mediawiki.widgets/images/page-disambiguation-ltr.svg
resources/src/mediawiki.widgets/images/page-disambiguation-rtl.svg
resources/src/mediawiki.widgets/images/page-existing-ltr.svg [deleted file]
resources/src/mediawiki.widgets/images/page-existing-rtl.svg [deleted file]
resources/src/mediawiki.widgets/images/page-not-found-he-yi.svg
resources/src/mediawiki.widgets/images/page-not-found-ltr.svg
resources/src/mediawiki.widgets/images/page-not-found-rtl.svg
resources/src/mediawiki.widgets/images/page-redirect-ltr.svg [deleted file]
resources/src/mediawiki.widgets/images/page-redirect-rtl.svg [deleted file]
resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleWidget.less

index b923832..469f78e 100644 (file)
@@ -2514,6 +2514,7 @@ return [
                        'oojs-ui-widgets',
                        'mediawiki.widgets.styles',
                        // TitleInputWidget
+                       'oojs-ui.styles.icons-content',
                        'mediawiki.Title',
                        'mediawiki.api',
                        'mediawiki.String',
index 0786048..005f66e 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v14.25C5 19.208 6.582 21 8.502 21H19V3zm8.002 3h4v4l-1.281-1.281L12.44 12l3.281 3.281L17.002 14v4h-4l1.313-1.313L10.596 13H7.002v-2h3.594l3.688-3.719z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m5 1c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2h-10zm6.002 3h4v4l-1.2812-1.2812-3.2812 3.2812 3.2812 3.2812 1.2812-1.2812v4h-4l1.3125-1.3125-3.7187-3.6875h-3.5938v-2h3.5938l3.6875-3.7188-1.2812-1.2812z"/>
 </svg>
index 753c9d5..7e56a70 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M19 3v14.25c0 1.958-1.582 3.75-3.502 3.75H5V3zm-8.002 3h-4v4l1.281-1.281L11.56 12l-3.28 3.281L6.998 14v4h4l-1.313-1.313L13.404 13h3.594v-2h-3.594L9.716 7.281z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m15 1c1.1 0 2 0.9 2 2v14c0 1.1-0.9 2-2 2h-10c-1.1 0-2-0.9-2-2v-14c0-1.1 0.9-2 2-2zm-6.002 3h-4v4l1.2812-1.2812 3.2812 3.2812-3.2812 3.2812-1.2812-1.2812v4h4l-1.3125-1.3125 3.7188-3.6875h3.5938v-2h-3.5938l-3.6875-3.7188z"/>
 </svg>
diff --git a/resources/src/mediawiki.widgets/images/page-existing-ltr.svg b/resources/src/mediawiki.widgets/images/page-existing-ltr.svg
deleted file mode 100644 (file)
index 011a171..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M12 12h5V5h-5zm-5 3v1h10v-1m0-1v-1H7v1m0 4h10v-1H7zm4-11H7v1h4zm0 3V9H7v1m0 1v1h4v-1m0-6H7v1h4zM5 3h14v18H8.692C6.602 21 5 19.373 5 17.25z"/>
-</svg>
diff --git a/resources/src/mediawiki.widgets/images/page-existing-rtl.svg b/resources/src/mediawiki.widgets/images/page-existing-rtl.svg
deleted file mode 100644 (file)
index db4ad43..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M12 12H7V5h5zm5 3v1H7v-1m0-1v-1h10v1m0 4H7v-1h10zM13 7h4v1h-4zm0 3V9h4v1m0 1v1h-4v-1m0-6h4v1h-4zm6-2H5v18h10.308C17.398 21 19 19.373 19 17.25z"/>
-</svg>
index d8c68a9..e1f19d2 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v18h10c2 0 4-2 4-4V3zm7.644 13.572h-1.687v-1.6h1.687zm1.982-6a2.144 2.144 0 0 1-.25.563c-.104.16-.225.3-.36.423l-.402.364-.438.396c-.134.127-.25.273-.353.428-.103.16-.18.346-.233.555-.054.215-.08.474-.08.784h-1.36c0-.378.017-.696.057-.955.036-.26.098-.488.183-.688.085-.196.188-.37.31-.52.12-.15.267-.295.433-.44l.385-.332c.12-.105.233-.214.327-.34.098-.124.17-.265.228-.42a1.67 1.67 0 0 0 .08-.55c0-.256-.044-.48-.133-.66a1.397 1.397 0 0 0-.322-.442 1.35 1.35 0 0 0-.403-.246 1.17 1.17 0 0 0-.376-.077c-.52 0-.905.173-1.15.52-.247.345-.372.81-.372 1.39H8.962c0-.468.067-.895.206-1.282a2.641 2.641 0 0 1 1.561-1.619c.37-.15.79-.223 1.252-.223.385 0 .743.06 1.078.174.33.114.622.282.868.5.246.218.443.487.586.814.143.323.215.692.215 1.1-.01.306-.04.565-.104.784z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m5 1c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2h-10zm4.9805 4.2012c0.385 0 0.74313 0.059828 1.0781 0.17383 0.33 0.114 0.62314 0.282 0.86914 0.5s0.44294 0.48745 0.58594 0.81445c0.143 0.323 0.21484 0.69161 0.21484 1.0996-0.009999 0.306-0.041469 0.5642-0.10547 0.7832h0.003906a2.144 2.144 0 0 1-0.25 0.5625c-0.104 0.16-0.22633 0.30083-0.36133 0.42383l-0.40234 0.36328-0.4375 0.39648c-0.134 0.127-0.25052 0.27274-0.35352 0.42774-0.103 0.16-0.17942 0.34569-0.23242 0.55469-0.054 0.215-0.080078 0.47516-0.080078 0.78516h-1.3594c0-0.378 0.016641-0.69608 0.056641-0.95508 0.036-0.26 0.098594-0.48945 0.18359-0.68945 0.085-0.196 0.18659-0.36953 0.30859-0.51953 0.12-0.15 0.26759-0.29445 0.43359-0.43945l0.38477-0.33203c0.12-0.105 0.23412-0.21384 0.32812-0.33984 0.098-0.124 0.16856-0.26492 0.22656-0.41992a1.67 1.67 0 0 0 0.080078-0.55078c0-0.256-0.043813-0.48016-0.13281-0.66016a1.397 1.397 0 0 0-0.32226-0.44141 1.35 1.35 0 0 0-0.40234-0.24609 1.17 1.17 0 0 0-0.375-0.078125c-0.52 0-0.90539 0.17448-1.1504 0.52148-0.247 0.345-0.37305 0.80867-0.37305 1.3887h-1.4336c0-0.468 0.066078-0.89425 0.20508-1.2812a2.641 2.641 0 0 1 1.5605-1.6191c0.37-0.15 0.78995-0.22266 1.252-0.22266zm-1.0234 7.7715h1.6875v1.5996h-1.6875v-1.5996z"/>
 </svg>
index bea394a..e1f19d2 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v14c0 2.125 1.911 4 4 4h10V3zm7.644 13.572h-1.687v-1.601h1.687zm1.982-6.001a2.106 2.106 0 0 1-.609.987l-.403.364-.438.396a2.422 2.422 0 0 0-.353.428 1.881 1.881 0 0 0-.233.555 3.236 3.236 0 0 0-.081.783h-1.36c0-.378.018-.696.058-.955a2.7 2.7 0 0 1 .183-.687c.085-.196.188-.369.309-.519a3.59 3.59 0 0 1 .434-.441l.385-.332a2.15 2.15 0 0 0 .327-.341c.098-.123.17-.264.228-.419.054-.155.081-.337.081-.551a1.5 1.5 0 0 0-.134-.66 1.388 1.388 0 0 0-.322-.441 1.35 1.35 0 0 0-.403-.246 1.17 1.17 0 0 0-.376-.077c-.519 0-.904.173-1.15.519-.246.346-.371.81-.371 1.392H8.962c0-.469.067-.896.206-1.283a2.641 2.641 0 0 1 1.561-1.619 3.33 3.33 0 0 1 1.253-.223c.385 0 .743.059 1.078.173.331.114.622.282.868.5.246.218.443.487.586.814a2.7 2.7 0 0 1 .215 1.101c-.009.305-.04.564-.103.783z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m5 1c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2h-10zm4.9805 4.2012c0.385 0 0.74313 0.059828 1.0781 0.17383 0.33 0.114 0.62314 0.282 0.86914 0.5s0.44294 0.48745 0.58594 0.81445c0.143 0.323 0.21484 0.69161 0.21484 1.0996-0.009999 0.306-0.041469 0.5642-0.10547 0.7832h0.003906a2.144 2.144 0 0 1-0.25 0.5625c-0.104 0.16-0.22633 0.30083-0.36133 0.42383l-0.40234 0.36328-0.4375 0.39648c-0.134 0.127-0.25052 0.27274-0.35352 0.42774-0.103 0.16-0.17942 0.34569-0.23242 0.55469-0.054 0.215-0.080078 0.47516-0.080078 0.78516h-1.3594c0-0.378 0.016641-0.69608 0.056641-0.95508 0.036-0.26 0.098594-0.48945 0.18359-0.68945 0.085-0.196 0.18659-0.36953 0.30859-0.51953 0.12-0.15 0.26759-0.29445 0.43359-0.43945l0.38477-0.33203c0.12-0.105 0.23412-0.21384 0.32812-0.33984 0.098-0.124 0.16856-0.26492 0.22656-0.41992a1.67 1.67 0 0 0 0.080078-0.55078c0-0.256-0.043813-0.48016-0.13281-0.66016a1.397 1.397 0 0 0-0.32226-0.44141 1.35 1.35 0 0 0-0.40234-0.24609 1.17 1.17 0 0 0-0.375-0.078125c-0.52 0-0.90539 0.17448-1.1504 0.52148-0.247 0.345-0.37305 0.80867-0.37305 1.3887h-1.4336c0-0.468 0.066078-0.89425 0.20508-1.2812a2.641 2.641 0 0 1 1.5605-1.6191c0.37-0.15 0.78995-0.22266 1.252-0.22266zm-1.0234 7.7715h1.6875v1.5996h-1.6875v-1.5996z"/>
 </svg>
index bb6f316..75b310c 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M19 3v14c0 2.125-1.911 4-4 4H5V3zm-7.644 13.572h1.687v-1.601h-1.687zm-1.982-6.001a2.106 2.106 0 0 0 .609.987l.403.364.438.396c.134.127.251.273.353.428.103.159.179.346.233.555.054.214.081.473.081.783h1.36c0-.378-.018-.696-.058-.955a2.7 2.7 0 0 0-.183-.687 2.242 2.242 0 0 0-.309-.519 3.59 3.59 0 0 0-.434-.441l-.385-.332a2.15 2.15 0 0 1-.327-.341 1.513 1.513 0 0 1-.228-.419 1.671 1.671 0 0 1-.081-.551 1.5 1.5 0 0 1 .134-.66c.089-.182.197-.332.322-.441a1.35 1.35 0 0 1 .403-.246 1.17 1.17 0 0 1 .376-.077c.519 0 .904.173 1.15.519.246.346.371.81.371 1.392h1.436a3.77 3.77 0 0 0-.206-1.283 2.641 2.641 0 0 0-1.561-1.619 3.33 3.33 0 0 0-1.253-.223c-.385 0-.743.059-1.078.173a2.548 2.548 0 0 0-.868.5 2.304 2.304 0 0 0-.586.814 2.7 2.7 0 0 0-.215 1.101c.009.305.04.564.103.783z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m15 1c1.1 0 2 0.9 2 2v14c0 1.1-0.9 2-2 2h-10c-1.1 0-2-0.9-2-2v-14c0-1.1 0.9-2 2-2zm-4.9805 4.2012c-0.385 0-0.74312 0.059828-1.0781 0.17383-0.33 0.114-0.62314 0.282-0.86914 0.5s-0.44294 0.48745-0.58594 0.81445c-0.143 0.323-0.21484 0.69161-0.21484 1.0996 0.01 0.306 0.041469 0.5642 0.10547 0.7832h-0.00391a2.144 2.144 0 0 0 0.25 0.5625c0.104 0.16 0.22633 0.30083 0.36133 0.42383l0.40234 0.36328 0.4375 0.39648c0.134 0.127 0.25052 0.27274 0.35352 0.42774 0.103 0.16 0.17942 0.34569 0.23242 0.55469 0.054 0.215 0.080078 0.47516 0.080078 0.78516h1.3594c0-0.378-0.01664-0.69608-0.05664-0.95508-0.036-0.26-0.09859-0.48945-0.18359-0.68945-0.085-0.196-0.18659-0.36953-0.30859-0.51953-0.12-0.15-0.26759-0.29445-0.43359-0.43945l-0.38476-0.33203c-0.12-0.105-0.23412-0.21384-0.32812-0.33984-0.098-0.124-0.16856-0.26492-0.22656-0.41992a1.67 1.67 0 0 1-0.080078-0.55078c0-0.256 0.043813-0.48016 0.13281-0.66016a1.397 1.397 0 0 1 0.32226-0.44141 1.35 1.35 0 0 1 0.40234-0.24609 1.17 1.17 0 0 1 0.375-0.078125c0.52 0 0.90539 0.17448 1.1504 0.52148 0.247 0.345 0.37305 0.80867 0.37305 1.3887h1.4336c0-0.468-0.06608-0.89425-0.20508-1.2812a2.641 2.641 0 0 0-1.5605-1.6191c-0.37-0.15-0.78995-0.22266-1.252-0.22266zm1.0234 7.7715h-1.6875v1.5996h1.6875z"/>
 </svg>
diff --git a/resources/src/mediawiki.widgets/images/page-redirect-ltr.svg b/resources/src/mediawiki.widgets/images/page-redirect-ltr.svg
deleted file mode 100644 (file)
index f296ac5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v14c0 2.552 1.516 4 4 4h10V3H5zm9.375 3.781c1.384 0 2.655 1.208 2.781 2.625 0 .838-.373 1.546-.937 2.125l-1.657 1.688c-.438.517-1.12.812-1.874.812-1.133 0-1.903-.69-2.407-1.656l.813-.844c.312.709.776 1.281 1.656 1.281.378 0 .873-.178 1.125-.437l1.656-1.688a1.65 1.65 0 0 0 0-2.312c-.312-.258-.778-.469-1.156-.469-.755 0-1.247.577-1.75 1.094-.312-.13-.625-.156-.938-.156-.186 0-.374.031-.5.031.942-.905 1.869-2.094 3.188-2.094zm-3.281 2.782c1.132 0 1.903.72 2.406 1.687l-.813.813c-.312-.647-.744-1.282-1.624-1.282-.378 0-.874.21-1.126.469l-1.656 1.656c-.629.58-.629 1.666 0 2.313.312.258.748.469 1.125.469.378 0 .874-.21 1.125-.47l.563-.593c.251.13.5.156.812.156.187 0 .376 0 .563-.062l-1.156 1.219c-.942 1.096-2.712 1.033-3.72 0-1.067-1.034-1.067-2.775 0-3.876l1.626-1.656a2.454 2.454 0 0 1 1.875-.844z"/>
-</svg>
diff --git a/resources/src/mediawiki.widgets/images/page-redirect-rtl.svg b/resources/src/mediawiki.widgets/images/page-redirect-rtl.svg
deleted file mode 100644 (file)
index 6c753d6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M19 3v14c0 2.552-1.516 4-4 4H5V3h14zM9.625 6.781c-1.384 0-2.655 1.208-2.781 2.625 0 .838.373 1.546.937 2.125l1.657 1.688c.438.517 1.12.812 1.874.812 1.133 0 1.903-.69 2.407-1.656l-.813-.844c-.312.709-.776 1.281-1.656 1.281-.378 0-.873-.178-1.125-.437l-1.656-1.688a1.652 1.652 0 0 1 0-2.312c.312-.258.778-.469 1.156-.469.755 0 1.247.577 1.75 1.094.312-.13.625-.156.938-.156.186 0 .374.031.5.031-.942-.905-1.869-2.094-3.188-2.094zm3.281 2.782c-1.132 0-1.903.72-2.406 1.687l.813.813c.312-.647.744-1.282 1.624-1.282.378 0 .874.21 1.126.469l1.656 1.656c.629.58.629 1.666 0 2.313-.312.258-.748.469-1.125.469-.378 0-.874-.21-1.125-.47l-.563-.593c-.251.13-.5.156-.812.156-.187 0-.376 0-.563-.062l1.156 1.219c.942 1.096 2.712 1.033 3.72 0 1.067-1.034 1.067-2.775 0-3.876l-1.626-1.656a2.454 2.454 0 0 0-1.875-.844z"/>
-</svg>
index 661f9ae..dc702c8 100644 (file)
                } else if ( config.missing ) {
                        icon = 'page-not-found';
                } else if ( config.redirect ) {
-                       icon = 'page-redirect';
+                       icon = 'articleRedirect';
                } else if ( config.disambiguation ) {
                        icon = 'page-disambiguation';
                } else {
-                       icon = 'page-existing';
+                       icon = 'article';
                }
 
                // Config initialization
index e52d0cd..9830c10 100644 (file)
@@ -39,6 +39,7 @@
                                        left: 0;
 
                                        &:not( .mw-widget-titleOptionWidget-hasImage ) {
+                                               background-size: 80%;
                                                background-color: #c8ccd1;
                                                opacity: 0.4;
                                        }
        background-image: url( images/page-disambiguation-ltr.svg );
 }
 
-.oo-ui-icon-page-existing {
-       /* @embed */
-       background-image: url( images/page-existing-ltr.svg );
-}
-
 .oo-ui-icon-page-not-found {
        /* @embed */
        background-image: url( images/page-not-found-ltr.svg );
 }
 
-.oo-ui-icon-page-not-found:lang( he ) {
+.oo-ui-icon-page-not-found:lang( he ),
+.oo-ui-icon-page-not-found:lang( yi ) {
        /* @embed */
        background-image: url( images/page-not-found-he-yi.svg );
 }
-
-.oo-ui-icon-page-redirect {
-       /* @embed */
-       background-image: url( images/page-redirect-ltr.svg );
-}