Commit graph

472 commits

Author SHA1 Message Date
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
github-actions 0c2d4dcec1 ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
2022-01-31 06:36:24 +00:00
nobbyfix 5c40e1fb05
feat: update header buttons when scrolling without them (#7) 2022-01-31 01:35:36 -05:00
alistair3149 eba79272a9
build: bump to 1.1.0 2021-10-23 00:49:22 -04:00
alistair3149 199f4e88de
doc: remove config documentation 2021-10-23 00:49:00 -04:00
alistair3149 09715dcef6
feat: use Tabber count instead of MD5 as identifier 2021-10-23 00:47:49 -04:00
alistair3149 5e4471d23f
fix: incorrect character trimming for tab IDs 2021-10-23 00:29:38 -04:00
alistair3149 3358e2e49c
fix: incorrect config name in readme 2021-10-01 13:00:11 -04:00
alistair3149 dae448ab5a
refactor: change md5 config name to be more clear 2021-10-01 12:23:57 -04:00
alistair3149 d44cbbf6b9
feat: add config to disable MD5 hash (#6) 2021-10-01 12:20:00 -04:00
alistair3149 331b0bea2b
feat: use clone element to get tab height when needed
Sometimes the tab element is hidden by its parent and a cloned element will be able to get its actual height.
This should also fix #4.
2021-10-01 11:11:27 -04:00
alistair3149 022c9e07dd
build: bump to 1.0.2 2021-10-01 00:27:19 -04:00
alistair3149 66db3a4b8b
feat: use recursiveTagParseFully to parse tab input
This should also fix the HTML stripping issue from #3
2021-10-01 00:11:04 -04:00
alistair3149 0dc1b34965
fix: stricter selectors for activePanel selection 2021-06-23 10:45:14 -04:00
alistair3149 1d144a4194
build: bump to 1.0.1 2021-06-23 10:30:21 -04:00
alistair3149 342cc2aa85
fix: stricter selector to prevent issues with nested Tabber 2021-06-23 10:29:42 -04:00
Universal Omega 5e398c9129
refactor: clean up ParserFirstCallInit hook (#1) 2021-06-22 15:23:39 -04:00
alistair3149 726a4f9bc3
docs: reword note about Tabber replacement 2021-06-22 14:45:57 -04:00
alistair3149 530cdfa1b8
feat: add hover and active states to the arrow buttons 2021-06-21 20:37:28 -04:00