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
alistair3149
508c96ae9d
refactor(core): merge ToC script into core scripts
2022-05-12 17:18:39 -04:00
alistair3149
e0d5eb9657
feat(core): set toc-enabled through Mustache template
...
Since somewhere around MW 1.37, buildSkinFeatures() no longer have access to OutputPage.
That causes $out->isTOCenabled always return null, which makes ToC
broken for any wikis since 1.37. This should fix the issue for now.
More optimizations on the loading behavior will come soon.
2022-05-12 17:01:01 -04:00
alistair3149
b73357cf7c
feat(core): update checkboxHack API
2022-05-11 21:32:36 -04:00
alistair3149
cae7deb945
refactor(core): clean up header icon styles
2022-05-10 11:59:43 -04:00
alistair3149
5ccfbcfdeb
refactor(core): clean up drawer implementation
...
This is a part of the site header refactor
* Use relative units
* Add title to toggle button
* Remove unnessecary CSS
* Rewrite HTML classes
* Temporary remove drawer subsearch, it will be re-explored in a later patch
2022-05-10 10:52:36 -04:00
alistair3149
96013bb126
feat: deprecate --background-color-dp-XX in favor of --color-surface-X
...
--background-color-dp-XX is now fully deprecated in favor of a simpler 4 color surface system. It can be accessed through the --color-surface-X CSS var.
2022-04-25 22:27:52 -04:00
alistair3149
fed5369847
fix: add null check for checkboxObj.target
...
It should no longer throw an exception which causes other script to fail
Closes #432
2022-04-25 21:48:52 -04:00
alistair3149
f7e73cf171
feat: add security header deprecation message for upcoming version
2021-08-05 11:41:31 -04:00
alistair3149
7dc0d14c70
feat: simplify background color variables in core styles
...
--background-color-dp-XX is soft depreciated, please use --color-surface-X instead
2021-07-25 19:16:05 -04:00
alistair3149
63d21cf318
fix: add additional check for ToC elements
...
that should fix the null querySelector bug:
2021-07-12 15:11:11 -04:00
alistair3149
5f168f03ee
feat: add page load progress bar
2021-06-12 09:54:47 -04:00
alistair3149
51ac47691e
feat: implement reading preferences
...
allow visitor to adjust theme, font size, and page width
2021-04-27 13:51:03 -04:00
alistair3149
e2b4a4e49a
feat: show page title on header after scroll
...
The page header also acts as a jump to top link
2021-04-26 11:39:27 -04:00
alistair3149
38882334c8
refactor: use checkboxHack module for search script
2021-04-21 18:47:03 -04:00
alistair3149
8129ca0e5b
feat: use MW core checkboxHack scripts instead
...
Cloned and tweaked to a local file as the core file can be different across MW builds
2021-04-21 16:45:52 -04:00
alistair3149
f44aaa4e4c
refactor: refactor skins.citizen.scripts to ES6
2021-04-21 13:44:28 -04:00
alistair3149
117d839f00
doc: fix lettercase for Window and Document object
2021-04-21 11:32:44 -04:00