Commit graph

84 commits

Author SHA1 Message Date
github-actions e4dde4f603 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2024-11-22 21:03:20 +00:00
alistair3149 f553e95d0a
feat: add support for custom attributes
- Use MW core sanitizer to sanitize attributes to keep feature parity with core sanitizier
- Simplify HTML attribute handling

Closes: #194, #183
2024-11-22 16:02:46 -05:00
paladox 422c60a573
fix: optional parameter $args declared before required parameter $frame is implicitly treated as a required parameter" (#195)
* Fix "Optional parameter $args declared before required parameter $frame is implicitly treated as a required parameter"

> Deprecated: Optional parameter $args declared before required parameter $frame is implicitly treated as a required parameter in /srv/mediawiki/1.43/extensions/TabberNeue/includes/Tabber.php on line 78
> Deprecated: Optional parameter $args declared before required parameter $frame is implicitly treated as a required parameter in /srv/mediawiki/1.43/extensions/TabberNeue/includes/TabberTransclude.php on line 72

* Update TabberTransclude.php
2024-11-21 12:42:47 -05:00
alistair3149 eaa78dbba2
refactor: remove unused var 2024-11-20 13:32:59 -05:00
alistair3149 d5f9e03d47
feat: allow id and class attributes to be set on Tabber
Closes: #183, #193

Co-Authored-By: Thomas-programmiert <Thomas-programmiert@users.noreply.github.com>
2024-11-19 16:20:05 -05:00
github-actions 0e136945cc ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2024-11-19 21:05:00 +00:00
alistair3149 2f827857dc
feat: drop Codex tabs
It has never worked correctly and it is difficult to maintain
both MW compatability across versions and Codex
2024-11-19 16:04:26 -05:00
alistair3149 11eb2ac328
refactor: use Mustache to generate HTML 2024-11-19 16:01:11 -05:00
alistair3149 dc1d16c276
fix: properly wrap text in paragraph if it is a wikitext link
Seems to be related to #151
2024-11-19 14:35:19 -05:00
alistair3149 1f75afc217 fix: various issues found in code review 2024-11-16 03:19:11 -05:00
alistair3149 9e8ac878cc fix: fix various issues raised by code review 2024-11-16 03:19:11 -05:00
alistair3149 40fe7d2e52 docs: fix incorrect return type 2024-11-16 03:19:11 -05:00
alistair3149 724e347ca1 perf: only call one instance of MediaWikiServices 2024-11-16 03:19:11 -05:00
alistair3149 a98f2f7791 refactor: switch TabberTransclude to the new method 2024-11-16 03:19:11 -05:00
github-actions c67ac50f46 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2024-11-16 03:19:11 -05:00
alistair3149 ab8e306fc6 feat: throw exception when duplicated label is found under legacy ID mode 2024-11-16 03:19:11 -05:00
github-actions 6d3b905200 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2024-11-16 03:19:11 -05:00
alistair3149 e85d4785b1 refactor: convert part of HTML to Mustache 2024-11-16 03:19:11 -05:00
alistair3149 1e1d3de9cd feat: render all HTML server-side 2024-11-16 03:19:11 -05:00
alistair3149 de2ced5a36 feat: assign unique IDs to Tabber container 2024-11-16 03:19:11 -05:00
github-actions 2c306abf79 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2024-11-16 03:19:11 -05:00
alistair3149 f24ddb58ee feat: only add empty paragraph for wikitext list elements
We don't need the empty paragraph hack for non-list elements.
Related: #151
2024-11-16 03:19:11 -05:00
alistair3149 21ad702ee2
refactor: more function clean up 2024-11-15 00:07:11 -05:00
alistair3149 a6de7f9519
refactor: separate wikitext parsing to a different function 2024-11-14 23:27:54 -05:00
alistair3149 3bacdb7c87
fix: square brackets should be correctly rendered in tab names
Removing some of the legacy string replace code that is used to get around wikitext formatting.
It is not needed anymore.

Fixes: #158
2024-07-02 22:03:36 -04:00
alistair3149 7e92502c16
fix: escape new line character properly 2024-06-23 16:37:11 -04:00
alistair3149 f4f8b4bfce
fix: add new lines to parsed tab content to ensure content are parsed as expected
Fixes: #151
2024-06-23 16:30:52 -04:00
alistair3149 8d410dfb49
refactor: use init module instead of inline style for skeleton screen 2024-05-25 03:02:18 -04:00
alistair3149 bb110c6d98
feat: rewrite Javascript implementation
To ensure easier development and maintenance, IE support is dropped to allow
modern Javascript features. The old tabber module is rewritten into newer
standard and using classes to ensure proper scoping.
2024-05-25 00:33:22 -04:00
alistair3149 177c67681e
refactor: use data-mw- prefix for data attribute 2024-05-23 22:05:28 -04:00
alistair3149 c553eddb41
refactor: use stripOuterParagraph instead of str_replace 2024-04-24 15:18:17 -04:00
github-actions b0d52d6fd8 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2024-04-24 19:13:26 +00:00
alistair3149 7b1c319e24
feat: allow tab name to be parsed
This is an experimental config and can lead to performance issue and unexpected behavior.

Closes: #35
2024-04-24 15:13:08 -04:00
paladox a6c61af08d
fix: Argument #1 ($input) must be of type string, null given (#112) 2024-01-03 15:00:55 -05:00
paladox 9a795f2a74
fix: PHP Notice: Uninitialized string offset: 0 (#108) 2023-11-05 18:10:02 -05:00
H. C. Kruse 7f75899995
feat: add support for nested tabbers in Codex (#95)
* refactor: Apply some code cleanup

* feat: WIP dynamic nested tabber in codex

* feat: Make deeply nested tabbers work

* doc: fix comment position

---------

Co-authored-by: alistair3149 <alistair3149@users.noreply.github.com>
2023-07-11 22:06:57 -04:00
alistair3149 a3212b6c2b
feat: wrap tab content in <p> if there are no HTML elements 2023-07-05 23:07:57 -04:00
alistair3149 c06f0e7e74
refactor: rename TabberNeueEnableLegacyMode to TabberNeueUseCodex 2023-07-05 23:00:32 -04:00
github-actions 7a42d9f055 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-07-06 01:48:00 +00:00
alistair3149 8278e66548
refactor: update Parsoid implementation
Note that it is not enabled, still a WIP
2023-07-05 21:47:50 -04:00
alistair3149 cd63b6c10f
refactor: remove noscript message
Tabber already shows content without JS, and noscript handling is a bit tricky in MW
2023-07-05 18:32:18 -04:00
alistair3149 e3a82e603b
refactor: deprecate 2023-07-05 18:14:52 -04:00
alistair3149 0fbfefcb87
fix: avoid using noscript as it is disallowed by VE 2023-07-05 18:03:00 -04:00
alistair3149 89e90af034
feat: add experimental support of Codex
It can be enabled by setting `$wgTabberNeueEnableLegacyMode` to `true`.
It is the first implementation and a WIP with numerous caveats:
- Nested Tabber does not work
- Tabber Transclue does not work
2023-07-05 17:26:33 -04:00
github-actions b5329229c9 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-02-16 19:11:17 +00:00
alistair3149 874738db2a
feat: add langauge converter support
This should allow MW apply langauge conversion to tab title
2023-02-16 14:10:46 -05:00
alistair3149 365777eae3
feat: improve noscript support
1. Allow other tabs to be shown
2. Put noscript message in warning box
2023-02-16 14:02:04 -05:00
NekoCharm 18f278e1ad
fix: use data-title for tab panel (#74) 2022-12-05 00:26:49 -05:00
alistair3149 7b61ca663e
feat(core): use data-title instead of title attribute for tab panel
Title attribute produces a tooltip over the whole tab panel.
That is not ideal and the a11y need is already fulfilled by aria-label.
2022-11-02 19:55:46 -04:00
alistair3149 831eeee16c
refactor: use proper extension namespaces 2022-06-29 17:22:14 -04:00