Commit graph

1020 commits

Author SHA1 Message Date
alistair3149 5dc456cc6a
fix(core): incorrect table of content modal location 2022-05-12 21:48:20 -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 478a8396af
refactor(core): merge card content fade animation into mixin 2022-05-11 22:06:33 -04:00
github-actions a2577db3c8 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-05-12 01:41:40 +00:00
alistair3149 c69f2927ef
feat(core): set accent-color as primary color 2022-05-11 21:40:27 -04:00
alistair3149 b73357cf7c
feat(core): update checkboxHack API 2022-05-11 21:32:36 -04:00
alistair3149 da26d4bc7f
refactor(core): add null check search button checkbox 2022-05-11 19:08:51 -04:00
alistair3149 0e3ecf1415
feat(core): use relative units for text and spacing 2022-05-11 19:04:52 -04:00
alistair3149 895d7c2398
feat(core): add missing title text to preferences button 2022-05-11 18:47:02 -04:00
alistair3149 d39deb157c
feat(core): make range indicator text smaller 2022-05-10 22:22:31 -04:00
alistair3149 3e051f0d67
feat(core): use relative units for page actions 2022-05-10 22:17:12 -04:00
alistair3149 7ff415db13
feat(core): use relative unit for search suggestion 2022-05-10 22:05:42 -04:00
alistair3149 22450c4804
refactor(core): clean up header variables 2022-05-10 21:58:57 -04:00
alistair3149 1186bdf102
feat(core): update preferences menu behavior
* Adjust font size slider range, it starts at 80% and ends at 180%
* Font size is always shown in percentage now
* Better handling of initial font size, it should now detect browser or site default correctly
* Use relative units
* Tweak styles
2022-05-10 21:45:30 -04:00
alistair3149 9872a820af
feat(core): make header icon background scale to font size 2022-05-10 14:00:28 -04:00
alistair3149 9a28bccd64
refactor(core): partial cleanup of header preferences
This is a part of the header refactor
* Use styles provided by header
* Clean up header-related HTML classes
2022-05-10 13:39:58 -04:00
alistair3149 f8d90e1782
fix(core): hover state should be visible on card 2022-05-10 13:37:48 -04:00
alistair3149 000643ad36
refactor(core): clean up personal menu
This is a part of the header refactor
* Clean up DOM strcture
* Clean up unnessecary styles
* Clean up HTML classes
* Add active state to button
2022-05-10 13:36:52 -04:00
alistair3149 cae7deb945
refactor(core): clean up header icon styles 2022-05-10 11:59:43 -04:00
alistair3149 15296d55be
refactor(core): move checkboxHack checkboxes into container 2022-05-10 11:15:34 -04:00
alistair3149 105d1b9006 refactor(core): clean up inner header implementation
This is a part of the header refactor
* Add hover and active state for title button
* Clean up DOM structure
* Clean up unnessecary styles
* Clean up HTML class names
2022-05-10 10:52:36 -04:00
alistair3149 6e35212007 refactor(core): clean up search box implementation
* Clean up DOM structure
* Clean up HTML classes
* Use relative units
* Remove unnessecary CSS
2022-05-10 10:52:36 -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 44f9bc0a7c
feat(core): style parenthesis text in FirstHeading differently
Parenthesis text in FirstHeading are commonly used for disambiguation purposes
Therefore it does not have to be as prominent as the title
2022-05-07 00:45:51 -04:00
alistair3149 b00c7ddf4a
feat(core): tweak ToC styles
* Use the same border radius as other Citizen menus
* Remove unnessecary margin and padding
* More accurate height calculations
2022-05-03 16:03:34 -04:00
alistair3149 a3d85bb8a5
fix(core): fix overflow in search suggestions 2022-05-02 21:36:59 -04:00
alistair3149 ca59b097ba
refactor(core): merge duplicating mixins together 2022-05-01 22:53:41 -04:00
alistair3149 a6d88fc68b
style: lint styles with stylelint 2022-05-01 22:40:27 -04:00
alistair3149 d286afdfb9
feat(core): add animation to page tools more menu 2022-05-01 22:39:41 -04:00
alistair3149 e6a9bd38f1
feat(core): add animation to preferences menu 2022-05-01 22:36:14 -04:00
alistair3149 41e0832904
feat(core): remove animation from searchbox but keep suggestion on mobile 2022-05-01 22:17:36 -04:00
alistair3149 b4959b1972
feat(core): add animation to personal menu 2022-05-01 22:12:47 -04:00
alistair3149 2c9a5f45ec
refactor(core): merge menu content show transition into mixin 2022-05-01 22:11:31 -04:00
alistair3149 e2a6a0355c feat(core): toggle visbility in CSS when menu is show/hidden
* Better performance as browser would not render element when it is hidden
* Better accessbility support for screen readers
2022-05-01 21:46:39 -04:00
alistair3149 60d57dea85
feat(core): switch searchbox transitions to scale 2022-05-01 21:35:33 -04:00
alistair3149 c0c2e61bf3
refactor(core): turn card animation into a mixin 2022-05-01 21:23:37 -04:00
alistair3149 e2da010a90
feat(core): tweak drawer open transition
Instead of using translate which can look jarring especially in large menus,
we use a combination of scale and opacity to achieve smoother effect while
saving more on performance.
2022-05-01 20:17:06 -04:00
alistair3149 fae606277f
feat(core): tweak transition timing and curve
* Subtle transitions (e.g. color, opacity) are now sped up to 100ms,
so that it feels more responsive.
* Sizing transitions (e.g. transform, height) are now slowed to 250ms
and use a new cubic curve, it should feel more smooth.
2022-05-01 19:25:32 -04:00
alistair3149 56a869b3d9
refactor(core): clean up transition variable names 2022-05-01 19:14:17 -04:00
alistair3149 5fb9627ba7
refactor(core): clean up unused LESS variables 2022-05-01 19:09:00 -04:00
alistair3149 709a89d399
perf(core): remove box-shadow transition for thumbnails
It is not nessecary and expensive to run. If it is needed, a pseudo element should be used instead
2022-05-01 18:57:59 -04:00
alistair3149 b39452d3b5
refactor(core): remove unnessecary style overrides for links
* Visited link styles are removed from MW already,
there are no need to use important to override those rules.
* Citizen should not override text-decoration setting if users
want to have underline links.
2022-05-01 18:45:48 -04:00
alistair3149 4bacf2fff1
perf(core): remove expensive CSS transitions 2022-04-30 18:04:19 -04:00
alistair3149 c74f1685d6
feat(core): add aria-label for preferences button 2022-04-30 18:01:38 -04:00
alistair3149 ac3ebf56a2 fix(core): incorrect aria-controls ID in section toggle 2022-04-30 17:19:57 -04:00
alistair3149 76a84d9e00 feat(core): add ARIA support to collaspible sections
* Also renamed toggle to indicator since it is misleading. The whole heading is the toggle itself.
2022-04-30 14:48:09 -04:00
alistair3149 b69ca82650
fix: lower header z-index to 4
The original z-index is way too high (10) and would overlap dialogs.
It should be set to 4 (same as Vector 2022) to ensure compatiblity with OOUI elements.

Closes #447
2022-04-30 13:50:49 -04:00
alistair3149 39225d6f36
perf(core): improve rendering performance of drawer menu 2022-04-28 21:54:54 -04:00
alistair3149 87f6e4fa19
feat(core): tweak sitestats style
* Left align the drawer header
* Hide file count when width is smaller than 480px
2022-04-28 21:41:41 -04:00
alistair3149 c23a1d7838
feat: unify modal styles
All modals should follow the same styles
2022-04-28 15:18:41 -04:00
alistair3149 eb9cd37cb7
fix: add missing selector in older MW version
mw-portlet is not available in older MW version, added mw-portal as backup
2022-04-28 01:22:20 -04:00
alistair3149 571704f3a9
feat(core): tweak code block styles
* Add rounded corner
* Update background color
2022-04-27 19:38:12 -04:00
alistair3149 d22f562816
fix: uncaught value when no theme value is saved
Users are unable to open the preference panel when there are no theme option saved in localStorage.
It is because prefValue.theme will return null which will stop the script from executing.
Now when prefValue.theme is null, it will default to auto.
2022-04-27 16:44:53 -04:00
alistair3149 9eeac80bf5
feat: tweak collapsible toggle size 2022-04-27 16:15:23 -04:00
alistair3149 7e068dd4b1
refactor: simplify unnessecary selectors 2022-04-27 14:43:02 -04:00
alistair3149 b9b795ff11
refactor: use gap instead of margin-right for spacing 2022-04-27 14:02:10 -04:00
alistair3149 a61635ea8f
feat: tweak edit button styles when both visual and source edit are present 2022-04-27 13:35:03 -04:00
alistair3149 0177a06a22 feat: use wikiText icon for source edit when VE is present
* Use wikitext icon to indicate source edit instead of regular edit icon.
* Visual edit would now use regular edit icon
2022-04-27 13:12:59 -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 2c79c061c4 feat: pass styles as style element instead of inline 2022-04-25 20:34:40 -04:00
alistair3149 9041cc6f22
feat: tweak category styles 2022-04-24 15:38:17 -04:00
alistair3149 f5d280e4c3
fix: remove indentations 2022-04-24 15:34:43 -04:00
alistair3149 47e1259bc3
feat: implement a more adaptive smooth shadow
* Looks more natural
* Can be customized through the surface-shadow and shadow-strength CSS var
* Light mode and dark mode have been different shadow now, it should be more visible in dark mode
* Box-shadow is a CSS var, which can be used in templates and wiki CSS
2022-04-24 15:24:09 -04:00
alistair3149 f05295195a feat: move discussion to the top of the more menu
Also clean up some related-styles
2022-04-24 01:53:47 -04:00
github-actions 673445c718 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-04-23 05:32:12 +00:00
alistair3149 6217bad7c0 feat: implement RTL icons 2022-04-23 01:30:02 -04:00
alistair3149 6efff7f5da feat: revamp drawer header
* wgLogo is always visible in the drawer
* Increase the size of wiki name
* Sitestats will now format large numbers into human readable formats (e.g. 12.2K, 3M, etc.)
* Sitestats now use icons instead of text as labels
* Remove wordmark for now, will revisit later
2022-04-23 01:30:02 -04:00
alistair3149 047f830d1a
fix: FOUC of light theme when user is using auto theme and prefer dark
The prefer-dark script was previously deferred which causes a delay to detect and switch theme for the user. It is now inlined to prevent the delay.
2022-04-19 18:17:53 -04:00
alistair3149 7ecf3a81eb
feat: depreciate theme preferences in MW user preferences
Just local storage is good enough
2022-04-19 17:31:23 -04:00
alistair3149 7b7641b366
feat: hide toc number by default 2022-04-17 18:12:11 -04:00
alistair3149 a2dffec7eb
feat: remove letter spacing from wordmark 2022-04-17 18:07:56 -04:00
Lens0021 449278f0be
feat: use template data for page tools if available (#440)
* Use template data for page tools if available

* ci: lint code to MediaWiki standards

Check commit and GitHub actions for more details

* emptyPortlet class is added by the core

* ci: lint code to MediaWiki standards

Check commit and GitHub actions for more details

* Update PageTools.php

* Set toolbox to always valid data

Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2022-04-14 00:30:33 -04:00
github-actions eddcf5b493 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-02-19 20:09:01 +00:00
github-actions df7abc4010 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2021-12-16 03:20:34 +00:00
alistair3149 f5c5c996fa
fix: fix eslint no-shadow error 2021-12-15 22:19:39 -05:00
alistair3149 c51c73159b
feat: add a max height to more action menu
Fix #365. This is a bandage fix for the language variant menu until the language variant menu is moved to an alternate location.
2021-10-07 11:14:53 -04:00
alistair3149 f24ab7dd97
fix: background clipping between data-after-content and footer 2021-08-31 13:27:33 -04:00
alistair3149 59ca621c80
feat: use neutral background for search suggestion thumbnails 2021-08-31 13:13:49 -04:00
alistair3149 d5ac0ce295
feat: update RelatedArticle skinstyle to grade A 2021-08-31 12:29:49 -04:00
alistair3149 9134834d6d
feat: add fading to mw-data-after-content 2021-08-26 17:11:01 -04:00
alistair3149 676c08916a
refactor: move syntax color out of CodeMirror 2021-08-26 12:11:52 -04:00
alistair3149 c15dafffea
feat: tweak ToC styles and show numbers 2021-08-26 11:18:25 -04:00
github-actions 86a9f1dece ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2021-08-26 03:58:36 +00:00
alistair3149 2285670e08
feat: use mask-image instead of box-shadow for header background
This will allow header fade background blending with color-surface-0, regardless of what color it is set to
2021-08-25 23:56:53 -04:00
alistair3149 e53ca7839b
feat: add smooth fading to footer top margin 2021-08-25 23:53:11 -04:00
alistair3149 79c5434071
feat: increase the contrast of buttons and icons 2021-08-10 23:55:54 -04:00
alistair3149 f7e73cf171
feat: add security header deprecation message for upcoming version 2021-08-05 11:41:31 -04:00
alistair3149 e03647eef6 fix: plainlist styles should not be overriden 2021-08-05 11:36:25 -04:00
alistair3149 f5a2a831d1
feat: add user customizable line height 2021-08-05 11:24:52 -04:00
alistair3149 79b61cd24a
fix: also apply typography styles to ciitzen-body 2021-07-30 22:57:38 -04:00
alistair3149 6acd4d23df
fix: use mw-body-content for content styles as VE preview ignores citizen-body 2021-07-30 22:42:27 -04:00
alistair3149 d2e981a7d6
feat: tweak drawer menu animation 2021-07-30 22:13:01 -04:00
alistair3149 9ff44d807b
feat: show article stats in menu on mobile viewport 2021-07-30 14:05:25 -04:00
alistair3149 b72ea763a3
feat: change menu into a modal instead of overlay 2021-07-30 13:48:57 -04:00
alistair3149 8bca28662b
feat: remove mw-body-content from HTML
T279388
mw-body-content is used within body content in 1.37. The original mw-body-content container will use the class citizen-body instead.
2021-07-30 11:44:02 -04:00
alistair3149 cff27d972c
feat: remove color-link LESS variable and scope the CSS variable 2021-07-27 17:33:59 -04:00
alistair3149 020d05c253
feat: improve contrast for primary color in dark theme 2021-07-27 17:18:23 -04:00
alistair3149 07484ee190
fix: remove unused less variables 2021-07-27 16:02:45 -04:00
alistair3149 f8a26fe6ea
feat: tweak input field color 2021-07-27 15:58:55 -04:00
alistair3149 1746440bf7
feat: use primary color as outline color 2021-07-27 15:57:35 -04:00
alistair3149 7460442580
feat: calculate primary hover state color based on HSL 2021-07-27 15:49:12 -04:00
alistair3149 aae08f0a73
feat: rewrite OOUI skinstyles to the new system 2021-07-27 02:13:22 -04:00
alistair3149 2f735e4d4c
feat: tweak ToC toggle styles 2021-07-25 20:21:32 -04:00
alistair3149 e203bbeaab
fix: tweak weird gap between search box and suggestion 2021-07-25 20:21:12 -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 4190ab1904
feat: tweak header box shadow color 2021-07-25 14:34:17 -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 81d5296249
refactor: update loading animation delay to 500ms 2021-06-27 00:55:09 -04:00
alistair3149 e0b188ed6b
fix: duplicated CSS selector 2021-06-21 20:53:47 -04:00
alistair3149 4d3e18898e
feat: tweak p element margin 2021-06-21 20:51:50 -04:00
github-actions 89b21a5b0c ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2021-06-15 14:27:00 +00:00
alistair3149 f0678b6f34
feat: hide not logged in message on personal menu 2021-06-15 10:25:59 -04:00
alistair3149 bc71d5c9c0
fix: incorrect selector for loading class 2021-06-12 10:00:26 -04:00
alistair3149 5f168f03ee
feat: add page load progress bar 2021-06-12 09:54:47 -04:00
alistair3149 f21e19c5d8
feat: set sub, sup line-height to 1 2021-06-10 19:26:05 -04:00
alistair3149 19119f2b5d
feat: add auto theme to preferences 2021-06-09 14:40:44 -04:00
alistair3149 62f161f633 fix: incorrect variable name 2021-05-27 11:20:12 -04:00
alistair3149 f60e4b2626 fix: remove empty line in stylesheet 2021-05-27 11:20:12 -04:00
alistair3149 08987c9215 feat: add rounded corner to thumbnails
also merge thumbnail styles into one file
2021-05-27 11:20:12 -04:00
alistair3149 5c6408d766 feat: convert border radius to CSS variable 2021-05-27 11:20:12 -04:00
alistair3149 321f9a7f3d
refactor: only apply responsive styles to thumbnails 2021-05-22 19:19:37 -04:00
alistair3149 257abc84d0
feat: refresh the typeahead when blur 2021-05-18 13:26:00 -04:00
alistair3149 5e1d51d8a1
fix: unable to click link in typeahead 2021-05-18 13:14:51 -04:00
github-actions ea428465b8 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2021-05-18 16:35:05 +00:00
alistair3149 48deb87709
fix: add null check when accessing undefined keys
Co-authored-by: Hannes Kruse <hannes@octofox.de>
2021-05-18 12:34:08 -04:00
alistair3149 b32151c99a
fix: remove click eventlistener when pref panel is hidden 2021-05-18 12:27:10 -04:00
alistair3149 5c57415a86
refactor: add polyfill for replaceChildren
Co-authored-by: Hannes Kruse <hannes@octofox.de>
2021-05-18 12:25:34 -04:00
alistair3149 2564ba1268
refactor: replace onBlur event with click listener 2021-05-18 12:23:05 -04:00
alistair3149 d0f23fa991 fix: incorrect breakpoint for search bar 2021-05-17 19:27:28 -04:00
alistair3149 5d1af2ccb4
fix: inconsistent cursor in header button 2021-05-17 18:58:12 -04:00
alistair3149 edf6aa1834
fix: search suggestion height overflow 2021-05-17 17:58:48 -04:00
github-actions 9d792fc5b0 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2021-05-17 21:55:52 +00:00
alistair3149 3607a3dbcc
feat: tweak search suggestion styles 2021-05-17 17:55:00 -04:00
alistair3149 c43e5279dd feat: remove lazyload modules
It is replaced by the core config `$wgNativeImageLazyLoading`
2021-05-17 16:55:11 -04:00
alistair3149 b2bd79196d
feat: rework search module (#386)
* feat: rewrite search module (WIP)
There are some caveats because it is a WIP
- Messages are not i18n yet
- Missing placeholder suggestion thumbnail
- Only REST mode works
- Missing greeting message when there is no search query
- Code might look like a mess (I learned JS not long ago)

* refactor: remove old search module

* feat: clean up search suggestion styles

* feat: hide overflow for suggestion text

* feat: add action API and various cleanup

* feat: re-add abort controller

* feat: add message support and tweaks

* feat: use virtual config instead of ResourceLoader hook

* fix: missing comma in const definition

* feat: add ARIA attributes
2021-05-17 16:34:14 -04:00
alistair3149 9ecd9722f3
feat: tweak quiet hover and active state color 2021-05-11 12:08:27 -04:00
alistair3149 3202c1d9e6
fix: prevent Firefox quickfind overriding the search toggle shortcut 2021-05-10 13:36:44 -04:00
github-actions fef76149d1 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2021-05-10 17:27:36 +00:00
alistair3149 74873da01f
refactor: better detection for slash toggle 2021-05-10 13:26:39 -04:00
alistair3149 6264b918e2
feat: dismiss preference panel when clicked outside or esc is pressed 2021-05-10 13:25:10 -04:00
alistair3149 ac2ed38183
feat: unify header button highlight hover state (#363) 2021-05-10 12:00:04 -04:00
Eshagh c891f42fd1
feat: add RTL icons for drawer toggle and VE save button (#374)
* Customize the drawer button for RTL language

* Convert ">" to "<" for RTL language

Co-authored-by: eshagh79 <eshagh094@gmail.com>
2021-05-06 22:36:34 -04:00
alistair3149 87756194fb
feat: add icon and text for addsection action (#368) 2021-05-05 13:08:37 -04:00
alistair3149 782a3fab09
fix: preference icon misalignment in large font sizes (#363) 2021-05-05 12:41:24 -04:00
alistair3149 38f674eced
feat: tweak search toggle button 2021-05-04 13:53:40 -04:00
github-actions 3e6b24c390 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2021-05-04 17:34:33 +00:00
alistair3149 96cf5319c7
feat: improve page tool more button behavior 2021-05-04 13:33:43 -04:00
alistair3149 06e91bb42d
feat: improve header button behavior 2021-05-04 13:27:47 -04:00