alistair3149
daef66f141
fix(core): 🐛 use mw.requestIdleCallback for polyfill
...
Safari does not support rIC yet and MW has a polyfill for that.
2024-11-17 01:12:02 -05:00
alistair3149
368ceb659a
feat(speculationRules): ✨ add basic implementation of Speculation Rules API
...
This is a basic implementation of Speculation Rules API that will prerender
any page under article path when the user hovers on the link for over 200ms.
2024-11-13 18:46:02 -05:00
alistair3149
4e09e3e3e3
refactor(serviceWorker): ♻️ early exit if wiki is not in root
2024-11-13 17:59:31 -05:00
alistair3149
9556478443
perf(core): ⚡ ️ defer background main scripts with requestIdleCallback
2024-11-12 18:48:03 -05:00
alistair3149
3b8022c3c1
refactor(core): ♻️ set up scroll direction observer in setupObservers
...
This is needed for centralizing the observers.
2024-11-07 19:12:48 -05:00
alistair3149
241ef66893
perf(core): ⚡ ️ move window.resize to resizeObserver
2024-11-07 19:12:48 -05:00
alistair3149
07179d50b1
perf(core): ⚡ ️ defer non-essential init scripts
2024-11-03 10:39:10 -05:00
alistair3149
25fbc14908
style(core): 🎨 rename intersectionObserver references to observer
...
We will be using it for more than intersectionObserver.
2024-11-02 02:00:21 -04:00
alistair3149
10d3c17f18
perf(core): ⚡ ️ disable all CSS transition during window resize
2024-10-19 00:13:13 -04:00
alistair3149
8640d4ef30
feat(toc): ✨ switch to ToC implementation based on Vector 2022
...
This will serve as the groundwork of merging the intersection observers
and collapsible toc in the future.
2024-09-10 18:28:12 -04:00
alistair3149
fdc6eaee20
feat(Echo): ✨ upgrade Echo buttons for consistency
...
This is similiar to how it is handled in Vector.
We are forcing the Echo button to render in the same way as it was initially.
This took me so many hours sigh.
2024-07-05 20:37:52 -04:00
alistair3149
f2ff92e1ac
feat(toc): ✨ drop checkbox hack usage in ToC in favor of dropdown ( #894 )
...
Now that ToC is also using the new dropdown system, we can remove all references to the old checkbox hack now.
Fixes : #855
2024-07-03 17:44:52 -04:00
alistair3149
aaee215cf6
refactor(stickyHeader): ♻️ move sticky header script into a separate module
2024-07-01 13:19:31 -04:00
alistair3149
327aca0b2c
feat(pageActions): ✨ add share button to page actions for article pages
2024-06-28 18:42:04 -04:00
github-actions
26076514c1
ci: 👷 lint code to MediaWiki standards
...
Check commit and GitHub actions for more details
2024-06-07 19:01:54 +00:00
alistair3149
a2d3159def
feat(core): ✨ replace checkbox hack with details and summary
...
Note that ToC is still using the old checkbox hack, it will be replaced in a later time.
Related: T333394
2024-05-30 02:20:13 -04:00
alistair3149
7a4d43392d
perf(core): ⚡ ️ remove scroll eventListener and resizeObserver on tables when not needed
...
Also started to refactor the table script to be more generic for overflow elements.
2024-05-27 15:47:53 -04:00
alistair3149
af3d72ad75
fix(core): 🐛 incorrect sticky header class assignment
2024-05-25 19:53:17 -04:00
alistair3149
27bca0fc66
feat: ✨ improve scrolling performance
2024-05-25 19:26:38 -04:00
alistair3149
03da361b97
feat(components): rewrite template data partials into CitizenComponent components ( #846 )
...
- Refactor existing template data-related partials into CitizenComponent components
- Re-implement user menu header as UserInfo
- Add description text for anon and temp user in UserMenu
---------
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2024-05-15 01:24:43 -04:00
alistair3149
f2393a74b8
feat(core): ✨ use relative time for sidebar last mod
...
Closes : #700
2024-05-08 16:39:47 -04:00
alistair3149
21ce85a320
fix(core): 🐛 remove loading indicator when page is unloaded
...
Closes : #811
2024-03-19 18:49:35 -04:00
alistair3149
201a38f93f
fix(core): 🐛 hide loading indicator when user clicks back button on browser
...
Closes : #718
2023-10-26 17:41:21 -04:00
alistair3149
0b65a05556
refactor(core): ♻️ break down main function in skin.js
2023-07-11 21:44:34 -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
alistair3149
09ffed668d
fix(core): 🐛 ensure loading indicator is removed when script is loaded
2023-05-06 17:51:41 -04:00
alistair3149
ce9963467d
refactor(core): ♻️ load content scripts using wikipage.content hook
2023-04-30 18:01:53 -04:00
alistair3149
8c888a7e1f
feat(core): ✨ make tables responsive without breaking table layout
...
Instead of a CSS solution used previously, switch to a JS solution to wrap tables.
This should ensure the table renders correctly and also scrollable.
This lays the groundwork for making table more user-friendly in the future.
2023-04-30 17:01:29 -04:00
alistair3149
90890de53f
feat(core): ✨ add config flag to disable preferences menu
2023-03-27 14:08:38 -04:00
alistair3149
ef955c28a0
feat(core): ✨ use MW core checkboxHack instead
...
We no longer need to emulate the same feature when it is in core
2023-01-25 19:40:52 -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
f70d410779
feat(core): ✨ reduce scroll up header delay
2022-11-23 14:11:48 -05:00
alistair3149
6b13da3318
feat(core): ✨ hide navigation on scroll down
2022-11-21 17:46:09 -05:00
alistair3149
b5ddd26de7
perf(core): ⚡ ️ only add beforeunload listener once
2022-11-21 17:46:04 -05:00
alistair3149
9c871764c3
style: 🎨 fix some eslint issues
2022-11-21 17:45:50 -05:00
alistair3149
31c43fa33b
refactor(core): ♻️ do not init observer when not needed
...
Do not init scroll observer if sentinel is set to display:none
2022-11-21 17:45:42 -05:00
github-actions
159bd8a7d2
ci: 👷 lint code to MediaWiki standards
...
Check commit and GitHub actions for more details
2022-11-21 17:42:28 -05:00
alistair3149
969cd787d6
feat(core): ✨ use different font weight in different themes
...
The same font weight do not provide the same contrast in different themes.
We should be able to change the scaling
2022-11-21 17:42:26 -05:00
alistair3149
ceaf3ed844
feat(core): ✨ tweak responsive layout
2022-11-21 17:42:22 -05:00
alistair3149
a1ce408e43
feat(core): ✨ re-implement responsive toc
2022-11-21 17:42:05 -05:00
alistair3149
3eaeaa15f7
refactor(core): ♻️ pre-work to allow Citizen to render ToC
2022-11-21 17:41:40 -05:00
alistair3149
4f651b41ca
feat(pwa): ✨ add basic support for service worker
...
This is super basic and experimental.
It will be expanded upon in the future, but for now it will satisfy the
requirement for PWA
2022-10-23 16:37:43 -04:00
alistair3149
e72d7c00a3
feat(core): ✨ add sticky body header
2022-09-29 22:33:06 -04:00
alistair3149
eba22354e5
fix(core): run script when DOM is ready
...
Sometimes the scripts start to run before DOM is fully ready. It causes things
like #475 where the checkbox is not in DOM yet but the script is already asking for it.
2022-06-04 17:44:03 -04:00
alistair3149
da619c793b
refactor(core): remove duplicated auto theme handling
...
Refactor auto theme handling into inline script since theme.js is basically duplicated code
at this point. Also add the event listener whenever auto theme is set.
Closes : #461
2022-05-20 17:33:10 -04:00
alistair3149
1be7f5faaf
refactor(core): rewrite ToC scrollspy based on Vector
2022-05-17 15:11:16 -04:00
alistair3149
c978bb1320
refactor(core): rename title hidden class
2022-05-13 00:30:46 -04:00
alistair3149
d59ca5c83a
refactor(core): move intersection observer into a module
...
* We will likely use it for other things in the future
* Based on Vector's implementation
* Also do not get toc element twice
2022-05-13 00:26:53 -04:00
alistair3149
194c73d5bb
style(core): use arrow function
2022-05-12 22:44:17 -04:00
alistair3149
86150d492d
refactor(core): clean up checkboxHack implementation
...
Mostly based on Vector 2022. Now we target checkbox hacks by the HTML classes
.mw-checkbox-hack-TYPE instead of defining each individually, which would
make it more scalable.
2022-05-12 22:37:28 -04:00