Commit graph

594 commits

Author SHA1 Message Date
alistair3149 4f9ded3c35
feat(core): render Echo icons in skin instead of js 2024-05-03 17:33:50 -04:00
alistair3149 ffa7d76df4
feat(core): change primary action links in user menu into buttons
Link such as sign up and sign in are converted into a button to make it more visible
2024-05-01 20:25:51 -04:00
alistair3149 00157436a5
fix(core): 🐛 stricter match for title parenthesis
* Only match the parenthesis at the end of the title
* Only match when a whitespace is before the opening parenthesis
2024-05-01 19:31:21 -04:00
alistair3149 a09e5e0b34
fix(core): 🐛 add missing file associated page icon 2024-04-27 13:29:23 -04:00
alistair3149 1997f126c0
feat(core): add wikidata icon to wikibase in toolbox 2024-04-27 13:25:37 -04:00
alistair3149 358f172542
feat(core): add qrcode icon to urlshortener in toolbox 2024-04-26 23:56:03 -04:00
alistair3149 52f4bab1a5
feat(core): only load the inline script if EnablePreferences is true 2024-04-25 19:33:11 -04:00
alistair3149 efe11ed410
refactor(prefs): ♻️ use literal values instead of integers in clientPref features 2024-04-25 17:51:54 -04:00
alistair3149 241dc96cfe
feat(prefs): move page width to clientPrefs
Now all of the existing prefs are migrated to clientPrefs,
we can discard the code from the old system.
2024-04-25 17:41:22 -04:00
github-actions 2d936d01c3 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2024-04-25 21:07:23 +00:00
alistair3149 0d52046523
feat(prefs): migrate font size to client preferences 2024-04-25 17:06:09 -04:00
alistair3149 5768ccc25b
feat(core): add pure black mode for dark theme 2024-04-25 15:45:24 -04:00
alistair3149 405eef0b9a
fix(core): 🐛 incorrect class of auto theme on page output 2024-04-25 15:19:51 -04:00
alistair3149 a741639085
feat(core): move theme preferences to clientPrefs
Since clientPrefs and other related features are not avaliable until MW 1.42,
many of them are backported as polyfill. Instead of using cookies, the polyfill
are using localStorage only like Citizen in the past.

There are many changes behind the scene, but the most important one being that
`skin-citizen-*` theme classes are now soft-deprecated, and replaced by the
standardized `skin-theme-clientpref-*` classes. There will be sufficient
time before the hard deprecation.

Related: #780
2024-04-24 20:23:54 -04:00
alistair3149 30ee7c1dd1
refactor(core): ♻️ use ResourceLoader to minify inline JS 2024-04-24 17:47:33 -04:00
github-actions 59aa0a9103 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2024-04-24 02:55:42 +00:00
alistair3149 ff3acf3b71
fix(core): 🐛 use runOnSkinTemplateNavigationHooks instead
This should somewhat ensure Citizen gets to run its hook after all the extensions.
Hopefully it will resolve various issues regarding hook load orders.

Closes: #812
2024-04-23 22:55:16 -04:00
alistair3149 3a73bdc640
fix(core): 🐛 deprecate more old ResourceLoader classes 2024-02-04 15:17:34 -05:00
alistair3149 69ba5d1e34
refactor(core): ♻️ avoid unnessecary declarations 2023-12-29 17:23:48 -05:00
Eisa Ahmed e985f863bc
feat(ar): add support for Arabic fonts through Noto Arabic (#755)
* Added support for Arabic fonts through Noto Naskh Arabic.

* Added Noto Sans Arabic
2023-12-15 00:41:45 -05:00
alistair3149 0da7d8fe33
fix(core): 🐛 check for read access before attaching manifest
Since the manifest is generated by the MW API, users lacking read access
would not be able to access the manifest.

Closes: #747
2023-12-13 17:47:01 -05:00
alistair3149 c50a0cd0c1
refactor(core): ♻️ remove unnessecary params 2023-11-15 15:54:21 -05:00
David Lynch 6f5b761fe7
fix(core): let makeSections xpath query cope with multiple classes (#733)
* Let makeSections xpath query cope with multiple classes

As-of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/939783 in mediawiki-core, this class attribute is going to contain multiple classes. This would break the section-creation. This change to the query is backwards-compatible, so this should just inoculate the skin against future updates.

* Shorten line for mediawiki-lint compatibility

* fix: update html selector for parser output

Related: T350627

---------

Co-authored-by: alistair3149 <alistair3149@users.noreply.github.com>
2023-11-15 15:15:25 -05:00
github-actions 43b7ce4717 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-09-11 18:05:27 +00:00
alistair3149 672740a23a
fix(core): 🐛 check for mw-heading wrapper first before mw-parser-output
The current implementation will fail with the new mw-heading wrapper
2023-09-11 14:04:43 -04:00
github-actions 7b349faa73 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-09-11 00:52:03 +00:00
alistair3149 45a726d77f
fix(core): 🐛 stricter selector for collasible headers in formatter 2023-09-10 20:51:28 -04:00
alistair3149 a6a9fe27e4
fix(core): 🐛 stricter selector for collapsible header 2023-09-10 19:19:31 -04:00
alistair3149 2f40541bc4
feat(core): prefix citizen section classes 2023-09-10 19:00:52 -04:00
alistair3149 d62bdca69c
refactor(core): ♻️ update title class to use the newer standard 2023-08-25 16:52:58 -07:00
H. C. Kruse 661ad61486
ci: add PHPUnit tests (#712)
* ci: WIP add PHP Unit Tests

* ci: 👷 lint code to MediaWiki standards

Check commit and GitHub actions for more details

* ci: Add phpunit tests

---------

Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2023-08-25 14:39:37 -07:00
github-actions 4b1128b3b7 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-08-25 00:57:30 +00:00
alistair3149 b350660f4c
refactor(core): ♻️ use namespaced title class
Bumped minimum MW requirements to 1.39.4 as it is nessecary.
Related: T166010, T338114
2023-08-24 17:56:42 -07:00
alistair3149 1cfe3cdfc8
fix(core): 🐛 catch IntlException for NumberFormatter
This should at least avoid Citizen throwing an exception.
However, it won't address the root cause of the issue.

Closes #474
2023-08-24 14:58:10 -07:00
alistair3149 69163bee55
fix(search): 🐛 undefined wgScript config 2023-08-03 20:37:24 -04:00
alistair3149 51db19938c
feat(search): reimplement SMW Ask API search
Instead of relying on hardcoded config, you can simply type the
conditions as search query (e.g. `[[Has population::1200]][[:+]]`).
2023-08-02 19:02:50 -04:00
alistair3149 8605c6c6dc
fix(core): 🐛 deprecate User::idFromName 2023-07-17 17:59:28 -04:00
alistair3149 eecd21db76
feat(core): add icon for Email this user 2023-07-06 15:02:14 -04:00
沈澄心 4f6e34e05b
fix(core): undefined $msgGender error in Tagline.php (#684)
* Update Tagline.php

* Update Tagline.php
2023-07-04 23:19:36 -04:00
沈澄心 2891d042cc
fix(core): skin preference support for Safari on iOS < 12.2 (#680)
* Update skins.citizen.preferences.js

* Update skins.citizen.preferences.js

* Update inline.js

* Update SkinHooks.php

* Update skins.citizen.preferences.less

* Update variables.less

* Update theme.less

* Update theme.less

* Update skins.citizen.preferences.js

* Update skins.citizen.preferences.js

* Update skins.citizen.preferences.js

* Update skin.js
2023-07-03 08:48:41 -04:00
github-actions 2c5539900c ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-06-12 02:13:23 +00:00
沈澄心 e771c728e1
fix(core): add menu icons for "Special pages" and "Upload file" (#664)
* Update SkinHooks.php

* Update Drawer.php

* Update skin.json
2023-06-11 22:12:50 -04:00
alistair3149 717d16af35
feat(core): display real name in user menu when exists
Closes: #652
Co-authored-by: SimonTaurus <simon.stier@gmx.de>
2023-06-09 21:34:55 -04:00
alistair3149 c793959416
feat(core): use gender symbol instead of pronoun in user tagline
Related: #657
2023-06-09 01:40:15 -04:00
github-actions a928b278fa ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-06-08 20:04:36 +00:00
沈澄心 25d25e381b
feat(core): expand user page tagline and allow citizen-tagline to be parsed (#657)
* Add registration date to user tagline
* Add contribution link to edit count in user tagline
* Add gender to user tagline
* Allow `citizen-tagline` to be fully parsed

---------

Co-authored-by: alistair3149 <alistair3149@users.noreply.github.com>
2023-06-08 16:03:48 -04:00
沈澄心 9a0ffcc186
feat(core): use member names instead of group names in user menu (#656)
* Update Header.php

* Clean up and ucfirst group member name

---------

Co-authored-by: alistair3149 <alistair3149@users.noreply.github.com>
2023-06-05 13:30:57 -04:00
github-actions 54835b1695 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-06-02 18:31:46 +00:00
alistair3149 403a109cc2
fix(core): 🐛 undefined items variable in drawer 2023-06-02 14:21:55 -04:00
Simon Stier 2e3e5feb9b
feat(search): add SMW Ask API as search backend option (#625)
* feat: add SMW Ask API as search backend option
* feat: allow namespace prefix in smw ask query
2023-05-18 13:57:43 -04:00
Simon Stier a7b99d11f0
feat(core): add config var 'wgCitizenTableNowrapClasses' (#621)
* add config var 'wgCitizenTableNowrapClasses'
* refactor: load config via require
2023-05-18 13:53:58 -04:00
github-actions 350041c5f7 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-04-05 17:51:09 +00:00
alistair3149 fe4f4a91d2
feat(core): only apply title transform to content namespaces 2023-04-05 13:50:14 -04:00
alistair3149 497f2e6058
refactor(core): ♻️ deprecate wfExpandUrl in favor of UrlUtils
Related: T319340
2023-03-27 14:45:08 -04:00
alistair3149 90890de53f
feat(core): add config flag to disable preferences menu 2023-03-27 14:08:38 -04:00
alistair3149 015b1e1b9a
fix(core): 🐛 respect config flag for default theme
This should fix the issue where CitizenThemeDefault is not working
2023-03-20 12:21:46 -04:00
alistair3149 51a11f336c
refactor(core): ♻️ simplify body formatter implementation
- Use Mustache body content instead of building from scratch
- SubHeadings should only be created when sections can be created
- Remove wrapHTMLPublic as it is no longer needed
2023-02-28 16:21:50 -05:00
alistair3149 54c8717d45
refactor(core): ♻️ simplify menu header implementation 2023-02-22 14:47:32 -05:00
alistair3149 b04b46d957
feat(core): add icon for urlshortener 2023-02-16 23:50:48 -05:00
alistair3149 33e37f5857
refactor(core): ♻️ reset sidebar index after for loop 2023-02-16 13:42:20 -05:00
github-actions 1f718ce6e1 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-02-16 17:24:12 +00:00
alistair3149 0c23e50d62
feat(core): convert tagline to langauage variant when appliable 2023-02-16 12:23:17 -05:00
alistair3149 3ec84349b1
feat(core): add support for user-interface-preferences menu
This should also fix the issue of ULS not showing up (#587, #425).
2023-02-15 18:38:02 -05:00
alistair3149 c8d5a6e5f4
fix(core): 🐛 reset array index after removing toolbox from sidebar
This should fix the issue where SidebarBeforeOutput is not working in some scenario.

Fix: #580
2023-02-15 15:40:13 -05:00
alistair3149 081a176edc
fix(core): 🐛 handle null exception for user group 2023-02-10 10:06:06 -05:00
github-actions 7a0f3a1294 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-01-31 19:55:38 +00:00
alistair3149 d14ddd99e6
refactor(core): ♻️ simplify page title implementation 2023-01-31 14:54:20 -05:00
CosmicAlpha 8aca2e8b68
refactor(core): ensure that shouldShowPageTools() returns a bool (#573) 2023-01-21 18:11:41 -05:00
alistair3149 a7406d8e32
fix(core): 🐛 default to auto theme unless set 2023-01-20 20:18:58 -05:00
github-actions 7d2e51574c ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-01-18 03:47:37 +00:00
alistair3149 4ae0f0cfcd
refactor(pwa): ♻️ rename manifest classes 2023-01-17 22:45:51 -05:00
alistair3149 68cb9b6c68
fix(pwa): 🐛 declare before adding array 2023-01-17 16:36:56 -05:00
alistair3149 e78ebd7165
fix(pwa): 🐛 incorrect var type 2023-01-17 16:34:02 -05:00
alistair3149 15ed16da2a
refactor(pwa): ♻️ use more approiate function to set maxage 2023-01-17 15:21:39 -05:00
alistair3149 01de2ec5f6
refactor(pwa): ♻️ better naming for manifest 2023-01-17 14:54:11 -05:00
github-actions e8be32f7c5 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-01-17 19:43:57 +00:00
alistair3149 d73fa67a31
feat(pwa): use proper manifest type instead of json 2023-01-17 14:42:49 -05:00
alistair3149 e40d4e65fa
fix(pwa): 🐛 syntax error in manifest API 2023-01-17 14:12:47 -05:00
alistair3149 d63025f084
fix(pwa): 🐛 parse error in manifest API 2023-01-17 12:40:18 -05:00
alistair3149 7c552fe763
fix(core): 🐛 more defensive check for logo
Resolve undefined index from wgLogos
2023-01-16 15:58:55 -05:00
alistair3149 e3bf5813c8
fix(core): 🐛 disable ULS-enhanced language button for now
Somehow the ULS popup does not appear after clicking the button.
Disabling it for now until it is fixed
2023-01-15 02:26:34 -05:00
alistair3149 aeed04b860
feat(core): add toolbox icon for CreateRedirect 2023-01-05 01:12:56 -05:00
github-actions aacf10b20c ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-01-04 00:28:23 +00:00
alistair3149 8c4bd54d32
feat(core): only add upload link when it is enabled
Citizen should not add upload link to drawer when $wgEnableUploads is
false.
2023-01-03 19:26:43 -05:00
alistair3149 203b0b42c3
feat(search): add MediaSearch to typeahead 2022-12-14 10:28:45 -05:00
alistair3149 685a3ad1c4
refactor(core): ♻️ reduce the number of RL modules
It will improve the performance in module registration and also caching
2022-12-09 14:48:17 -05:00
alistair3149 391266c0a7
feat(core): allow the use of custom search suggestion module
defines the search suggestion ResourceLoader module
used by the skin. It deprecates the  config
2022-12-02 17:59:45 -05:00
alistair3149 323acda0b1
feat(core): add icon to all talk page buttons
Talk page keys in the associated page array can vary based on namespace.
This commit will match keys end with 'talk' and match them to the speechBubble icon.
2022-12-01 22:34:29 -05:00
alistair3149 e261abf8b5
fix(core): 🐛 clean up leftover drawer script references (#554)
Drawer sub search was removed earlier in a commit to refactor the drawer,
this commit is to clean up leftover references
2022-11-28 18:59:15 -05:00
alistair3149 ad714dcfed
feat(core): allow collapsible sections with DiscussionTools wrappers on headings
Bug: T314714
2022-11-24 21:36:06 -05:00
alistair3149 81eadf9c8d
perf(core): ️ replace getElementsByTagName() with DOMCompat::querySelectorAll()
Should help with performance quite a bit
Bug: T317070
2022-11-24 21:26:55 -05:00
alistair3149 8710a2b905
feat(core): add icon support for some extensions in toolbox 2022-11-21 17:47:21 -05:00
github-actions 528d0077dc
ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-11-21 17:47:20 -05:00
alistair3149 6def7ab990
feat(core): overhaul MW debug styles 2022-11-21 17:47:18 -05:00
github-actions 224c117f65
ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-11-21 17:47:03 -05:00
alistair3149 cdb213d8b4
refactor(core): ♻️ only append class instead of replacing it 2022-11-21 17:47:02 -05:00
alistair3149 ab1981d24b
feat(core): migrate VE editsection to WMUI icon module 2022-11-21 17:47:00 -05:00
alistair3149 5c375bb71d
refactor(core): ♻️ use the same code pattern for SkinEditSectionLinks 2022-11-21 17:46:58 -05:00
alistair3149 2ec7da29a5
docs(core): 📚️ add Phabricator task number 2022-11-21 17:46:57 -05:00
github-actions 92e6cfa733
ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-11-21 17:46:55 -05:00