Commit graph

46 commits

Author SHA1 Message Date
alistair3149 235a76c2bd
feat(core): add border to Citizen cards 2023-03-01 15:02:34 -05:00
github-actions 9e15415835 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-02-28 21:59:36 +00:00
alistair3149 7416a7f6d1
fix(search): 🐛 incorrect max height for search suggestions 2023-01-16 17:36:45 -05:00
alistair3149 60c12706a5
feat(search): contain the overscroll of search suggestion 2022-12-18 01:09:42 -05:00
alistair3149 203b0b42c3
feat(search): add MediaSearch to typeahead 2022-12-14 10:28:45 -05:00
alistair3149 4d1225b96f
refactor(search): ♻️ simplify typeahead item styles and classes 2022-12-13 23:52:54 -05:00
alistair3149 074df5272c
fix(search): 🐛 incorrect full text search URL 2022-12-13 18:25:14 -05:00
alistair3149 cc3e1d41d4
fix(search): 🐛 do not shrink thumbnail 2022-12-08 13:27:40 -05:00
alistair3149 96ec8e4248
fix(search): 🐛 typeahead thumbnails should be center-aligned 2022-12-06 14:54:22 -05:00
alistair3149 fd0978b73d
feat(search): use background-image instead for typeahead thumbnails 2022-12-06 14:27:08 -05:00
alistair3149 284b0d8952
feat(search): add no result state to typeahead 2022-12-06 13:52:14 -05:00
alistair3149 9bf737f720
feat(search): add empty state to typeahead
This is a barebone initial implementation, more work will come to it
2022-12-06 12:01:47 -05:00
alistair3149 3488e29960
feat(search): show enter key tip when item is active 2022-12-05 15:52:36 -05:00
alistair3149 c9b03aa7fe
feat(search): merge footer into item element 2022-12-05 15:29:17 -05:00
alistair3149 99b3523cd6
refactor(search): ♻️ partial cleanup on typeahead DOM 2022-12-04 02:13:37 -05:00
alistair3149 4293021d5c
feat(search): clean up redirect text implementation 2022-12-03 14:12:01 -05: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 85e69f5a6b
refactor(core): ♻️ deprecate old font variables 2022-11-21 17:47:09 -05:00
alistair3149 0c4562f235
feat(core): update list styles 2022-11-21 17:46:27 -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 af85fb4b40
fix(search): hide default MW search suggestion
Sometimes the JS is not able to stop the search module from loading.
We can use CSS to hide the suggestion for now.
2022-11-08 00:25:40 -05:00
alistair3149 eadaef7a0a
refactor(core): ♻️ clean up header card mixins and var 2022-09-30 16:52:13 -04:00
alistair3149 6de95d4fec
feat(core): redesign site header (#521)
Change header into vertical header for large screen and bottom header for small screen.
2022-09-29 19:12:56 -04:00
github-actions 0d63257e86 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-09-28 21:02:56 +00:00
alistair3149 7bec9ef10b
fix(core): hide double MW search suggestion
In rare scenario such as #520, default MW search suggestions will load regardless of the settings.
This simple CSS hack is used to hide in case if it loaded.
This will not be needed when vue search is implemented.
2022-09-28 17:02:15 -04:00
alistair3149 b15a92c2ff
fix: do not collapse space in highlighted search title
Closes #494
2022-08-01 01:45:32 -04:00
alistair3149 726a348369
feat(core): hide redirect message in search results when not needed
If either the title or redirect title is a substring of the other,
hide the redirect.

Related: T303013
2022-05-20 19:48:07 -04:00
alistair3149 a5c52e48b7
feat(core): indicate when search results are from redirects
For REST API, search results will now indicate if they are from redirects.
The current implementation is that it will always show up, the logic to
trim redundant info will come later

Related: T303013
2022-05-20 19:10:36 -04:00
alistair3149 5ff7b4cf90
fix(core): invisible search suggestion item 2022-05-12 22:43:05 -04:00
alistair3149 478a8396af
refactor(core): merge card content fade animation into mixin 2022-05-11 22:06:33 -04:00
alistair3149 7ff415db13
feat(core): use relative unit for search suggestion 2022-05-10 22:05:42 -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 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 2c9a5f45ec
refactor(core): merge menu content show transition into mixin 2022-05-01 22:11:31 -04:00
alistair3149 60d57dea85
feat(core): switch searchbox transitions to scale 2022-05-01 21:35:33 -04:00
alistair3149 c23a1d7838
feat: unify modal styles
All modals should follow the same styles
2022-04-28 15:18:41 -04:00
alistair3149 59ca621c80
feat: use neutral background for search suggestion thumbnails 2021-08-31 13:13:49 -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 62f161f633 fix: incorrect variable name 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 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 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