Commit graph

31 commits

Author SHA1 Message Date
alistair3149 06d10b99ce
fix(core): 🐛 check if page content model and whether the title can exist before formatting 2024-05-29 12:24:07 -04:00
alistair3149 8ba6b55770
refactor(core): ♻️ clean up section functions 2024-05-25 23:51:50 -04:00
alistair3149 593c6406fb
refactor(core): ♻️ simplify section handling 2024-05-21 18:46:19 -04:00
alistair3149 c50a0cd0c1
refactor(core): ♻️ remove unnessecary params 2023-11-15 15:54:21 -05:00
David Lynch 6f5b761fe7
fix(core): let makeSections xpath query cope with multiple classes (#733)
* Let makeSections xpath query cope with multiple classes

As-of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/939783 in mediawiki-core, this class attribute is going to contain multiple classes. This would break the section-creation. This change to the query is backwards-compatible, so this should just inoculate the skin against future updates.

* Shorten line for mediawiki-lint compatibility

* fix: update html selector for parser output

Related: T350627

---------

Co-authored-by: alistair3149 <alistair3149@users.noreply.github.com>
2023-11-15 15:15:25 -05:00
github-actions 43b7ce4717 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-09-11 18:05:27 +00:00
alistair3149 672740a23a
fix(core): 🐛 check for mw-heading wrapper first before mw-parser-output
The current implementation will fail with the new mw-heading wrapper
2023-09-11 14:04:43 -04:00
github-actions 7b349faa73 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-09-11 00:52:03 +00:00
alistair3149 45a726d77f
fix(core): 🐛 stricter selector for collasible headers in formatter 2023-09-10 20:51:28 -04:00
alistair3149 a6a9fe27e4
fix(core): 🐛 stricter selector for collapsible header 2023-09-10 19:19:31 -04:00
alistair3149 2f40541bc4
feat(core): prefix citizen section classes 2023-09-10 19:00:52 -04:00
alistair3149 d62bdca69c
refactor(core): ♻️ update title class to use the newer standard 2023-08-25 16:52:58 -07:00
H. C. Kruse 661ad61486
ci: add PHPUnit tests (#712)
* ci: WIP add PHP Unit Tests

* ci: 👷 lint code to MediaWiki standards

Check commit and GitHub actions for more details

* ci: Add phpunit tests

---------

Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2023-08-25 14:39:37 -07:00
alistair3149 51a11f336c
refactor(core): ♻️ simplify body formatter implementation
- Use Mustache body content instead of building from scratch
- SubHeadings should only be created when sections can be created
- Remove wrapHTMLPublic as it is no longer needed
2023-02-28 16:21:50 -05:00
alistair3149 ad714dcfed
feat(core): allow collapsible sections with DiscussionTools wrappers on headings
Bug: T314714
2022-11-24 21:36:06 -05:00
alistair3149 81eadf9c8d
perf(core): ️ replace getElementsByTagName() with DOMCompat::querySelectorAll()
Should help with performance quite a bit
Bug: T317070
2022-11-24 21:26:55 -05:00
alistair3149 997c152a2a
feat(core): migrate collapse icon to RL icon module 2022-11-21 17:43:19 -05:00
alistair3149 58d85ff426 refactor(core): normalize PHP namespaces used in Citizen
Related: T303102
2022-05-26 16:58:14 -04:00
github-actions c2bde2e6ed ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-05-22 19:13:26 +00:00
alistair3149 97282a30ba
docs: address various phpcs warnings and errors 2022-05-22 15:12:05 -04:00
alistair3149 cb6795de0a
refactor(core): clean up inconsistent use of partial variables 2022-05-22 15:06:49 -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 8eaaecf957
feat: do not format body content if MobileFrontend is active (#409)
MobileFrontend formats body content to enable features such as collasible headers.
Citizen should not attempt to format it as it will break features in MF.
2022-04-27 15:58:16 -04:00
alistair3149 57ff42abcf
feat: do not call HtmlFormatter when the page is not collapsible (#384) 2021-05-13 09:44:34 -04:00
alistair3149 83c6735cda
bug: fix parsing raw html (#334)
Co-authored-by: Hannes Kruse <hannes@octofox.de>
2021-04-04 11:39:57 -04:00
Hannes 88912f71b3
refactor: Don't create sections if they are disabled 2021-03-26 08:00:14 +01:00
Hannes 82f220ec64
refactor: Convert html entitie
And only run collapse on content pages
2021-03-03 09:44:18 +01:00
H. C. Kruse 49f6916195
fix: collapsible section issues (#283)
* fix: DOMDocument parser warnings

* minor: Run phpcbf

* minor: Remove linter warnings

* bug: Fix section.js script name
2021-03-03 03:05:13 -05:00
github-actions fcd796d1e2 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2021-03-03 00:14:48 +00:00
alistair3149 669be20879
fix: fix error caused by PHP comments 2021-03-02 19:09:39 -05:00
alistair3149 af5565f490
feat: implement collapsible sections 2021-03-02 17:16:24 -05:00