Commit graph

187 commits

Author SHA1 Message Date
alistair3149 7ec0ae5b8e
refactor(stickyHeader): ♻️ create sticky sentinel in JS instead
It is only used for sticky header which requires JS, we should just create it in JS
2024-07-02 19:20:17 -04:00
alistair3149 5715a29dae
feat(stickyHeader): reduce direction observer throttle 2024-07-01 13:19:59 -04:00
alistair3149 aaee215cf6
refactor(stickyHeader): ♻️ move sticky header script into a separate module 2024-07-01 13:19:31 -04:00
alistair3149 1edc40e70c
feat(share): only share URL
The text handling across OS is inconsistent, and it is more desirable to just share the link and get the description through the embed.
2024-06-28 19:25:57 -04:00
alistair3149 327aca0b2c
feat(pageActions): add share button to page actions for article pages 2024-06-28 18:42:04 -04:00
alistair3149 7fb35f90f5
fix(overflow): 🐛 prevent overflow button from triggering form action button
When the overflow button is within a `<form>` element, it can sometimes
trigger the form action (e.g. In the realtime preview of WikiEditor).
2024-06-24 14:39:33 -04:00
alistair3149 dd89daba39
fix(overflow): 🐛 allow to click through the nav element 2024-06-12 12:51:50 -04:00
alistair3149 7830faa8fe
fix(overflow): 🐛 mark oveflow button as not accessible for screen reader 2024-06-11 19:15:57 -04:00
alistair3149 4b457dfa08
fix(overflow): 🐛 align scroll buttons with content margin 2024-06-11 19:07:38 -04:00
alistair3149 cbf60030f1
fix(overflow): 🐛 use more accurate rounding method for overflow detection 2024-06-11 18:56:54 -04:00
alistair3149 55d413eeda
feat(overflow): add overflow scroll button when using a pointer device 2024-06-11 18:00:45 -04:00
alistair3149 ababe58186
fix(core): 🐛 do not debounce scroll direction script 2024-06-09 22:58:17 -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 502b462c06
style(dropdown): 🎨 clean up code styles 2024-06-01 15:28:49 -04:00
alistair3149 32d10f893b
fix(dropdown): 🐛 toggle should dismiss the dropdown properly 2024-06-01 15:13:38 -04: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 83ab221408
feat(core): only handle wikitable instead of all tables
Wikis use tables in creative ways and it is probably just safer to only apply it to wikitables.
Might revisit if there are any news from T330527.
2024-05-29 17:47:13 -04:00
alistair3149 2bbb1d9408
perf(core): ️ check for nowrap classes before constructing class 2024-05-29 14:02:57 -04:00
alistair3149 4ed68a924d
feat(core): wrap any elements tagged with the class citizen-overflow 2024-05-27 18:01:09 -04:00
alistair3149 7b32aeec7d
fix(core): 🐛 always reset overflow state 2024-05-27 17:58:04 -04:00
alistair3149 974e6b2750
feat(core): add config to change overflow inherited classes 2024-05-27 17:16:23 -04:00
alistair3149 c9210bd0dd
refactor(core): ♻️ separate inherited class function 2024-05-27 17:10:04 -04:00
alistair3149 523140f62f
perf(core): ️ only toggle class when the element is overflowing 2024-05-27 17:04:28 -04:00
alistair3149 bc356f915d
fix(core): 🐛 fix incorrect overflow wrapper class name 2024-05-27 16:12:09 -04:00
alistair3149 cb1cfde785
fix(core): 🐛 remove table border expansion before the JS is loaded 2024-05-27 16:10:25 -04:00
alistair3149 c17aeab3fd
feat(core): rename wgCitizenTableNowrapClasses to wgCitizenOverflowNowrapClasses
Allow this config to use for more generic elements in the future
2024-05-27 15:54:34 -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 d34fb7b6f9
refactor(core): ♻️ clean up responsive table code 2024-05-26 00:37:54 -04:00
alistair3149 8ba6b55770
refactor(core): ♻️ clean up section functions 2024-05-25 23:51:50 -04:00
alistair3149 e9289b149a
perf(core): ️ further improvements to scroll and section observers 2024-05-25 23:18:18 -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 ae6d207fb4
fix(core): 🐛 escape double quotes for toc selector 2024-05-25 06:57:02 -04:00
alistair3149 685901cce3
fix(core): 🐛 incorrect section selector 2024-05-21 23:15:53 -04:00
alistair3149 593c6406fb
refactor(core): ♻️ simplify section handling 2024-05-21 18:46:19 -04:00
alistair3149 a405d64616
refactor(core): ♻️ various performance and style improvements 2024-05-21 18:08:28 -04:00
alistair3149 1270d4edd1
refactor(core): ♻️ add error handling to lastModified.js 2024-05-21 15:00:03 -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 9cd0cc45f3
fix(toc): 🐛 CSS escape ID
When the heading contains an amprehend, it will throw an exception.
2024-04-25 23:33:22 -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
alistair3149 964a4a534d
feat(prefs): remove line-height customization for now
Will be re-implemented later
2024-04-25 17:22:27 -04:00
alistair3149 0d52046523
feat(prefs): migrate font size to client preferences 2024-04-25 17:06:09 -04:00
alistair3149 c2aa796b68
fix(core): 🐛 remove leftover console log 2024-04-25 16:19:17 -04:00
alistair3149 4aefd74429
fix(core): 🐛 incorrect delimiter in inline script
Commas are not encoded in localStorage
2024-04-25 15:59:07 -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
alistair3149 d9675ebd60
fix(core): 🐛 round scrollLeft to integer
Fractional pixels from scrollLeft prevent Citizen from detecting overflow state properly.
2024-04-24 16:19:29 -04:00
alistair3149 cd21fd05f3
fix(core): 🐛 make ToC tracking work for non-content pages
Since MW 1.40, ToC has been enabled on all pages including non-content page.
By generating a list of elements to track through the ToC instead of targeting
specific classes, it should be more resilient and will work for non-content pages.
2024-04-20 01:32:37 -04:00
alistair3149 21ce85a320
fix(core): 🐛 remove loading indicator when page is unloaded
Closes: #811
2024-03-19 18:49:35 -04:00