Commit graph

490 commits

Author SHA1 Message Date
alistair3149 dea326423c
chore(ci): more robust linter
* Only run linter if there are changes
* Cancel previous running workflow
* Cache dependencies
2022-04-30 17:01:25 -04:00
alistair3149 e642364b6f
build: bump to 1.5.2 2022-04-23 18:44:42 -04:00
alistair3149 dc3cb203a3
fix: disable Parsoid extension module support
Seems like it is preventing VE to open by somehow breaking Parsoid (restbase error 500) in MW 1.35.5.
Disabling it for now.
2022-04-23 18:41:14 -04:00
alistair3149 5df6a0f772
feat: add link to documentation in VE context item
Also make the text label for tabbertransclude different so that it does not get mixed up with regular tabber
2022-04-22 22:22:44 -04:00
alistair3149 68d52b27a8
build: bump to 1.5.1 2022-04-22 20:01:42 -04:00
alistair3149 5a5e9eecaf
refactor: clean up Javascript according to ESLint 2022-04-22 20:00:32 -04:00
alistair3149 87c0a1b3f4
ci: re-enable Wikimedia ES5 Eslint config 2022-04-22 20:00:03 -04:00
alistair3149 853bbfed5c
refactor: remove unused comment 2022-04-22 19:59:20 -04:00
alistair3149 d0be57a629
feat: add basic VE support for tabbertransclude tag
* Add basic inspector tool for tabbertransclude
* Add custom icon for Tabber
* Fix an issue where Tabber VE dialog is triggered when selecting mapframe
2022-04-22 19:34:06 -04:00
alistair3149 5410a1496f
feat: add Tabber icon in VisualEditor 2022-04-22 16:31:21 -04:00
alistair3149 39d0bee0d4
build: bump to 1.5.0 2022-04-22 00:39:13 -04:00
alistair3149 84273da412
feat: generate tab header in visual edit mode 2022-04-22 00:38:16 -04:00
alistair3149 3454f7b2ce
feat: do not run Tabber script if it is already activated 2022-04-21 16:35:23 -04:00
alistair3149 2d86edc3c1
feat: highlight text inside tabber tags as wikitext in CodeMirror 2022-04-21 15:35:07 -04:00
alistair3149 6165b06f28
feat: add basic VisualEditor support for tabber tags
Adding some basic support for visual editing in VisualEditor. Currently it is nothing fancy, just the ability to recognize <tabber/> tags and a simple dialog with code editor to edit the Tabber code. It would be iterated upon in the future.
2022-04-21 15:14:52 -04:00
alistair3149 7d5776f03b
refactor: load module after rendering tab 2022-04-20 17:33:23 -04:00
alistair3149 b8309cd6e3
build: bump to 1.4.0
* Initial Parsoid support for the tabber tag
* Add background fade to indicate scrollable tab header on touch devices
* Some refactor and clean up
2022-04-20 17:22:56 -04:00
alistair3149 3220bb8ef4
feat: add initial Parsoid support for the tabber tag 2022-04-20 17:21:49 -04:00
alistair3149 558581c893
refactor: rename parserHook result variable 2022-04-20 15:32:19 -04:00
alistair3149 0b690a2744
refactor: standardize parserHook and render across parser tags 2022-04-20 15:23:45 -04:00
alistair3149 007f1942de
feat: use the new HookContainer system 2022-04-20 14:00:28 -04:00
github-actions 670df8051e ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-04-20 17:51:17 +00:00
alistair3149 1fc2451a12
refactor: separate parser tags into their own classes 2022-04-20 13:50:38 -04:00
github-actions 4a662d3f27 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-04-20 17:13:25 +00:00
alistair3149 cc663e76e8
refactor: separate hooks from the rest of TabberNeue class 2022-04-20 13:11:10 -04:00
alistair3149 466573741e refactor: clean up unused CSS
It also fixes the somewhat weird bug (#13) where you can not scroll when the cursor is inside the tab panel for some browsers.
2022-04-19 18:33:11 -04:00
alistair3149 750dd273be
feat: add background fade to indicate scrollable tab header 2022-04-19 16:34:04 -04:00
github-actions 094f82ed48 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-04-19 18:04:16 +00:00
alistair3149 51893d8b9d fix: add null check for $input 2022-04-19 14:03:25 -04:00
alistair3149 f3858fa198
build: bump to 1.3.2 2022-04-19 11:41:20 -04:00
alistair3149 9d0c70e4d6
docs: update usage documentation
* add transclusion under usage
* rewrite the old usage information
2022-04-19 11:40:11 -04:00
alistair3149 c045490a01
feat: tweak styles of tab header
* Tab header bottom line is now full width instead of the width of the tabs. It aligns with the previous and current Tabber behavior on Fandom wikis
* Increase padding for tab buttons for bigger click area
2022-04-19 10:53:08 -04:00
alistair3149 69c638330d
feat: use CSS instead of __NOEDITSECTION__ to hide edit buttons
* Appending __NOEDITSECTION__ to tab body seems to break the table markup (#12)
* Edit buttons still work for transcluded tabs so it should be visible

Closes #12
2022-04-19 10:36:38 -04:00
alistair3149 38a47307d7
feat: add HTTP status code to error message
Also use default MediaWiki message 'error' instead of self-defined one.
2022-04-19 10:24:49 -04:00
alistair3149 2cd680df50
build: bump to 1.3.1 2022-04-18 23:10:30 -04:00
alistair3149 7504ce5cd2
feat: add proper ARIA attributes to lazyloaded transclusions 2022-04-18 23:09:13 -04:00
alistair3149 893611e41d
feat: replace loading message with animation 2022-04-18 22:46:40 -04:00
ciencia d8c3db4e59 feat: allow tab content to be transclusions of other pages
* Initial merge of the TabberTransclude extension from Ciencia
* Tab content can now be fetched from other pages on the wiki. The content is lazy-loaded when the tab is selected through a XHR request.
* Add a config option to disable setting URL hash on tab change
2022-04-18 21:56:03 -04:00
alistair3149 91105aa338
refactor: use array style on adding modules to ParserOutput
String is deprecated since 1.38 (T296123)

Closes #11
2022-04-18 20:24:21 -04:00
alistair3149 4ef6221d6c
build: bump to 1.2.0
Also add Ciencia to the author list since many patches came from his fork
2022-04-18 20:02:28 -04:00
ciencia 1959fb2928
feat: use replaceState instead of pushState on tab click
This replaces the current history context instead of adding a new entry. The
previous behavior was undesired when you switch tabs and you want to go back
to the previous page.
2022-04-18 20:01:02 -04:00
ciencia 2d4d4121fd
feat: use the ResizeObserver api to detect content size changes
This catches every possible size change of the active tab panel contents:
* Window resize, will update also the offsetLeft property
* Inner size changes like a collapsible element being opened or closed
* And even tabber inside tabber, when the inner tabber is changed and they
  have different sizes

ResizeObserver may not be supported by some old browsers, but that shouldn't
be too bad for them. If something looks displaced they can simply switch
tabs to force a resize.
2022-04-18 19:59:38 -04:00
ciencia f1aee0bdf6
refactor: CSS.escape may not be supported by some browsers 2022-04-18 19:50:20 -04:00
ciencia 98c6f2753a
feat: trim spaces between title and content
Trim spaces between title and content to avoid unwanted <pre> wraps when using
content next to title separated by a space instead of a new line.
2022-04-18 19:43:08 -04:00
ciencia f9b3892604
refactor: NodeList.prototype.forEach may not be supported by some browsers 2022-04-18 19:34:43 -04:00
alistair3149 c46b918b04
refactor: lower JS requirements to ES5
* Improve compatibility with older browsers
* Preparation to merge changes from TabberTransclude
2022-04-18 19:10:58 -04:00
github-actions e47ee9b4d6 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-04-18 23:02:15 +00:00
alistair3149 8a7168556a
chore: re-generate package-lock.json 2022-04-18 18:59:55 -04:00
nobbyfix 3f689e0b28
feat: append __NOEDITSECTION__ to tabber body before parsing (#9) 2022-02-01 23:04:24 -05:00
nobbyfix 9395d641a9
fix: DOMException caused by invalid selector (#10)
* fix for DOMException caused by invalid selector

* use CSS.escape function
2022-02-01 23:04:05 -05:00