Compare commits

..

4 Commits

Author SHA1 Message Date
Translation updater bot 8b385d2205 Localisation updates from https://translatewiki.net.
Change-Id: Ib046093e59fa036d320ba3874210a32b69478973
2022-10-06 07:19:00 +02:00
Translation updater bot 1f0d38ff28 Localisation updates from https://translatewiki.net.
Change-Id: Ifaac417f0d7188732287a01bf34dcc6ca937d93b
2022-09-29 07:20:17 +02:00
Translation updater bot 678dedd71c Localisation updates from https://translatewiki.net.
Change-Id: I504fdb0fc84bf4b373b1da54abe9972ee094a912
2022-09-22 16:21:38 +02:00
Moh'd Khier Abualruz ab7eee4113 Deprecate PersonalUrls hook
* Updated usages to use SkinTemplateNavigation::Universal
in preparation for the hard deprecation and removal of the hook.

Bug: T310017
Change-Id: I133c7479da294c0b8c908ad8d34690297f08200b
(cherry picked from commit 3a10708b4e)
2022-09-08 21:27:00 +00:00
128 changed files with 740 additions and 1552 deletions

View File

@ -22,7 +22,3 @@ ul {
.printfooter {
display: none;
}
.vector-storybook-example-table tr {
vertical-align: top;
}

View File

@ -2,7 +2,6 @@
"@metadata": {
"authors": [
"Akamycoco",
"Amire80",
"Vickylin77s"
]
},
@ -10,10 +9,10 @@
"vector-action-delete": "masopitay to",
"vector-action-move": "malinah",
"vector-action-protect": "midipot",
"vector-view-create": "misanga",
"vector-view-create": " misanga",
"vector-view-edit": "misinanot",
"vector-view-history": "misongila a minengneng to likisi",
"vector-view-view": "miasip",
"vector-view-history": " misongila a minengneng to likisi",
"vector-view-view": " miasip",
"vector-view-viewsource": "misongila a minengneng to yin-se-ma",
"vector-more-actions": "matongal ko adihay"
}

View File

@ -68,6 +68,7 @@
"vector-main-menu-tooltip": "القائمة الرئيسة",
"vector-toc-menu-tooltip": "جدول المحتويات",
"vector-toc-collapsible-button-label": "تبديل عرض جدول المحتويات",
"vector-article-tools-nav-label": "الأدوات",
"vector-site-nav-label": "الموقع",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|نقاش]]",
"tooltip-vector-anon-user-menu-title": "المزيد من الخيارات"

View File

@ -55,6 +55,7 @@
"vector-main-menu-tooltip": "মুখ্য মেনু",
"vector-toc-menu-tooltip": "সূচীপত্ৰ",
"vector-toc-collapsible-button-label": "সূচীপত্ৰ টগ'ল কৰক",
"vector-article-tools-nav-label": "সঁজুলি",
"vector-site-nav-label": "ছাইট",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|আলোচনা]]",
"tooltip-vector-anon-user-menu-title": "অধিক বিকল্প"

View File

@ -6,10 +6,10 @@
"Gulmammad",
"NMW03",
"Sortilegus",
"Toghrul Rahimli",
"Vago",
"Vugar 1981",
"Wertuose"
"Wertuose",
"Toghrul Rahimli"
]
},
"skinname-vector": "Vector",

View File

@ -55,6 +55,7 @@
"vector-main-menu-tooltip": "Галоўнае меню",
"vector-toc-menu-tooltip": "Змест",
"vector-toc-collapsible-button-label": "Пераключыць змест",
"vector-article-tools-nav-label": "Інструменты",
"vector-site-nav-label": "Праект",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Размова]]",
"tooltip-vector-anon-user-menu-title": "Больш магчымасцей"

View File

@ -62,6 +62,7 @@
"vector-main-menu-tooltip": "প্রধান মেনু",
"vector-toc-menu-tooltip": "সূচিপত্র",
"vector-toc-collapsible-button-label": "সূচিপত্র টগল করুন",
"vector-article-tools-nav-label": "সরঞ্জাম",
"vector-site-nav-label": "সাইট",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|আলোচনা]]",
"tooltip-vector-anon-user-menu-title": "আরও বিকল্প"

View File

@ -55,6 +55,7 @@
"vector-main-menu-tooltip": "Lañser pennañ",
"vector-toc-menu-tooltip": "Taolenn",
"vector-toc-collapsible-button-label": "Gwintañ an daolenn",
"vector-article-tools-nav-label": "Ostilhoù",
"vector-site-nav-label": "Lec'hienn",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Kaozeadenn]]",
"tooltip-vector-anon-user-menu-title": "Muioc'h a zibaboù"

View File

@ -54,6 +54,7 @@
"vector-anon-user-menu-pages-label": "Vegeu més informació sobre l'edició",
"vector-main-menu-tooltip": "Menú principal",
"vector-toc-menu-tooltip": "Taula de continguts",
"vector-article-tools-nav-label": "Eines",
"vector-site-nav-label": "Lloc",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Discussió]]",
"tooltip-vector-anon-user-menu-title": "Més opcions"

View File

@ -40,6 +40,7 @@
"vector-anon-user-menu-pages-learn": "совнаха хаа",
"vector-anon-user-menu-pages-label": "Хийцамашбарах мадарра",
"vector-main-menu-tooltip": "Коьрта меню",
"vector-article-tools-nav-label": "ГӀирсаш",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Дискусси]]",
"tooltip-vector-anon-user-menu-title": "Дукха таронаш"
}

View File

@ -55,6 +55,7 @@
"vector-main-menu-tooltip": "Hauptmenü",
"vector-toc-menu-tooltip": "Inhaltsverzeichnis",
"vector-toc-collapsible-button-label": "Inhaltsverzeichnis umschalten",
"vector-article-tools-nav-label": "Werkzeuge",
"vector-site-nav-label": "Website",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskussion]]",
"tooltip-vector-anon-user-menu-title": "Weitere Optionen"

View File

@ -58,6 +58,7 @@
"vector-main-menu-tooltip": "Κύριο μενού",
"vector-toc-menu-tooltip": "Πίνακας Περιεχομένων",
"vector-toc-collapsible-button-label": "Εναλλαγή του πίνακα περιεχομένων",
"vector-article-tools-nav-label": "Εργαλεία",
"vector-site-nav-label": "Ιστότοπος",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Συζήτηση]]",
"tooltip-vector-anon-user-menu-title": "Περισσότερες επιλογές"

View File

@ -49,6 +49,7 @@
"vector-main-menu-tooltip": "Main menu",
"vector-toc-menu-tooltip": "Table of Contents",
"vector-toc-collapsible-button-label": "Toggle the table of contents",
"vector-article-tools-nav-label": "Tools",
"vector-site-nav-label": "Site",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Discussion]]",
"tooltip-vector-anon-user-menu-title": "More options"

View File

@ -70,6 +70,7 @@
"vector-main-menu-tooltip": "Menú principal",
"vector-toc-menu-tooltip": "Tabla de contenidos",
"vector-toc-collapsible-button-label": "Cambiar a la tabla de contenidos",
"vector-article-tools-nav-label": "Herramientas",
"vector-site-nav-label": "Sitio",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Discusión]]",
"tooltip-vector-anon-user-menu-title": "Más opciones"

View File

@ -54,6 +54,7 @@
"vector-main-menu-tooltip": "Menu nagusia",
"vector-toc-menu-tooltip": "Eduki-taula",
"vector-toc-collapsible-button-label": "Eduki taularen ikusgarritasuna aldatu",
"vector-article-tools-nav-label": "Tresnak",
"vector-site-nav-label": "Gunea",
"tooltip-vector-anon-user-menu-title": "Aukera gehiago"
}

View File

@ -63,6 +63,7 @@
"vector-main-menu-tooltip": "منوی اصلی",
"vector-toc-menu-tooltip": "فهرست محتوا",
"vector-toc-collapsible-button-label": "تغییر وضعیت فهرست محتویات",
"vector-article-tools-nav-label": "ابزارها",
"vector-site-nav-label": "وبگاه",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|بحث]]",
"tooltip-vector-anon-user-menu-title": "گزینه‌های بیشتر"

View File

@ -70,6 +70,7 @@
"vector-main-menu-tooltip": "Menu principal",
"vector-toc-menu-tooltip": "Table des matières",
"vector-toc-collapsible-button-label": "Basculer la table des matières",
"vector-article-tools-nav-label": "Outils",
"vector-site-nav-label": "Site",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Discussion]]",
"tooltip-vector-anon-user-menu-title": "Plus doptions"

View File

@ -56,6 +56,7 @@
"vector-main-menu-tooltip": "Haadmenu",
"vector-toc-menu-tooltip": "Ynhâldsopjefte",
"vector-toc-collapsible-button-label": "Ynhâldsopjefte omklappe",
"vector-article-tools-nav-label": "Ark",
"vector-site-nav-label": "Webstee",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskusje]]",
"tooltip-vector-anon-user-menu-title": "Mear opsjes"

View File

@ -51,6 +51,7 @@
"vector-main-menu-tooltip": "תפריט ראשי",
"vector-toc-menu-tooltip": "תוכן עניינים",
"vector-toc-collapsible-button-label": "מצב תוכן העניינים",
"vector-article-tools-nav-label": "כלים",
"vector-site-nav-label": "אתר",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|דיון]]",
"tooltip-vector-anon-user-menu-title": "אפשרויות נוספות"

View File

@ -56,6 +56,7 @@
"vector-main-menu-tooltip": "मुख्य मेन्यू",
"vector-toc-menu-tooltip": "विषयसूची",
"vector-toc-collapsible-button-label": "विषयसूची को टॉगल करें",
"vector-article-tools-nav-label": "उपकरण",
"vector-site-nav-label": "साइट",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|चर्चा]]",
"tooltip-vector-anon-user-menu-title": "अन्य विकल्प"

View File

@ -54,6 +54,7 @@
"vector-main-menu-tooltip": "Glavni izbornik",
"vector-toc-menu-tooltip": "Sadržaj",
"vector-toc-collapsible-button-label": "Prikaz sadržaja stranice",
"vector-article-tools-nav-label": "Alati",
"vector-site-nav-label": "Mrežno mjesto",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Rasprava]]",
"tooltip-vector-anon-user-menu-title": "Više mogućnosti"

View File

@ -36,6 +36,7 @@
"vector-main-menu-tooltip": "Meni prensipal la",
"vector-toc-menu-tooltip": "Tab dèmatyè",
"vector-toc-collapsible-button-label": "Deklannche tab dèmatyè la",
"vector-article-tools-nav-label": "Bwat zouti",
"vector-site-nav-label": "Sit",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskisyon]]",
"tooltip-vector-anon-user-menu-title": "Plis opsyon"

View File

@ -54,6 +54,7 @@
"vector-main-menu-tooltip": "Főmenü",
"vector-toc-menu-tooltip": "Tartalomjegyzék",
"vector-toc-collapsible-button-label": "Tartalomjegyzék kinyitása/becsukása",
"vector-article-tools-nav-label": "Eszközök",
"vector-site-nav-label": "Wiki",
"tooltip-vector-anon-user-menu-title": "További lehetőségek"
}

View File

@ -38,6 +38,7 @@
"vector-anon-user-menu-pages-learn": "leger plus",
"vector-anon-user-menu-pages-label": "Leger plus sur le modification",
"vector-main-menu-tooltip": "Menu principal",
"vector-article-tools-nav-label": "Instrumentos",
"vector-site-nav-label": "Sito",
"tooltip-vector-anon-user-menu-title": "Plus optiones"
}

View File

@ -57,6 +57,7 @@
"vector-anon-user-menu-pages-label": "Pelajari lebih lanjut tentang menyunting",
"vector-main-menu-tooltip": "Menu utama",
"vector-toc-menu-tooltip": "Daftar Isi",
"vector-article-tools-nav-label": "Perkakas",
"vector-site-nav-label": "Situs",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskusi]]",
"tooltip-vector-anon-user-menu-title": "Opsi lainnya"

View File

@ -50,5 +50,6 @@
"vector-anon-user-menu-pages": "Pagine per utenti anonimi",
"vector-anon-user-menu-pages-learn": "ulteriori informazioni",
"vector-main-menu-tooltip": "Menu principale",
"vector-article-tools-nav-label": "Strumenti",
"vector-site-nav-label": "Sito"
}

View File

@ -5,7 +5,6 @@
"Amire80",
"Foomin10",
"Fryed-peach",
"Jaw Salvager",
"Kkairri",
"LNDDYL",
"Marine-Blue",
@ -24,7 +23,8 @@
"しぃ",
"ひまり",
"春春眠眠",
"青子守歌"
"青子守歌",
"Jaw Salvager"
]
},
"skinname-vector": "レガシー ベクター (2010年版)",
@ -73,6 +73,7 @@
"vector-main-menu-tooltip": "メインメニュー",
"vector-toc-menu-tooltip": "目次",
"vector-toc-collapsible-button-label": "目次の表示・非表示を切り替え",
"vector-article-tools-nav-label": "ツール",
"vector-site-nav-label": "サイト",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|議論]]",
"tooltip-vector-anon-user-menu-title": "その他の操作"

View File

@ -56,6 +56,7 @@
"vector-main-menu-tooltip": "მთავარი მენიუ",
"vector-toc-menu-tooltip": "სარჩევი",
"vector-toc-collapsible-button-label": "სარჩევის დამალვა/ჩვენება",
"vector-article-tools-nav-label": "ხელსაწყოები",
"vector-site-nav-label": "საიტი",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|დისკუსია]]",
"tooltip-vector-anon-user-menu-title": "მეტი შესაძლებლობა"

View File

@ -3,12 +3,12 @@
"authors": [
"Arystanbek",
"Daniyar",
"Darzz",
"GaiJin",
"Hedeyohu22",
"Kaztrans",
"U.ayaao.p",
"СеніңШешең"
"СеніңШешең",
"Darzz"
]
},
"skinname-vector": "Ескі Vector (2010)",
@ -58,6 +58,7 @@
"vector-main-menu-tooltip": "Басты мәзір",
"vector-toc-menu-tooltip": "Мазмұны",
"vector-toc-collapsible-button-label": "Мазмұнды көрсету/жасыру",
"vector-article-tools-nav-label": "Құралдар",
"vector-site-nav-label": "Сайт",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Талқылау]]",
"tooltip-vector-anon-user-menu-title": "Басқа баптаулар"

View File

@ -63,6 +63,7 @@
"vector-main-menu-tooltip": "주 메뉴",
"vector-toc-menu-tooltip": "목차",
"vector-toc-collapsible-button-label": "목차 토글",
"vector-article-tools-nav-label": "도구",
"vector-site-nav-label": "사이트",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|토론]]",
"tooltip-vector-anon-user-menu-title": "더 많은 옵션"

View File

@ -50,6 +50,7 @@
"vector-main-menu-tooltip": "Haaptmenü",
"vector-toc-menu-tooltip": "Inhaltsverzeechnes",
"vector-toc-collapsible-button-label": "Inhaltsverzeechnes wiesselen",
"vector-article-tools-nav-label": "Geschierkëscht",
"vector-site-nav-label": "Site",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskussioun]]",
"tooltip-vector-anon-user-menu-title": "Méi Optiounen"

View File

@ -50,6 +50,7 @@
"vector-main-menu-tooltip": "Menù prinçipâ",
"vector-toc-menu-tooltip": "Tabélla di contegnûi",
"vector-toc-collapsible-button-label": "Altèrna a tabélla di contegnûi",
"vector-article-tools-nav-label": "Struménti",
"vector-site-nav-label": "Scîto",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Discusción]]",
"tooltip-vector-anon-user-menu-title": "Âtre scèlte"

View File

@ -44,6 +44,7 @@
"vector-main-menu-tooltip": "Galvenā izvēlne",
"vector-toc-menu-tooltip": "Satura rādītājs",
"vector-toc-collapsible-button-label": "Pārslēgt satura rādītāju",
"vector-article-tools-nav-label": "Rīki",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskusija]]",
"tooltip-vector-anon-user-menu-title": "Vairāk iespēju"
}

View File

@ -1,16 +0,0 @@
{
"@metadata": {
"authors": [
"ऐक्टिवेटेड्"
]
},
"vector-language-button-label": "{{PLURAL:$1|$1 भासा|$1 भासासभ}}",
"vector-action-addsection": "बिसय जोड़",
"vector-action-move": "स्थानान्तरन",
"vector-view-create": "बनाव",
"vector-view-edit": "सम्पादन",
"vector-view-history": "इतिहास देख",
"vector-view-view": "पढ़",
"vector-more-actions": "आउ",
"vector-searchsuggest-containing": "<strong class=\"cdx-typeahead-search__search-footer__query\">$1</strong> बाला पन्ना खोज"
}

View File

@ -53,6 +53,7 @@
"vector-main-menu-tooltip": "Главно мени",
"vector-toc-menu-tooltip": "Содржина",
"vector-toc-collapsible-button-label": "Прик./скр. содржина",
"vector-article-tools-nav-label": "Алатки",
"vector-site-nav-label": "Мрежно место",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Разговор]]",
"tooltip-vector-anon-user-menu-title": "Повеќе можности"

View File

@ -34,6 +34,7 @@
"vector-anon-user-menu-pages-learn": "കൂടുതൽ അറിയുക",
"vector-main-menu-tooltip": "പ്രധാന മെനു",
"vector-toc-menu-tooltip": "ഉള്ളടക്കപ്പട്ടിക",
"vector-article-tools-nav-label": "ഉപകരണങ്ങൾ",
"vector-site-nav-label": "സൈറ്റ്",
"tooltip-vector-anon-user-menu-title": "കൂടുതൽ ഐച്ഛികങ്ങൾ"
}

View File

@ -33,5 +33,6 @@
"vector-main-menu-tooltip": "Үндсэн цэс",
"vector-toc-menu-tooltip": "Гарчиг",
"vector-toc-collapsible-button-label": "Гарчигийг нээж хаах",
"vector-article-tools-nav-label": "Хэрэглүүр",
"vector-site-nav-label": "Сайт"
}

View File

@ -47,6 +47,7 @@
"vector-main-menu-tooltip": "Menu prinċipali",
"vector-toc-menu-tooltip": "Werrej",
"vector-toc-collapsible-button-label": "Aħbi jew uri l-werrej",
"vector-article-tools-nav-label": "Għodda",
"vector-site-nav-label": "Sit",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskussjoni]]",
"tooltip-vector-anon-user-menu-title": "Aktar għażliet"

View File

@ -3,7 +3,6 @@
"authors": [
"C.R.",
"Chelin",
"Finizio",
"Ruthven",
"Sannita"
]
@ -21,6 +20,5 @@
"vector-view-history": "Vide 'a cronologgia",
"vector-view-view": "Liegge",
"vector-view-viewsource": "Vire sorgente",
"vector-more-actions": "Cchiù",
"vector-searchsuggest-containing": "Truova 'e paggene ca teneno <strong class=\"cdx-typeahead-search__search-footer__query\">$1</strong>"
"vector-more-actions": "Cchiù"
}

View File

@ -54,6 +54,7 @@
"vector-main-menu-tooltip": "Hovedmeny",
"vector-toc-menu-tooltip": "Innholdsfortegnelse",
"vector-toc-collapsible-button-label": "Vis/skjul innholdsfortegnelsen",
"vector-article-tools-nav-label": "Verktøy",
"vector-site-nav-label": "Nettsted",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskusjon]]",
"tooltip-vector-anon-user-menu-title": "Flere alternativer"

View File

@ -54,6 +54,7 @@
"vector-main-menu-tooltip": "मुख्य सूचीपत्र",
"vector-toc-menu-tooltip": "विषयसूची",
"vector-toc-collapsible-button-label": "सामग्रीको तालिका सक्षम गर्नुहोस्",
"vector-article-tools-nav-label": "उपकरणहरू",
"vector-site-nav-label": "साइट",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|चर्चा]]",
"tooltip-vector-anon-user-menu-title": "थप विकल्पहरू"

View File

@ -54,6 +54,7 @@
"vector-anon-user-menu-pages-label": "Meer leren over bewerken",
"vector-main-menu-tooltip": "Hoofdmenu",
"vector-toc-menu-tooltip": "Inhoudsopgave",
"vector-article-tools-nav-label": "Hulpmiddelen",
"vector-site-nav-label": "Site",
"tooltip-vector-anon-user-menu-title": "Meer opties"
}

View File

@ -49,6 +49,7 @@
"vector-main-menu-tooltip": "Hovudmeny",
"vector-toc-menu-tooltip": "Innhaldsliste",
"vector-toc-collapsible-button-label": "Vis/skjul innhaldslista",
"vector-article-tools-nav-label": "Verktøy",
"vector-site-nav-label": "Nettstad",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskusjon]]",
"tooltip-vector-anon-user-menu-title": "Fleire val"

View File

@ -3,10 +3,10 @@
"authors": [
"Aalam",
"Babanwalia",
"Bgo eiu",
"Raj Singh",
"TariButtar",
"Tow"
"Tow",
"Bgo eiu"
]
},
"vector-skin-desc": "ਮੋਨੋਬੁੱਕ ਦੀ ਆਧੁਨਿਕ ਵਰਜਨ ਜਿਸ ਵਿਚ ਤਾਜ਼ਾ ਦਿੱਖ ਅਤੇ ਬਹੁਤ ਸਾਰੇ ਉਪਯੋਗਤਾ ਸੁਧਾਰ ਹਨ",

View File

@ -56,6 +56,7 @@
"vector-main-menu-tooltip": "Główne menu",
"vector-toc-menu-tooltip": "Spis treści",
"vector-toc-collapsible-button-label": "Przełącz stan spisu treści",
"vector-article-tools-nav-label": "Narzędzia",
"vector-site-nav-label": "Witryna",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|dyskusja]]",
"tooltip-vector-anon-user-menu-title": "Więcej opcji"

View File

@ -3,8 +3,8 @@
"authors": [
"Abbas dhothar",
"Arslan",
"Bgo eiu",
"Khalid Mahmood"
"Khalid Mahmood",
"Bgo eiu"
]
},
"vector-language-button-label": "{{PLURAL:$1|$1 بولی|$1 بولیاں}}",

View File

@ -56,5 +56,6 @@
"vector-anon-user-menu-pages-learn": "saiba mais",
"vector-anon-user-menu-pages-label": "Saiba mais sobre edição",
"vector-main-menu-tooltip": "Menu principal",
"vector-article-tools-nav-label": "Ferramentas",
"tooltip-vector-anon-user-menu-title": "Mais opções"
}

View File

@ -60,6 +60,7 @@
"vector-main-menu-tooltip": "Menu principal",
"vector-toc-menu-tooltip": "Índice",
"vector-toc-collapsible-button-label": "Alternar o índice",
"vector-article-tools-nav-label": "Ferramentas",
"vector-site-nav-label": "''Site''",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Discussão]]",
"tooltip-vector-anon-user-menu-title": "Mais opções"

View File

@ -64,6 +64,7 @@
"vector-main-menu-tooltip": "Used as title attribute for main menu icon on hover.",
"vector-toc-menu-tooltip": "Used as title attribute for table of contents icon on hover.",
"vector-toc-collapsible-button-label": "Used as the label for the table of contents collapsible toggle button",
"vector-article-tools-nav-label": "Accessible label for the article tools nav landmark",
"vector-site-nav-label": "Accessible label for site (main menu) nav landmark",
"vector-2022-prefs-talkpage": "Link to the desktop improvements project talk page which is shown before the preview link in skin preferences. See T307113 for more information.",
"tooltip-vector-anon-user-menu-title": "Used as title attribute for user menu icon on hover for anonymous users."

View File

@ -23,5 +23,6 @@
"vector-searchsuggest-containing": "Найдз боки хтори содержа <strong class=\"cdx-typeahead-search__search-footer__query\">$1</strong>",
"vector-toc-heading": "Змист",
"vector-toc-toggle-position-title": "скриц",
"vector-anon-user-menu-pages-learn": "дознайце вецей"
"vector-anon-user-menu-pages-learn": "дознайце вецей",
"vector-article-tools-nav-label": "Алатки"
}

View File

@ -69,6 +69,7 @@
"vector-main-menu-tooltip": "Главное меню",
"vector-toc-menu-tooltip": "Содержание",
"vector-toc-collapsible-button-label": "Скрыть/показать содержание",
"vector-article-tools-nav-label": "Инструменты",
"vector-site-nav-label": "Сайт",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Обсуждение]]",
"tooltip-vector-anon-user-menu-title": "Больше возможностей"

View File

@ -51,6 +51,7 @@
"vector-main-menu-tooltip": "Glavni meni",
"vector-toc-menu-tooltip": "Kazalo vsebine",
"vector-toc-collapsible-button-label": "Vklopi kazalo vsebine",
"vector-article-tools-nav-label": "Orodja",
"vector-site-nav-label": "Projekt",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Pogovor]]",
"tooltip-vector-anon-user-menu-title": "Več možnosti"

View File

@ -50,6 +50,7 @@
"vector-anon-user-menu-pages-learn": "детаљније",
"vector-anon-user-menu-pages-label": "Детаљније о уређивању",
"vector-main-menu-tooltip": "Главни мени",
"vector-article-tools-nav-label": "Алатке",
"vector-site-nav-label": "Сајт",
"tooltip-vector-anon-user-menu-title": "Више опција"
}

View File

@ -31,5 +31,6 @@
"vector-jumptosearch": "Idi na pretragu",
"vector-more-actions": "Više",
"vector-toc-heading": "Sadržaj",
"vector-toc-beginning": "Početak"
"vector-toc-beginning": "Početak",
"vector-article-tools-nav-label": "Alatke"
}

View File

@ -2,9 +2,9 @@
"@metadata": {
"authors": [
"Amire80",
"Coldfact",
"Gustave London",
"Tšepo"
"Tšepo",
"Coldfact"
]
},
"vector-language-button-label": "{{PLURAL:$1|$1 puo|$1 lipuo}}",

View File

@ -56,6 +56,7 @@
"vector-main-menu-tooltip": "Huvudmeny",
"vector-toc-menu-tooltip": "Innehållsförteckning",
"vector-toc-collapsible-button-label": "Växla innehållsförteckningen",
"vector-article-tools-nav-label": "Verktyg",
"vector-site-nav-label": "Webbplats",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Diskussion]]",
"tooltip-vector-anon-user-menu-title": "Fler alternativ"

View File

@ -5,8 +5,8 @@
"AnakngAraw",
"GinawaSaHapon",
"Ianlopez1115",
"Jojit fb",
"Sky Harbor"
"Sky Harbor",
"Jojit fb"
]
},
"skinname-vector": "Vector",

View File

@ -62,6 +62,7 @@
"vector-anon-user-menu-pages-label": "Düzenleme hakkında daha fazla bilgi edinin",
"vector-main-menu-tooltip": "Ana menü",
"vector-toc-menu-tooltip": "İçindekiler",
"vector-article-tools-nav-label": "Araçlar",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Tartışma]]",
"tooltip-vector-anon-user-menu-title": "Daha fazla seçenek"
}

View File

@ -64,6 +64,7 @@
"vector-main-menu-tooltip": "Головне меню",
"vector-toc-menu-tooltip": "Зміст",
"vector-toc-collapsible-button-label": "Сховати/показати зміст",
"vector-article-tools-nav-label": "Інструменти",
"vector-site-nav-label": "Сайт",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Обговорення]]",
"tooltip-vector-anon-user-menu-title": "Більше опцій"

View File

@ -32,7 +32,6 @@
"vector-language-button-aria-label": "Xem bài viết trong ngôn ngữ khác. Bài có sẵn trong {{PLURAL:$1}}$1 ngôn ngữ",
"vector-language-button-label": "$1 ngôn ngữ",
"vector-no-language-button-label": "Thêm ngôn ngữ",
"vector-no-language-button-aria-label": "Bài viết này chỉ tồn tại bằng ngôn ngữ này. Thêm bài viết cho các ngôn ngữ khác",
"vector-language-redirect-to-top": "Ở {{SITENAME}} này, các liên kết giữa ngôn ngữ nằm ở đầu trang, đối diện với tiêu đề bài viết. [[#p-lang-btn|Đi tới đầu trang]].",
"vector-language-variant-switcher-label": "Thay đổi biến thể ngôn ngữ",
"vector-action-addsection": "Thêm đề tài",
@ -63,6 +62,7 @@
"vector-anon-user-menu-pages-label": "Tìm hiểu thêm về sửa đổi",
"vector-main-menu-tooltip": "Trình đơn chính",
"vector-toc-menu-tooltip": "Mục lục",
"vector-article-tools-nav-label": "Công cụ",
"vector-site-nav-label": "Trang Web",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Thảo luận]]",
"tooltip-vector-anon-user-menu-title": "Thêm tùy chọn"

View File

@ -53,6 +53,7 @@
"vector-main-menu-tooltip": "Fakatu'utu'u tāfito",
"vector-toc-menu-tooltip": "Laupapa fakatu'utu'u",
"vector-toc-collapsible-button-label": "Ave kehe te laupapa fakatu'utu'u",
"vector-article-tools-nav-label": "Me'a gaue",
"vector-site-nav-label": "Site",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|Felogo'i]]",
"tooltip-vector-anon-user-menu-title": "Hoko atu"

View File

@ -1,7 +1,6 @@
{
"@metadata": {
"authors": [
"Deryck Chan",
"Hello903hello",
"Ktchankt",
"Moon0319",
@ -21,10 +20,7 @@
"vector.js": "/* 響每一次個頁面載入時用域達畫面嘅用戶都會載入呢度任何嘅JavaScript */",
"vector-action-toggle-sidebar": "邊欄開閂",
"vector-languages": "語言",
"vector-language-button-aria-label": "去睇另一種語文嘅文章。有$1種語言版本。",
"vector-language-button-label": "{{PLURAL:$1|$1種語言}}",
"vector-no-language-button-label": "加語言",
"vector-no-language-button-aria-label": "呢篇文淨係喺呢種語言先有。喺第種語言開呢篇文。",
"vector-language-redirect-to-top": "喺呢個{{SITENAME}}度,其他語言嘅連結喺頁頂文章標題側邊。[[#p-lang-btn|去頁頂]]。",
"vector-action-addsection": "加主題",
"vector-action-delete": "剷走",
@ -43,12 +39,5 @@
"vector-more-actions": "多啲",
"vector-search-loader": "載入緊搜索提議",
"vector-searchsuggest-containing": "搵包含 <strong class=\"cdx-typeahead-search__search-footer__query\">$1</strong> 嘅版",
"vector-toc-heading": "目錄",
"vector-toc-toggle-position-title": "收埋",
"vector-toc-beginning": "文頭",
"vector-anon-user-menu-pages-learn": "知多啲",
"vector-main-menu-tooltip": "主目錄",
"vector-toc-menu-tooltip": "內容一覽",
"vector-toc-collapsible-button-label": "開/收內容一覽",
"vector-site-nav-label": "站點"
"vector-toc-heading": "目錄"
}

View File

@ -80,6 +80,7 @@
"vector-main-menu-tooltip": "主菜单",
"vector-toc-menu-tooltip": "目录",
"vector-toc-collapsible-button-label": "切换目录",
"vector-article-tools-nav-label": "工具",
"vector-site-nav-label": "站点",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|讨论]]",
"tooltip-vector-anon-user-menu-title": "更多选项"

View File

@ -65,6 +65,7 @@
"vector-main-menu-tooltip": "主選單",
"vector-toc-menu-tooltip": "目次",
"vector-toc-collapsible-button-label": "切換目錄",
"vector-article-tools-nav-label": "工具",
"vector-site-nav-label": "站台",
"vector-2022-prefs-talkpage": "[[mw:Talk:Reading/Web/Desktop_Improvements|討論]]",
"tooltip-vector-anon-user-menu-title": "更多選項"

View File

@ -98,6 +98,17 @@ final class Constants {
*/
public const REQUIREMENT_LANGUAGE_IN_HEADER = 'LanguageInHeader';
/**
* Defines whether or not the Language in header A/B test is running. See
* https://phabricator.wikimedia.org/T280825 for additional detail about the test.
*
* Note well that if the associated config value is falsy, then we fall back to choosing the
* language treatment based on the `VectorLanguageInHeader` config variable.
*
* @var string
*/
public const CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST = 'VectorLanguageInHeaderTreatmentABTest';
/**
* @var string
*/
@ -198,12 +209,12 @@ final class Constants {
/**
* @var string
*/
public const FEATURE_TABLE_OF_CONTENTS_AB_TEST = 'TableOfContentsLegacyTOC';
public const FEATURE_TABLE_OF_CONTENTS = 'TableOfContents';
/**
* @var string
*/
public const REQUIREMENT_TABLE_OF_CONTENTS_AB_TEST = 'TableOfContentsLegacy';
public const REQUIREMENT_TABLE_OF_CONTENTS = 'TableOfContents';
/**
* @var string
@ -225,21 +236,6 @@ final class Constants {
*/
public const CONFIG_KEY_VISUAL_ENHANCEMENTS = 'VectorVisualEnhancementNext';
/**
* @var string
*/
public const CONFIG_ARTICLE_TOOLS = 'VectorArticleTools';
/**
* @var string
*/
public const REQUIREMENT_ARTICLE_TOOLS = 'ArticleTools';
/**
* @var string
*/
public const FEATURE_ARTICLE_TOOLS = 'ArticleTools';
/**
* This class is for namespacing constants only. Forbid construction.
* @throws FatalError

View File

@ -52,7 +52,7 @@ final class TableOfContentsTreatmentRequirement implements Requirement {
* @inheritDoc
*/
public function getName(): string {
return Constants::REQUIREMENT_TABLE_OF_CONTENTS_AB_TEST;
return Constants::REQUIREMENT_TABLE_OF_CONTENTS;
}
/**

View File

@ -98,7 +98,7 @@ class Hooks implements
Config $config
) {
return [
'wgVectorSearchApiUrl' => $config->get( 'VectorSearchApiUrl' ),
'wgVectorSearchHost' => $config->get( 'VectorSearchHost' ),
'wgVectorWebABTestEnrollment' => self::getActiveABTest( $config ),
];
}
@ -153,7 +153,7 @@ class Hooks implements
}
/**
* Moves watch item from actions to views menu.
* Transforms watch item inside the action navigation menu
*
* @param array &$content_navigation
*/
@ -167,62 +167,16 @@ class Hooks implements
}
// Promote watch link from actions to views and add an icon
// The second check to isset is pointless but shuts up phan.
if ( $key !== null && isset( $content_navigation['actions'][ $key ] ) ) {
if ( $key !== null ) {
self::appendClassToItem(
$content_navigation['actions'][$key]['class'],
[ 'icon' ]
);
$content_navigation['views'][$key] = $content_navigation['actions'][$key];
unset( $content_navigation['actions'][$key] );
}
}
/**
* Adds icons to items in the "views" menu.
*
* @param array &$content_navigation
* @param bool $isLegacy is this the legacy Vector skin?
*/
private static function updateViewsMenuIcons( &$content_navigation, $isLegacy ) {
$featureManager = VectorServices::getFeatureManager();
$visualEnhancements = $featureManager->isFeatureEnabled( Constants::FEATURE_VISUAL_ENHANCEMENTS );
foreach ( $content_navigation['views'] as $key => $item ) {
$icon = $item['icon'] ?? null;
if ( $icon ) {
if ( $isLegacy || !$featureManager->isFeatureEnabled( Constants::FEATURE_VISUAL_ENHANCEMENTS ) ) {
self::appendClassToItem(
$item['class'],
[ 'icon' ]
);
} else {
// Force the item as a button with hidden text.
$item['button'] = true;
$item['text-hidden'] = true;
$item = self::updateMenuItemData( $item, true );
}
} else {
self::appendClassToItem(
$item['class'],
[ 'vector-tab-noicon' ]
);
}
$content_navigation['views'][$key] = $item;
}
}
/**
* All associated pages menu items do not have icons so are given the vector-tab-noicon class.
*
* @param array &$content_navigation
*/
private static function updateAssociatedPagesMenuIcons( &$content_navigation ) {
foreach ( $content_navigation['associated-pages'] as $key => $item ) {
self::appendClassToItem(
$item['class'],
[ 'vector-tab-noicon' ]
);
$content_navigation['associated-pages'][$key] = $item;
}
}
/**
* Adds class to a property
*
@ -317,8 +271,6 @@ class Hooks implements
private static function updateUserLinksOverflowItems( $sk, &$content_navigation ) {
$overflow = 'vector-user-menu-overflow';
$content_navigation[$overflow] = [];
$featureManager = VectorServices::getFeatureManager();
$visualEnhancements = $featureManager->isFeatureEnabled( Constants::FEATURE_VISUAL_ENHANCEMENTS );
// Logged in and logged out overflow items
if ( isset( $content_navigation['user-interface-preferences']['uls'] ) ) {
@ -342,22 +294,6 @@ class Hooks implements
if ( isset( $content_navigation['notifications'] ) ) {
foreach ( $content_navigation['notifications'] as $key => $data ) {
$content_navigation[$overflow][$key] = $data;
$icon = $data['icon'] ?? null;
if ( $visualEnhancements && $icon ) {
$linkClass = $content_navigation[$overflow][$key]['link-class'];
$item = $content_navigation[$overflow][$key];
$newLinkClass = [
// Allows Echo to react to clicks
'mw-echo-notification-badge-nojs'
];
if ( in_array( 'mw-echo-unseen-notifications', $linkClass ) ) {
$newLinkClass[] = 'mw-echo-unseen-notifications';
}
$item['button'] = true;
$item['text-hidden'] = true;
$item['link-class'] = $newLinkClass;
$content_navigation[$overflow][$key] = $item;
}
}
}
if ( isset( $content_navigation['user-menu']['watchlist'] ) ) {
@ -440,10 +376,9 @@ class Hooks implements
* @param array $item data to update
* @param string $buttonClassProp property to append button classes
* @param string $iconHtmlProp property to set icon HTML
* @param bool $isSmallIcon when set a small icon will be applied rather than the standard icon size
* @return array $item Updated data
*/
private static function updateItemData( $item, $buttonClassProp, $iconHtmlProp, $isSmallIcon = false ) {
private static function updateItemData( $item, $buttonClassProp, $iconHtmlProp ) {
$hasButton = $item['button'] ?? false;
$hideText = $item['text-hidden'] ?? false;
$isCollapsible = $item['collapsible'] ?? false;
@ -468,9 +403,6 @@ class Hooks implements
// We should seek to remove all these instances.
'mw-ui-icon-wikimedia-' . $icon
];
if ( $isSmallIcon ) {
$iconElementClasses[] = 'mw-ui-icon-small';
}
self::appendClassToItem( $item[ $buttonClassProp ], $iconElementClasses );
} else {
$item[ $iconHtmlProp ] = self::makeIcon( $icon );
@ -507,13 +439,12 @@ class Hooks implements
* Updates template data for Vector menu items.
*
* @param array $item menu item data to update
* @param bool $isSmallIcon when set a small icon will be applied rather than the standard icon size
* @return array $item Updated menu item data
*/
public static function updateMenuItemData( $item, $isSmallIcon = false ) {
public static function updateMenuItemData( $item ) {
$buttonClassProp = 'link-class';
$iconHtmlProp = 'link-html';
return self::updateItemData( $item, $buttonClassProp, $iconHtmlProp, $isSmallIcon );
return self::updateItemData( $item, $buttonClassProp, $iconHtmlProp );
}
/**
@ -569,27 +500,19 @@ class Hooks implements
$title = $sk->getRelevantTitle();
$skinName = $sk->getSkinName();
// These changes should only happen in Vector.
if ( !$skinName || !self::isVectorSkin( $skinName ) ) {
return;
}
if ( self::isVectorSkin( $skinName ) ) {
if (
$sk->getConfig()->get( 'VectorUseIconWatch' ) &&
$title && $title->canExist()
) {
self::updateActionsMenu( $content_navigation );
}
if (
$sk->getConfig()->get( 'VectorUseIconWatch' ) &&
$title && $title->canExist()
) {
self::updateActionsMenu( $content_navigation );
self::updateUserLinksItems( $sk, $content_navigation );
}
self::updateUserLinksItems( $sk, $content_navigation );
if ( $skinName === Constants::SKIN_NAME_MODERN ) {
self::createMoreOverflowMenu( $content_navigation );
}
// The updating of the views menu happens /after/ the overflow menu has been created
// this avoids icons showing in the more overflow menu.
self::updateViewsMenuIcons( $content_navigation, self::isSkinVersionLegacy( $skinName ) );
self::updateAssociatedPagesMenuIcons( $content_navigation );
}
/**
@ -726,9 +649,6 @@ class Hooks implements
$bodyAttrs['class'] .= ' skin-vector-disable-max-width';
}
// TOC is not collapsed by default
$bodyAttrs['class'] .= ' vector-toc-not-collapsed';
$featureManager = VectorServices::getFeatureManager();
$bodyAttrs['class'] .= ' ' . implode( ' ', $featureManager->getFeatureBodyClass() );
$bodyAttrs['class'] = trim( $bodyAttrs['class'] );

View File

@ -53,7 +53,8 @@ return [
$services->getCentralIdLookupFactory()->getNonLocalLookup(),
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER,
Constants::REQUIREMENT_LANGUAGE_IN_HEADER,
null
null,
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST
)
);
@ -62,9 +63,13 @@ return [
// Temporary T286932 - remove after languages A/B test is finished.
$requirementName = 'T286932';
// MultiConfig checks each config in turn, allowing us to override the main config for specific keys.
// MultiConfig checks each config in turn, allowing us to override the main config for specific keys. In this
// case, override the "VectorLanguageInHeaderABTest" configuration value so that the following requirement
// always buckets the user as if the language treatment A/B test were running.
$config = new MultiConfig( [
new HashConfig( [] ),
new HashConfig( [
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST => true,
] ),
$services->getMainConfig(),
] );
@ -76,7 +81,8 @@ return [
$services->getCentralIdLookupFactory()->getNonLocalLookup(),
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER,
$requirementName,
/* $overrideName = */ ''
/* $overrideName = */ '',
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST
)
);
@ -193,10 +199,10 @@ return [
);
$featureManager->registerFeature(
Constants::FEATURE_TABLE_OF_CONTENTS_AB_TEST,
Constants::FEATURE_TABLE_OF_CONTENTS,
[
Constants::REQUIREMENT_FULLY_INITIALISED,
Constants::REQUIREMENT_TABLE_OF_CONTENTS_AB_TEST,
Constants::REQUIREMENT_TABLE_OF_CONTENTS,
]
);
@ -221,26 +227,6 @@ return [
]
);
// Feature: Article tools menu
// ================================
$featureManager->registerRequirement(
new OverridableConfigRequirement(
$services->getMainConfig(),
$context->getUser(),
$context->getRequest(),
null,
Constants::CONFIG_ARTICLE_TOOLS,
Constants::REQUIREMENT_ARTICLE_TOOLS
)
);
$featureManager->registerFeature(
Constants::FEATURE_ARTICLE_TOOLS,
[
Constants::REQUIREMENT_FULLY_INITIALISED,
Constants::REQUIREMENT_ARTICLE_TOOLS,
]
);
return $featureManager;
}
];

View File

@ -222,17 +222,19 @@ abstract class SkinVector extends SkinMustache {
/**
* Returns HTML for the create account link inside the anon user links
* @param string[] $returnto array of query strings used to build the login link
* @param bool $isDropdownItem Set true for create account link inside the user menu dropdown
* which includes icon classes and is not styled like a button
* @return string
*/
private function getCreateAccountHTML( $returnto ) {
private function getCreateAccountHTML( $returnto, $isDropdownItem ) {
$createAccountData = $this->buildCreateAccountData( $returnto );
$createAccountData = array_merge( $createAccountData, [
'class' => [
'class' => $isDropdownItem ? [
'vector-menu-content-item',
],
] : '',
'collapsible' => true,
'icon' => $createAccountData['icon'],
'button' => false
'icon' => $isDropdownItem ? $createAccountData['icon'] : null,
'button' => !$isDropdownItem,
] );
$createAccountData = Hooks::updateLinkData( $createAccountData );
return $this->makeLink( 'create-account', $createAccountData );
@ -252,7 +254,7 @@ abstract class SkinVector extends SkinMustache {
] );
$loginLinkData = Hooks::updateLinkData( $loginLinkData );
$templateData = [
'htmlCreateAccount' => $this->getCreateAccountHTML( $returnto ),
'htmlCreateAccount' => $this->getCreateAccountHTML( $returnto, true ),
'htmlLogin' => $this->makeLink( 'login', $loginLinkData ),
];
@ -833,12 +835,8 @@ abstract class SkinVector extends SkinMustache {
string $key,
array $portletData
): array {
$isIconDropdown = false;
switch ( $key ) {
case 'data-user-menu':
$type = self::MENU_TYPE_DROPDOWN;
$isIconDropdown = true;
break;
case 'data-actions':
case 'data-variants':
case 'data-sticky-header-toc':
@ -876,11 +874,6 @@ abstract class SkinVector extends SkinMustache {
$portletData['class'] .= ' vector-user-menu-overflow';
}
$isDropdown = $type === self::MENU_TYPE_DROPDOWN;
if ( $isDropdown && !$isIconDropdown ) {
$portletData['class'] .= ' vector-menu-dropdown-noicon';
}
if ( $key === 'data-personal' && $this->isLegacy() ) {
// Set tooltip to empty string for the personal menu for both logged-in and logged-out users
// to avoid showing the tooltip for legacy version.
@ -907,7 +900,7 @@ abstract class SkinVector extends SkinMustache {
);
return $portletData + [
'is-dropdown' => $isDropdown,
'is-dropdown' => $type === self::MENU_TYPE_DROPDOWN,
'is-portal' => $type === self::MENU_TYPE_PORTAL,
];
}

View File

@ -45,7 +45,7 @@ class SkinVector22 extends SkinVector {
*/
public function isUserInTocTreatmentBucket(): bool {
$featureManager = VectorServices::getFeatureManager();
return !$featureManager->isFeatureEnabled( Constants::FEATURE_TABLE_OF_CONTENTS_AB_TEST );
return $featureManager->isFeatureEnabled( Constants::FEATURE_TABLE_OF_CONTENTS );
}
/**

View File

@ -1,25 +1,15 @@
<div class="vector-article-toolbar">
<nav class="vector-article-toolbar" aria-label="{{msg-vector-article-tools-nav-label}}"
role="navigation">
<div class="mw-article-toolbar-container">
{{#data-portlets}}
<div id="left-navigation">
<nav aria-label="{{msg-namespaces}}">
{{#data-associated-pages}}{{>Menu}}{{/data-associated-pages}}
{{#data-variants}}{{>Menu}}{{/data-variants}}
</nav>
{{#data-associated-pages}}{{>Menu}}{{/data-associated-pages}}
{{#data-variants}}{{>Menu}}{{/data-variants}}
</div>
<div id="right-navigation" class="vector-collapsible">
{{#data-views}}
<nav aria-label="{{msg-views}}">
{{>Menu}}
</nav>
{{/data-views}}
{{#data-actions}}
<nav aria-label="{{msg-tooltip-p-cactions}}">
{{>Menu}}
</nav>
{{/data-actions}}
<div id="right-navigation" class="vector-collapsible {{#data-views.is-empty}}{{#data-actions.is-empty}}right-navigation-empty{{/data-actions.is-empty}}{{/data-views.is-empty}}">
{{#data-views}}{{>Menu}}{{/data-views}}
{{#data-actions}}{{>Menu}}{{/data-actions}}
</div>
{{/data-portlets}}
</div>
</div>
</nav>

View File

@ -2,7 +2,17 @@
Content Header - Main <H1> title for all pages, with either the indicators or language selector.
When language button is visible, indicators are placed in the ContentSubheader.mustache template instead.
}}
<header class="mw-body-header vector-page-titlebar{{#is-title-blank}} vector-page-titlebar-blank{{/is-title-blank}}">
<header class="mw-body-header">
{{#is-language-in-content-top}}
{{#data-portlets.data-languages}}
{{>Menu}}
{{/data-portlets.data-languages}}
{{/is-language-in-content-top}}
{{^is-language-in-content-top}}
{{>Indicators}}
{{/is-language-in-content-top}}
{{#data-toc}}
<label
id="vector-toc-collapsed-button"
@ -16,16 +26,5 @@
{{msg-vector-toc-collapsible-button-label}}
</label>
{{/data-toc}}
{{{html-title-heading}}}
{{#is-language-in-content-top}}
{{#data-portlets.data-languages}}
{{>Menu}}
{{/data-portlets.data-languages}}
{{/is-language-in-content-top}}
{{^is-language-in-content-top}}
{{>Indicators}}
{{/is-language-in-content-top}}
</header>

View File

@ -10,7 +10,7 @@
{{#is-vector-toc-beginning-enabled}}
<li id="toc-mw-content-text"
class="sidebar-toc-list-item sidebar-toc-level-1">
<a href="#" class="sidebar-toc-link">
<a href="#top-page" class="sidebar-toc-link">
<div class="sidebar-toc-text">{{ msg-vector-toc-beginning }}</div>
</a>
</li>

View File

@ -1,8 +1,6 @@
<div class="mw-table-of-contents-container">
{{! T313060 Additional container div needed to prevent the sticky element from being siblings with the footer }}
{{#data-toc}}
<div class="vector-sticky-toc-container">
{{>TableOfContents}}
<div class="vector-sticky-toc-container mw-sticky-header-element">
{{#data-toc}}{{>TableOfContents}}{{/data-toc}}
</div>
{{/data-toc}}
</div>

View File

@ -1,6 +1,6 @@
<li id="toc-{{anchor}}"
class="sidebar-toc-list-item sidebar-toc-level-{{toclevel}}{{#is-top-level-section}}{{^vector-is-collapse-sections-enabled}} sidebar-toc-list-item-expanded{{/vector-is-collapse-sections-enabled}}{{/is-top-level-section}}">
<a class="sidebar-toc-link" href="#{{linkAnchor}}{{^linkAnchor}}{{anchor}}{{/linkAnchor}}">
<a class="sidebar-toc-link" href="#{{anchor}}">
<div class="sidebar-toc-text">
<span class="sidebar-toc-numb">{{number}}</span>{{{line}}}</div>
</a>

View File

@ -31,7 +31,8 @@
object data-footer for footer template partial. see Footer.mustache for documentation.
}}
<div class="mw-page-container">
<a class="mw-jump-link" href="#bodyContent">{{msg-vector-jumptocontent}}</a>
<span id="top-page"></span>
<a class="mw-jump-link" href="#content">{{msg-vector-jumptocontent}}</a>
<div class="mw-page-container-inner">
<input
type="checkbox"
@ -52,13 +53,12 @@
<div class="mw-content-container">
{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }}
<main id="content" class="mw-body" role="main">
<a id="top"></a>
{{>ContentHeader}}
{{>ArticleToolbar}}
<div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container>
<div id="bodyContent" class="vector-body" data-mw-ve-target-container>
{{>ContentSubheader}}
{{! the #contentSub element is currently used by editors, do not hide or remove it
until https://phabricator.wikimedia.org/T316830 has been addressed}}
<div id="contentSub"{{{html-user-language-attributes}}}>{{{html-subtitle}}}</div>
{{#html-subtitle}}<div id="contentSub"{{{html-user-language-attributes}}}>{{{.}}}</div>{{/html-subtitle}}
{{#html-undelete-link}}<div id="contentSub2">{{{.}}}</div>{{/html-undelete-link}}
{{{html-user-message}}}
{{{html-body-content}}}

View File

@ -29,10 +29,10 @@ module.exports = {
// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 25,
functions: 29,
lines: 32,
statements: 32
branches: 14,
functions: 24,
lines: 22,
statements: 22
}
},

132
package-lock.json generated
View File

@ -3192,13 +3192,13 @@
}
},
"@vue/compiler-core": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.37.tgz",
"integrity": "sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.33.tgz",
"integrity": "sha512-AAmr52ji3Zhk7IKIuigX2osWWsb2nQE5xsdFYjdnmtQ4gymmqXbjLvkSE174+fF3A3kstYrTgGkqgOEbsdLDpw==",
"dev": true,
"requires": {
"@babel/parser": "^7.16.4",
"@vue/shared": "3.2.37",
"@vue/shared": "3.2.33",
"estree-walker": "^2.0.2",
"source-map": "^0.6.1"
},
@ -3212,27 +3212,27 @@
}
},
"@vue/compiler-dom": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.37.tgz",
"integrity": "sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.33.tgz",
"integrity": "sha512-GhiG1C8X98Xz9QUX/RlA6/kgPBWJkjq0Rq6//5XTAGSYrTMBgcLpP9+CnlUg1TFxnnCVughAG+KZl28XJqw8uQ==",
"dev": true,
"requires": {
"@vue/compiler-core": "3.2.37",
"@vue/shared": "3.2.37"
"@vue/compiler-core": "3.2.33",
"@vue/shared": "3.2.33"
}
},
"@vue/compiler-sfc": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.37.tgz",
"integrity": "sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.33.tgz",
"integrity": "sha512-H8D0WqagCr295pQjUYyO8P3IejM3vEzeCO1apzByAEaAR/WimhMYczHfZVvlCE/9yBaEu/eu9RdiWr0kF8b71Q==",
"dev": true,
"requires": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.37",
"@vue/compiler-dom": "3.2.37",
"@vue/compiler-ssr": "3.2.37",
"@vue/reactivity-transform": "3.2.37",
"@vue/shared": "3.2.37",
"@vue/compiler-core": "3.2.33",
"@vue/compiler-dom": "3.2.33",
"@vue/compiler-ssr": "3.2.33",
"@vue/reactivity-transform": "3.2.33",
"@vue/shared": "3.2.33",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7",
"postcss": "^8.1.10",
@ -3248,72 +3248,72 @@
}
},
"@vue/compiler-ssr": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.37.tgz",
"integrity": "sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.33.tgz",
"integrity": "sha512-XQh1Xdk3VquDpXsnoCd7JnMoWec9CfAzQDQsaMcSU79OrrO2PNR0ErlIjm/mGq3GmBfkQjzZACV+7GhfRB8xMQ==",
"dev": true,
"requires": {
"@vue/compiler-dom": "3.2.37",
"@vue/shared": "3.2.37"
"@vue/compiler-dom": "3.2.33",
"@vue/shared": "3.2.33"
}
},
"@vue/reactivity": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.37.tgz",
"integrity": "sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.33.tgz",
"integrity": "sha512-62Sq0mp9/0bLmDuxuLD5CIaMG2susFAGARLuZ/5jkU1FCf9EDbwUuF+BO8Ub3Rbodx0ziIecM/NsmyjardBxfQ==",
"dev": true,
"requires": {
"@vue/shared": "3.2.37"
"@vue/shared": "3.2.33"
}
},
"@vue/reactivity-transform": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.37.tgz",
"integrity": "sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.33.tgz",
"integrity": "sha512-4UL5KOIvSQb254aqenW4q34qMXbfZcmEsV/yVidLUgvwYQQ/D21bGX3DlgPUGI3c4C+iOnNmDCkIxkILoX/Pyw==",
"dev": true,
"requires": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.37",
"@vue/shared": "3.2.37",
"@vue/compiler-core": "3.2.33",
"@vue/shared": "3.2.33",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7"
}
},
"@vue/runtime-core": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.37.tgz",
"integrity": "sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.33.tgz",
"integrity": "sha512-N2D2vfaXsBPhzCV3JsXQa2NECjxP3eXgZlFqKh4tgakp3iX6LCGv76DLlc+IfFZq+TW10Y8QUfeihXOupJ1dGw==",
"dev": true,
"requires": {
"@vue/reactivity": "3.2.37",
"@vue/shared": "3.2.37"
"@vue/reactivity": "3.2.33",
"@vue/shared": "3.2.33"
}
},
"@vue/runtime-dom": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.37.tgz",
"integrity": "sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.33.tgz",
"integrity": "sha512-LSrJ6W7CZTSUygX5s8aFkraDWlO6K4geOwA3quFF2O+hC3QuAMZt/0Xb7JKE3C4JD4pFwCSO7oCrZmZ0BIJUnw==",
"dev": true,
"requires": {
"@vue/runtime-core": "3.2.37",
"@vue/shared": "3.2.37",
"@vue/runtime-core": "3.2.33",
"@vue/shared": "3.2.33",
"csstype": "^2.6.8"
}
},
"@vue/server-renderer": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.37.tgz",
"integrity": "sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.33.tgz",
"integrity": "sha512-4jpJHRD4ORv8PlbYi+/MfP8ec1okz6rybe36MdpkDrGIdEItHEUyaHSKvz+ptNEyQpALmmVfRteHkU9F8vxOew==",
"dev": true,
"requires": {
"@vue/compiler-ssr": "3.2.37",
"@vue/shared": "3.2.37"
"@vue/compiler-ssr": "3.2.33",
"@vue/shared": "3.2.33"
}
},
"@vue/shared": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.37.tgz",
"integrity": "sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.33.tgz",
"integrity": "sha512-UBc1Pg1T3yZ97vsA2ueER0F6GbJebLHYlEi4ou1H5YL4KWvMOOWwpYo9/QpWq93wxKG6Wo13IY74Hcn/f7c7Bg==",
"dev": true
},
"@vue/test-utils": {
@ -3520,15 +3520,21 @@
}
},
"@wikimedia/codex": {
"version": "0.1.0-alpha.10",
"resolved": "https://registry.npmjs.org/@wikimedia/codex/-/codex-0.1.0-alpha.10.tgz",
"integrity": "sha512-nc8nNI/c89m/dxWRlkCXv5F+zd+OfsP4UwSJnlLnR88nrzctUH9xUDzhTKIiiWn2NyhyGDA2HCIBijul5jRvuQ==",
"version": "0.1.0-alpha.8",
"resolved": "https://registry.npmjs.org/@wikimedia/codex/-/codex-0.1.0-alpha.8.tgz",
"integrity": "sha512-oDnyYAZG2ecUsSsPVN18bztnsv19xXzxDetKLKd2CwAFqmKcdgGuPK7WcKfUNzVOMSesYjCFrlpqMpND8TULdQ==",
"dev": true
},
"@wikimedia/codex-icons": {
"version": "0.1.0-alpha.10",
"resolved": "https://registry.npmjs.org/@wikimedia/codex-icons/-/codex-icons-0.1.0-alpha.10.tgz",
"integrity": "sha512-hWTAdOTzg99d0tRNZ/8zxPjqgkrEOiNUMSAIugn6dJr5b0R0+Vf+Uw//Nd5mA2IW4YOF58bDMemzqdajpObArQ==",
"version": "0.1.0-alpha.8",
"resolved": "https://registry.npmjs.org/@wikimedia/codex-icons/-/codex-icons-0.1.0-alpha.8.tgz",
"integrity": "sha512-H/DEG4korFvszcJIveLKFHoUGfGUj4oC3sSb5gsocZLfNQCRRRkGEkTEY23V9pPX68ovejza2b44MeVfvbReEQ==",
"dev": true
},
"@wikimedia/codex-search": {
"version": "0.1.0-alpha.8",
"resolved": "https://registry.npmjs.org/@wikimedia/codex-search/-/codex-search-0.1.0-alpha.8.tgz",
"integrity": "sha512-tB0EavJGmCXyLsXWRZh1UZfHi3D0pY1vXPPAgC219/v1f3WxOZSIrbbRWhLfGqbm1nkrHB4pwmgVK6rWiGxF5g==",
"dev": true
},
"@wikimedia/mw-node-qunit": {
@ -20296,16 +20302,16 @@
"dev": true
},
"vue": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.2.37.tgz",
"integrity": "sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ==",
"version": "3.2.33",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.2.33.tgz",
"integrity": "sha512-si1ExAlDUrLSIg/V7D/GgA4twJwfsfgG+t9w10z38HhL/HA07132pUQ2KuwAo8qbCyMJ9e6OqrmWrOCr+jW7ZQ==",
"dev": true,
"requires": {
"@vue/compiler-dom": "3.2.37",
"@vue/compiler-sfc": "3.2.37",
"@vue/runtime-dom": "3.2.37",
"@vue/server-renderer": "3.2.37",
"@vue/shared": "3.2.37"
"@vue/compiler-dom": "3.2.33",
"@vue/compiler-sfc": "3.2.33",
"@vue/runtime-dom": "3.2.33",
"@vue/server-renderer": "3.2.33",
"@vue/shared": "3.2.33"
}
},
"vue-eslint-parser": {

View File

@ -31,9 +31,9 @@
"@types/node-fetch": "2.5.7",
"@vue/test-utils": "2.0.1",
"@vue/vue3-jest": "27.0.0-alpha.4",
"@wikimedia/codex": "0.1.0-alpha.10",
"@wikimedia/codex-icons": "0.1.0-alpha.10",
"@wikimedia/codex-search": "0.1.0-alpha.10",
"@wikimedia/codex": "0.1.0-alpha.8",
"@wikimedia/codex-icons": "0.1.0-alpha.8",
"@wikimedia/codex-search": "0.1.0-alpha.8",
"@wikimedia/mw-node-qunit": "6.4.0",
"@wikimedia/types-wikimedia": "0.3.3",
"babel-loader": "8.0.6",
@ -56,6 +56,6 @@
"svgo": "2.8.0",
"ts-jest": "27.1.3",
"typescript": "4.5.5",
"vue": "^3.2.37"
"vue": "3.2.33"
}
}

View File

@ -1,4 +1,4 @@
/** See Vector\Hooks::getVectorResourceLoaderConfig */
interface VectorResourceLoaderVirtualConfig {
wgVectorSearchApiUrl: string;
wgVectorSearchHost: string;
}

View File

@ -3,5 +3,5 @@
<title>
external link
</title>
<path fill="#36c" d="M6 1h5v5L8.86 3.85 4.7 8 4 7.3l4.15-4.16L6 1Z M2 3h2v1H2v6h6V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z"/>
<path fill="#36c" fill-rule="evenodd" d="M11 1H6l2 2 .3.3-4 4 .6.7 4-4H9l2 2V1ZM2 2h2v1H2v7h7V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 336 B

View File

@ -3,5 +3,5 @@
<title>
external link
</title>
<path fill="#36c" d="M6 1H1v5l2.14-2.15L7.3 8l.7-.7-4.15-4.17L6 1Z M10 3H8v1h2v6H4V8H3v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"/>
<path fill="#36c" fill-rule="evenodd" d="M1 1h5L4 3l-.3.3 4 4-.6.7-4-4H3L1 6V1Zm9 1H8v1h2v7H3V8H2v2a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 305 B

After

Width:  |  Height:  |  Size: 336 B

View File

@ -3,5 +3,5 @@
<title>
search
</title>
<path d="M12.2 13.6a7 7 0 1 1 1.4-1.4l5.4 5.4-1.4 1.4zM3 8a5 5 0 1 0 10 0A5 5 0 0 0 3 8z"/>
<path fill-rule="evenodd" d="M12.2 13.6a7 7 0 1 1 1.4-1.4l5.4 5.4-1.4 1.4-5.4-5.4zM13 8A5 5 0 1 1 3 8a5 5 0 0 1 10 0z"/>
</svg>

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 280 B

View File

@ -8,14 +8,6 @@
background: url( ../common/images/arrow-down.svg ) 100% 50% no-repeat;
width: unit( 16 / @font-size-tabs / @font-size-browser, em );
height: unit( 16 / @font-size-tabs / @font-size-browser, em );
// FIXME: This can be folded into the main mixin as soon as wgVectorVisualEnhancementNext
// is default. This rule should not apply to the current master as is part of a larger
// set of changes that must go out together.
.vector-feature-visual-enhancement-next-enabled & {
// https://phabricator.wikimedia.org/T319070#8284272
margin-left: -1px;
}
}
.mixin-vector-dropdown-menu-item() {
@ -35,44 +27,3 @@
color: @color-link-selected;
}
}
// Copied from mediawiki.ui.icons
// (Ifccaadabd72a12814d3d4d01200931f7254c6cd5)
// but converted to px to match `mw-ui-button`
@icon-padding-md: 12px;
// Copied from mediawiki.ui.icons,
// (Ifccaadabd72a12814d3d4d01200931f7254c6cd5)
// but converted to px to match `mw-ui-button`
@icon-padding-md-next: 5px;
.mixin-vector-flush-right-margin-left() {
margin-left: @icon-padding-md;
.vector-feature-visual-enhancement-next-enabled & {
margin-left: @icon-padding-md-next;
}
}
.mixin-vector-flush-left-margin-left() {
margin-left: -@icon-padding-md;
.vector-feature-visual-enhancement-next-enabled & {
margin-left: -@icon-padding-md-next;
}
}
.mixin-vector-flush-right-margin-right() {
margin-right: -@icon-padding-md;
.vector-feature-visual-enhancement-next-enabled & {
margin-right: -@icon-padding-md-next;
}
}
.mixin-vector-flush-left-left() {
left: -@icon-padding-md;
.vector-feature-visual-enhancement-next-enabled & {
left: -@icon-padding-md-next;
}
}

View File

@ -64,11 +64,8 @@
@size-icon: unit( 20 / @font-size-browser, em );
@size-indicator: unit( 12 / @font-size-browser, em );
// Copied from mediawiki.ui.icons, but converted to px to match `mw-ui-button`
@icon-padding-md: 12px;
@icon-padding-md-next: 5px;
@icon-padding-md-em: unit( @icon-padding-md / @font-size-browser, em );
@icon-padding-md-next-em: unit( @icon-padding-md-next / @font-size-browser, em );
// Copied from mediawiki.ui.icons
@icon-padding-md: unit( 12 / @font-size-browser, em );
@background-position-nav-personal-icon: left unit( 4 / @font-size-browser / @font-size-nav-personal, em );
@background-size-nav-personal-icon: unit( 14 / @font-size-browser / @font-size-nav-personal, em );
@ -83,9 +80,9 @@
@border-color-portal-heading-transparent: rgba( red( @border-color-portal-heading ), green( @border-color-portal-heading ), blue( @border-color-portal-heading ), 0 );
@border-start-blockquote: 4px @border-style-base #eaecf0;
@padding-top-content: 0.5em;
@padding-horizontal-content: 0.5em;
@padding-blockquote: 8px 32px;
// T311311 Match VE toolbar styles
@border-bottom-tabs: @border-width-base @border-style-base @colorGray12;
@border-bottom-tabs: @border-width-base @border-style-base #eaecf0;
@background-color-secondary--modern: #f8f9fa;
@background-color-page-container: @background-color-base;
@ -141,6 +138,12 @@
// Sidebar
@width-sidebar-px: 220px;
@width-sidebar-px-wide: 244px;
// T305069 Layout adjustments of sidebar elements:
// Vertically align the left edge of sidebar elements with the visible edge of the sidebar toggle hamburger menu.
@margin-start-sidebar-content: unit( 12px / @font-size-browser, em ); // 0.75em @ 16
// TOC
@sidebar-toc-selector: ~'.mw-table-of-contents-container .sidebar-toc';
// Search
@max-width-search: unit( 500px / @font-size-browser / @font-size-base, em ); // 35.71428571em @ 16 & 0.875em T270202
@ -196,11 +199,10 @@
//
// Layout
//
@max-width-page-container: unit( 1596px / @font-size-browser, em ); // T305069 - 99.75em @ 16
@max-width-content-container: unit( 960px / @font-size-browser, em ); // T305069 - 60em @ 16
@padding-horizontal-page-container: unit( 24px / @font-size-browser, em );
@padding-horizontal-page-container-desktop: unit( 44px / @font-size-browser, em );
@padding-horizontal-page-container-desktop-wide: unit( 52px / @font-size-browser, em );
@max-width-page-container: unit( 1514px / @font-size-browser, em ); // 99.75em @ 16
@max-width-content-container: unit( 960px / @font-size-browser, em ); // 60em @ 16
@padding-horizontal-page-container: unit( 32px / @font-size-browser, em );
@padding-horizontal-page-container-wide: unit( 40px / @font-size-browser, em );
// Grid
@grid-row-gap: 24px;

View File

@ -30,32 +30,10 @@
@color-link-external--visited: #795cb2;
@color-link-external--active: #faa700;
// Opacities
@opacity-base: 1;
@opacity-medium: 0.65;
@opacity-low: 0.3;
@opacity-transparent: 0;
// Warning: the following token is deprecated (Legacy opacity for icon states in non-Codex products.)
@opacity-icon-base: 0.87; // = `#222` on `background-color: #fff`, closest to `#202122`.
// Warning: the following token is deprecated (Legacy opacity for icon states in non-Codex products.)
@opacity-icon-base--hover: 0.74; // = `#424242` on `background-color: #fff`, closest to `#404244`.
// Warning: the following token is deprecated (Legacy opacity for icon states in non-Codex products.)
@opacity-icon-base--selected: 1;
// Warning: the following token is deprecated (Legacy opacity for icon states in non-Codex products.)
@opacity-icon-accessory: 0.67; // = `#555` on `background-color: `#fff`, closest to `#54595d`.
// Warning: the following token is deprecated (Legacy opacity for icon states in non-Codex products. Has only been used for icons despite the name.)
@opacity-base--disabled: 0.51; // = `#7d7d7d` on `background-color: #fff`, closest to `#72777d`.
// == Box Model properties ==
// Border Styles
@border-style-base: solid;
// Border Widths
@border-width-base: 1px;
// Border Radius. Match WikimediaUI Base and Codex.
@border-radius-base: 2px;
// == Typography ==
// Body content uses the user setting in browser / the system default sans-serif font:
// Arial on Windows, Roboto on Android.
// FIXME: Use WikimediaUI Base's OS specific default sans-serif fonts.
@font-family-sans: sans-serif;
// Matches WikimediaUI Base and Codex, OOUI/wikimedia
@border-radius-base: 2px;

View File

@ -60,8 +60,11 @@ function moveToc( position ) {
return;
}
// FIXME: Remove after Ia263c606dce5a6060b6b29fbaedc49cef3e17a5c has been in prod for 5 days
const isCachedHtml = document.querySelector( '.mw-table-of-contents-container.mw-sticky-header-element' );
let newTocContainer;
const sidebarTocContainerClass = 'vector-sticky-toc-container';
const sidebarTocContainerClass = isCachedHtml ? 'mw-table-of-contents-container' : 'vector-sticky-toc-container';
const stickyHeaderTocContainerClass = 'vector-menu-content';
// Avoid moving TOC if unnecessary
if ( !currTocContainer.classList.contains( sidebarTocContainerClass ) && position === 'sidebar' ) {

View File

@ -3,8 +3,7 @@
const SECTION_CLASS = 'sidebar-toc-list-item';
const ACTIVE_SECTION_CLASS = 'sidebar-toc-list-item-active';
const EXPANDED_SECTION_CLASS = 'sidebar-toc-list-item-expanded';
const TOP_SECTION_CLASS = 'sidebar-toc-level-1';
const ACTIVE_TOP_SECTION_CLASS = 'sidebar-toc-level-1-active';
const PARENT_SECTION_CLASS = 'sidebar-toc-level-1';
const LINK_CLASS = 'sidebar-toc-link';
const TOGGLE_CLASS = 'sidebar-toc-toggle';
const TOC_COLLAPSED_CLASS = 'vector-toc-collapsed';
@ -115,9 +114,9 @@ module.exports = function tableOfContents( props ) {
/**
* Sets an `ACTIVE_SECTION_CLASS` on the element with an id that matches `id`.
* Sets an `ACTIVE_TOP_SECTION_CLASS` on the top level heading (e.g. element with the
* `TOP_SECTION_CLASS`).
* If the element is a top level heading, the element will have both classes.
* If the element is not a top level heading (e.g. element with the
* `PARENT_SECTION_CLASS`), the top level heading will also have the
* `ACTIVE_SECTION_CLASS`;
*
* @param {string} id The id of the element to be activated in the Table of Contents.
*/
@ -136,11 +135,17 @@ module.exports = function tableOfContents( props ) {
return;
}
// Assign the active top and sub sections, apply classes
activeTopSection = /** @type {HTMLElement} */ ( selectedTocSection.closest( `.${TOP_SECTION_CLASS}` ) );
activeSubSection = selectedTocSection;
activeTopSection.classList.add( ACTIVE_TOP_SECTION_CLASS );
activeSubSection.classList.add( ACTIVE_SECTION_CLASS );
const topSection = /** @type {HTMLElement} */ ( selectedTocSection.closest( `.${PARENT_SECTION_CLASS}` ) );
if ( selectedTocSection === topSection ) {
activeTopSection = topSection;
activeTopSection.classList.add( ACTIVE_SECTION_CLASS );
} else {
activeTopSection = topSection;
activeSubSection = selectedTocSection;
activeTopSection.classList.add( ACTIVE_SECTION_CLASS );
activeSubSection.classList.add( ACTIVE_SECTION_CLASS );
}
}
/**
@ -153,7 +158,7 @@ module.exports = function tableOfContents( props ) {
activeSubSection = undefined;
}
if ( activeTopSection ) {
activeTopSection.classList.remove( ACTIVE_TOP_SECTION_CLASS );
activeTopSection.classList.remove( ACTIVE_SECTION_CLASS );
activeTopSection = undefined;
}
}
@ -230,13 +235,13 @@ module.exports = function tableOfContents( props ) {
return;
}
const topSection = /** @type {HTMLElement} */ ( tocSection.closest( `.${TOP_SECTION_CLASS}` ) );
const parentSection = /** @type {HTMLElement} */ ( tocSection.closest( `.${PARENT_SECTION_CLASS}` ) );
const toggle = tocSection.querySelector( `.${TOGGLE_CLASS}` );
if ( topSection && toggle && expandedSections.indexOf( topSection ) < 0 ) {
if ( parentSection && toggle && expandedSections.indexOf( parentSection ) < 0 ) {
toggle.setAttribute( 'aria-expanded', 'true' );
topSection.classList.add( EXPANDED_SECTION_CLASS );
expandedSections.push( topSection );
parentSection.classList.add( EXPANDED_SECTION_CLASS );
expandedSections.push( parentSection );
}
}
@ -272,7 +277,7 @@ module.exports = function tableOfContents( props ) {
*/
function isTopLevelSection( id ) {
const section = document.getElementById( id );
return !!section && section.classList.contains( TOP_SECTION_CLASS );
return !!section && section.classList.contains( PARENT_SECTION_CLASS );
}
/**
@ -314,7 +319,7 @@ module.exports = function tableOfContents( props ) {
* Set aria-expanded attribute for all toggle buttons.
*/
function initializeExpandedStatus() {
const parentSections = props.container.querySelectorAll( `.${TOP_SECTION_CLASS}` );
const parentSections = props.container.querySelectorAll( `.${PARENT_SECTION_CLASS}` );
parentSections.forEach( ( section ) => {
const expanded = section.classList.contains( EXPANDED_SECTION_CLASS );
const toggle = section.querySelector( `.${TOGGLE_CLASS}` );
@ -329,6 +334,8 @@ module.exports = function tableOfContents( props ) {
*/
function bindCollapseToggleListeners() {
// Initialize toc collapsed status
document.body.classList.add( TOC_NOT_COLLAPSED_CLASS );
const showHideTocElement = document.querySelectorAll( '#sidebar-toc-label button' );
showHideTocElement.forEach( function ( btn ) {
btn.addEventListener( 'click', () => {
@ -425,11 +432,29 @@ module.exports = function tableOfContents( props ) {
*
* @param {string} elementId
* @param {string} html
* @param {boolean} setInnerHTML
*/
function reloadPartialHTML( elementId, html ) {
function reloadPartialHTML( elementId, html, setInnerHTML = true ) {
const htmlElement = document.getElementById( elementId );
if ( htmlElement ) {
htmlElement.innerHTML = html;
if ( setInnerHTML ) {
htmlElement.innerHTML = html;
} else if ( htmlElement.outerHTML ) {
htmlElement.outerHTML = html;
} else { // IF outerHTML property access is not supported
const tmpContainer = document.createElement( 'div' );
tmpContainer.innerHTML = html.trim();
const childNode = tmpContainer.firstChild;
if ( childNode ) {
const tmpElement = document.createElement( 'div' );
tmpElement.setAttribute( 'id', `div-tmp-${elementId}` );
const parentNode = htmlElement.parentNode;
if ( parentNode ) {
parentNode.replaceChild( tmpElement, htmlElement );
parentNode.replaceChild( childNode, tmpElement );
}
}
}
}
}
@ -522,7 +547,6 @@ module.exports = function tableOfContents( props ) {
* @property {expandSection} expandSection
* @property {toggleExpandSection} toggleExpandSection
* @property {string} ACTIVE_SECTION_CLASS
* @property {string} ACTIVE_TOP_SECTION_CLASS
* @property {string} EXPANDED_SECTION_CLASS
* @property {string} LINK_CLASS
* @property {string} TOGGLE_CLASS
@ -532,7 +556,6 @@ module.exports = function tableOfContents( props ) {
changeActiveSection,
toggleExpandSection,
ACTIVE_SECTION_CLASS,
ACTIVE_TOP_SECTION_CLASS,
EXPANDED_SECTION_CLASS,
LINK_CLASS,
TOGGLE_CLASS

View File

@ -61,8 +61,6 @@ function createIconElement( menuElement, parentElement, id ) {
return iconElement;
}
var /** @type {Object} */handledLinks = {};
/**
* Adds icon placeholder for gadgets to use.
*
@ -78,10 +76,6 @@ function addPortletLinkHandler( item, data ) {
var $menu = $( item ).parents( '.vector-menu' );
var menuElement = $menu.length && $menu.get( 0 ) || null;
var iconElement = createIconElement( menuElement, link, data.id );
// @ts-ignore see gerrit:836861
if ( data.id && handledLinks[ data.id ] ) {
return;
}
// The views menu has limited space so we need to decide whether there is space
// to accomodate the new item and if not to redirect to the more dropdown.
@ -102,16 +96,9 @@ function addPortletLinkHandler( item, data ) {
}
}
// Check link.prepend exists for older browser since this is ES5 code
if ( link && iconElement && link.prepend ) {
if ( link && iconElement ) {
link.prepend( iconElement );
}
// Mark the link as handled.
if ( data.id ) {
// @ts-ignore see gerrit:836861
handledLinks[ data.id ] = true;
}
}
// Enhance previously added items.

View File

@ -1,29 +0,0 @@
/**
* Upgrades Echo for icon consistency.
* Undos work inside Echo to replace our button.
*/
function init() {
if ( !document.body.classList.contains( 'vector-feature-visual-enhancement-next-enabled' ) ) {
return;
}
if ( document.querySelectorAll( '#pt-notifications-alert a, #pt-notifications-notice a' ).length !== 2 ) {
return;
}
// @ts-ignore
mw.hook( 'ext.echo.NotificationBadgeWidget.onInitialize' ).add( function ( badge ) {
var $element = badge.$element;
$element.addClass( 'mw-list-item' );
var iconButtonClasses = 'mw-ui-button mw-ui-quiet mw-ui-icon mw-ui-icon-element ';
if ( $element.attr( 'id' ) === 'pt-notifications-alert' ) {
$element.children( 'a' ).addClass( iconButtonClasses + 'mw-ui-icon-bell' );
$element.children( 'a' ).removeClass( 'oo-ui-icon-bell' );
}
if ( $element.attr( 'id' ) === 'pt-notifications-notice' ) {
$element.children( 'a' ).addClass( iconButtonClasses + 'mw-ui-icon-tray' );
$element.children( 'a' ).removeClass( 'oo-ui-icon-tray' );
}
} );
}
module.exports = init;

View File

@ -141,9 +141,9 @@ function initSearchLoader( document ) {
var searchBoxes = document.querySelectorAll( '.vector-search-box' ),
isWikidata = mw.config.get( 'wgWikiID' ) === 'wikidatawiki';
// Allow developers to defined $wgVectorSearchApiUrl in LocalSettings to target different APIs
if ( config.wgVectorSearchApiUrl ) {
mw.config.set( 'wgVectorSearchApiUrl', config.wgVectorSearchApiUrl );
// Allow developers to defined $wgVectorSearchHost in LocalSettings to target different APIs
if ( config.wgVectorSearchHost ) {
mw.config.set( 'wgVectorSearchHost', config.wgVectorSearchHost );
}
if ( !searchBoxes.length ) {

View File

@ -11,36 +11,19 @@ var /** @type {MwApi} */api,
SIDEBAR_CHECKBOX_ID = 'mw-sidebar-checkbox',
SIDEBAR_PREFERENCE_NAME = 'VectorSidebarVisible';
/**
* Checks if persistent is enabled at current time.
* When a user is using a browser with a screen resolution of < 1000 it is assumed
* that it is preferred that the sidebar remains closed across page views, as otherwise
* it gets in the way of reading. More context at T316191.
*
* @return {boolean}
*/
function isPersistentEnabled() {
return window.innerWidth >= 1000;
}
/**
* Execute a debounced API request to save the sidebar user preference.
* The request is meant to fire 1000 milliseconds after the last click on
* the sidebar button.
*
* @param {HTMLInputElement} checkbox
* @param {number} timeout duration
* @param {boolean} shouldTriggerResize whether a resize event is needed.
* @return {any}
*/
function saveSidebarState( checkbox, timeout, shouldTriggerResize ) {
function saveSidebarState( checkbox ) {
return debounce( function () {
api = api || new mw.Api();
api.saveOption( SIDEBAR_PREFERENCE_NAME, checkbox.checked ? 1 : 0 );
if ( !shouldTriggerResize ) {
return;
}
// Trigger a resize event so other parts of the page can adapt:
var event;
if ( typeof Event === 'function' ) {
@ -51,7 +34,7 @@ function saveSidebarState( checkbox, timeout, shouldTriggerResize ) {
event.initUIEvent( 'resize', true, false, window, 0 );
}
window.dispatchEvent( event );
}, timeout );
}, 1000 );
}
/**
@ -63,79 +46,17 @@ function saveSidebarState( checkbox, timeout, shouldTriggerResize ) {
*/
function bindSidebarClickEvent( checkbox, button ) {
if ( checkbox instanceof HTMLInputElement && button ) {
var handler = saveSidebarState( checkbox, 1000, true );
checkbox.addEventListener( 'input', function () {
if ( isPersistentEnabled() ) {
handler();
}
} );
}
}
var /** @type {boolean} */ wasCollapsedDuringResize = false;
/**
* Collapses the sidebar if screen resolution too small.
*
* @param {HTMLInputElement} checkbox
*/
function collapseSidebar( checkbox ) {
if ( checkbox.checked ) {
wasCollapsedDuringResize = true;
checkbox.checked = false;
saveSidebarState( checkbox, 0, false )();
}
}
/**
* Expands the sidebar when the window is resized if it was previously collapsed.
*
* @param {HTMLInputElement} checkbox
*/
function expandSidebar( checkbox ) {
if ( wasCollapsedDuringResize && !checkbox.checked ) {
wasCollapsedDuringResize = false;
checkbox.checked = true;
saveSidebarState( checkbox, 0, false )();
checkbox.addEventListener( 'input', saveSidebarState( checkbox ) );
}
}
function init() {
var checkbox = /** @type {HTMLInputElement|null} */ (
window.document.getElementById( SIDEBAR_CHECKBOX_ID )
),
var checkbox = window.document.getElementById( SIDEBAR_CHECKBOX_ID ),
button = window.document.getElementById( SIDEBAR_BUTTON_ID );
if ( mw.config.get( 'wgUserName' ) && !mw.config.get( 'wgVectorDisableSidebarPersistence' ) ) {
bindSidebarClickEvent( checkbox, button );
}
// If the user has resized their window, an open sidebar will be taking up lots of space
// so we should disable it.
// When this happens the user must expand it again manually, to avoid conflicts with multiple
// open windows (for example when an editor is viewing 2 articles side by side).
if ( checkbox ) {
var mediaQuery = window.matchMedia( '(max-width: 1000px)' );
var onMediaQueryChangeCollapse = function ( /** @type {MediaQueryListEvent} */ event ) {
if ( event.matches ) {
// @ts-ignore we checked it already.
collapseSidebar( checkbox );
} else {
// @ts-ignore we checked it already.
expandSidebar( checkbox );
}
};
if ( mediaQuery.matches ) {
collapseSidebar( checkbox );
}
if ( mediaQuery.addEventListener ) {
mediaQuery.addEventListener( 'change', onMediaQueryChangeCollapse );
} else {
// Before Safari 14, MediaQueryList is based on EventTarget,
// so you must use addListener() and removeListener() to observe media query lists.
mediaQuery.addListener( onMediaQueryChangeCollapse );
}
}
}
module.exports = {

View File

@ -1,9 +1,7 @@
var languageButton = require( './languageButton.js' ),
echo = require( './echo.js' ),
initSearchLoader = require( './searchLoader.js' ).initSearchLoader,
dropdownMenus = require( './dropdownMenus.js' ).dropdownMenus,
sidebarPersistence = require( './sidebarPersistence.js' ),
watchstar = require( './watchstar.js' ),
checkbox = require( './checkbox.js' );
/**
@ -74,12 +72,8 @@ function main( window ) {
checkbox.init( window.document );
initSearchLoader( document );
languageButton();
echo();
dropdownMenus();
addNamespacesGadgetSupport();
if ( document.body.classList.contains( 'vector-feature-visual-enhancement-next-enabled' ) ) {
watchstar();
}
}
/**

View File

@ -1,24 +0,0 @@
module.exports = function () {
mw.hook( 'wikipage.watchlistChange' ).add(
function ( /** @type {boolean} */ isWatched, /** @type {string} */ expiry ) {
var watchElement = document.querySelectorAll( '#ca-watch a, #ca-unwatch a' )[ 0 ];
if ( !watchElement ) {
return;
}
watchElement.classList.remove(
'mw-ui-icon-wikimedia-unStar',
'mw-ui-icon-wikimedia-star',
'mw-ui-icon-wikimedia-halfStar'
);
if ( isWatched ) {
if ( expiry === 'infinity' ) {
watchElement.classList.add( 'mw-ui-icon-wikimedia-unStar' );
} else {
watchElement.classList.add( 'mw-ui-icon-wikimedia-halfStar' );
}
} else {
watchElement.classList.add( 'mw-ui-icon-wikimedia-star' );
}
}
);
};

View File

@ -2,7 +2,6 @@
<cdx-typeahead-search
:id="id"
ref="searchForm"
class="vector-typeahead-search"
:class="rootClasses"
:search-results-label="$i18n( 'searchresults' ).text()"
:accesskey="searchAccessKey"
@ -20,8 +19,6 @@
@input="onInput"
@search-result-click="instrumentation.onSuggestionClick"
@submit="onSubmit"
@focus="onFocus"
@blur="onBlur"
>
<template #default>
<input
@ -135,16 +132,13 @@ module.exports = exports = defineComponent( {
// Whether to apply a CSS class that disables the CSS transitions on the text input
disableTransitions: this.autofocusInput,
instrumentation: instrumentation.listeners,
isFocused: false
instrumentation: instrumentation.listeners
};
},
computed: {
rootClasses() {
return {
'vector-search-box-disable-transitions': this.disableTransitions,
'vector-typeahead-search--active': this.isFocused
'vector-search-box-disable-transitions': this.disableTransitions
};
}
},
@ -155,9 +149,7 @@ module.exports = exports = defineComponent( {
* @param {string} value
*/
onInput: function ( value ) {
const searchApiUrl = mw.config.get( 'wgVectorSearchApiUrl',
mw.config.get( 'wgScriptPath' ) + '/rest.php'
),
const domain = mw.config.get( 'wgVectorSearchHost', location.host ),
query = value.trim();
if ( query === '' ) {
@ -168,7 +160,7 @@ module.exports = exports = defineComponent( {
instrumentation.listeners.onFetchStart();
restClient.fetchByTitle( query, searchApiUrl, 10, this.showDescription ).fetch
restClient.fetchByTitle( query, domain, 10, this.showDescription ).fetch
.then( ( data ) => {
this.suggestions = data.results;
this.searchFooterUrl = urlGenerator.generateUrl( query );
@ -191,14 +183,6 @@ module.exports = exports = defineComponent( {
this.wprov = instrumentation.getWprovFromResultIndex( event.index );
instrumentation.listeners.onSubmit( event );
},
onFocus() {
this.isFocused = true;
},
onBlur() {
this.isFocused = false;
}
},
mounted() {

View File

@ -64,8 +64,8 @@ function onFetchEnd( event ) {
// execute before the rendering steps happen (e.g. layout and paint). A
// nested rAF will execute after these rendering steps have completed
// and ensure the search results are visible to the user.
requestAnimationFrame( () => {
requestAnimationFrame( () => {
requestAnimationFrame( function () {
requestAnimationFrame( function () {
if ( !performance.getEntriesByName( queryMark ).length ) {
return;
}

View File

@ -66,7 +66,7 @@ function adaptApiResponse( config, query, restResponse, showDescription ) {
/**
* @callback fetchByTitle
* @param {string} query The search term.
* @param {string} searchApiUrl The URL to rest.php
* @param {string} domain The base URL for the wiki without protocol. Example: 'sr.wikipedia.org'.
* @param {number} [limit] Maximum number of results.
* @return {AbortableSearchFetch}
*/
@ -81,13 +81,14 @@ function adaptApiResponse( config, query, restResponse, showDescription ) {
* @return {SearchClient}
*/
function restSearchClient( config ) {
return config.get( 'wgVectorSearchClient', {
const customClient = config.get( 'wgVectorSearchClient' );
return customClient || {
/**
* @type {fetchByTitle}
*/
fetchByTitle: ( q, searchApiUrl, limit = 10, showDescription = true ) => {
fetchByTitle: ( q, domain, limit = 10, showDescription = true ) => {
const params = { q, limit };
const url = searchApiUrl + '/v1/search/title?' + $.param( params );
const url = '//' + domain + config.get( 'wgScriptPath' ) + '/rest.php/v1/search/title?' + $.param( params );
const result = fetchJson( url, {
headers: {
accept: 'application/json'
@ -102,7 +103,7 @@ function restSearchClient( config ) {
fetch: searchResponsePromise
};
}
} );
};
}
module.exports = restSearchClient;

View File

@ -14,7 +14,7 @@ function initApp( searchBox ) {
titleInput = /** @type {HTMLInputElement|null} */ (
searchBox.querySelector( 'input[name=title]' )
),
search = /** @type {HTMLInputElement|null} */ ( searchBox.querySelector( 'input[name=search]' ) ),
search = /** @type {HTMLInputElement|null} */ ( searchBox.querySelector( 'input[name="search"]' ) ),
searchPageTitle = titleInput && titleInput.value;
if ( !searchForm || !search || !titleInput ) {
@ -43,7 +43,10 @@ function initApp( searchBox ) {
* @return {void}
*/
function main( document ) {
document.querySelectorAll( '.vector-search-box' )
.forEach( initApp );
const searchBoxes = document.querySelectorAll( '.vector-search-box' );
searchBoxes.forEach( ( searchBox ) => {
initApp( searchBox );
} );
}
main( document );

View File

@ -28,7 +28,8 @@
function urlGenerator( config ) {
// TODO: This is a placeholder for enabling customization of the URL generator.
// wgVectorSearchUrlGenerator has not been defined as a config variable yet.
return config.get( 'wgVectorSearchUrlGenerator', {
const customGenerator = config.get( 'wgVectorSearchUrlGenerator' );
return customGenerator || {
/**
* @type {generateUrl}
*/
@ -51,7 +52,7 @@ function urlGenerator( config ) {
return articlePath + '?' + $.param( $.extend( {}, params, { search: suggestion } ) );
}
} );
};
}
/** @module urlGenerator */

View File

@ -3,12 +3,14 @@
@border-base-ems: unit( @border-width-base / @font-size-browser / @font-size-base, em );
.mw-article-toolbar-container {
display: flex;
font-size: @font-size-tabs;
// Use box-shadow instead of border to allow border collapsing between titlebar and toolbar
box-shadow: 0 1px @border-color-portal-heading;
// Add bottom margin to account for box-shadow
margin-bottom: 1px;
// clearfix for #left-navigation and #right-navigation
display: flow-root;
border-bottom: @border-bottom-tabs;
/* Targets #left-navigation and #right-navigation */
& > div {
font-size: @font-size-tabs;
}
.mw-portlet-views {
display: none;
@ -35,24 +37,3 @@
}
}
}
// ID Selectors outside of .mw-article-toolbar-container to avoid over-specificity.
#left-navigation {
// flex ensures all child elements align on one line.
display: flex;
margin-left: -@padding-horizontal-tabs;
// pushes #right-navigation to the end of the line.
flex-grow: 1;
}
#right-navigation {
// flex ensures all child elements align on one line.
display: flex;
margin-right: -@padding-horizontal-tabs;
// Any dropdowns inside the right navigation in modern Vector (e.g. "more" menu).
// should be right-aligned to prevent horizontal scrolling.
.vector-menu-content {
left: auto;
right: -@border-width-base;
}
}

Some files were not shown because too many files have changed in this diff Show More