Commit graph

33 commits

Author SHA1 Message Date
alistair3149 325f22f0dd
fix(core): 🐛 fire input event when search query is cleared 2023-08-28 18:36:51 -07:00
alistair3149 739fa8504c
fix(core): 🐛 enter key should not clear search input
Use span instead of button element. As button element will make
enter key triggering the clear button.
2023-07-16 16:48:14 -04:00
alistair3149 1aba52b870
fix(core): 🐛 inconsistent search focus behavior 2023-07-16 03:50:43 -04:00
alistair3149 6cddf85131
feat(search): add clear button to search box 2023-07-10 16:23:48 -04:00
alistair3149 e06ed54c83
feat(search): support MW default search shortcut key
It is added as an alternative of the slash key shortcut.

Closes: #582
2023-02-15 16:08:39 -05:00
alistair3149 48cb80aaa3
refactor(search): ♻️ make renderSuggestions more digestible 2022-12-03 13:42:01 -05:00
github-actions 568405cd5d ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-12-02 23:00:32 +00: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
github-actions 57d50ea5c5 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-12-02 22:39:05 +00:00
alistair3149 1939850369
feat(core): allow multiple search components on the same page
This will allow the search suggestion to hook up to multiple search
boxes with `.citizen-search-box` as container. Do note that the default
Citizen suggestion is hardcoded for the primary search, so it only
works for the old core search suggestion module.

This is also a prereq for implementing the Codex search like the one
from Vector.
2022-12-02 17:35:23 -05:00
alistair3149 23795e05e3
chore(ci): disable mediawiki/class-doc 2022-05-13 00:20:05 -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 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 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 5f168f03ee
feat: add page load progress bar 2021-06-12 09:54:47 -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 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 e79e707ce3
fix: disable search shortcut when VE is activated 2021-04-30 13:28:51 -04:00
alistair3149 4bbb59f978
refactor: improve search loading indicator behavior 2021-04-22 12:09:14 -04:00
alistair3149 546fa36d33
refactor: drop dependency for mediawiki.page.ready 2021-04-22 11:44:48 -04:00
alistair3149 38882334c8
refactor: use checkboxHack module for search script 2021-04-21 18:47:03 -04:00
alistair3149 f44aaa4e4c
refactor: refactor skins.citizen.scripts to ES6 2021-04-21 13:44:28 -04:00
github-actions 3f9117a2cd ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2021-04-17 04:07:47 +00:00
alistair3149 ad78883461
fix: search shortcut being triggered in textarea 2021-04-17 00:06:57 -04:00
alistair3149 8ef0e927f8
refactor: simplify search key handler 2021-04-12 16:22:16 -04:00
alistair3149 5a3b64252d
feat: tweak search shortcut key behavior 2021-04-12 15:55:59 -04:00
alistair3149 670641e903
feat: use slash as shortcut for search 2021-04-12 15:09:28 -04:00
alistair3149 56de894f6e
refactor: convert skin.citizen.scripts to packagedFiles 2021-01-16 17:01:58 -05:00
alistair3149 6ba5f41470
Use module name for stylesheets and scripts 2020-06-16 23:03:28 -04:00
alistair3149 d2845859c7
Open search when shortcut key is pressed 2020-06-09 00:30:24 -04:00