Commit graph

26 commits

Author SHA1 Message Date
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
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 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
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
nobbyfix 5c40e1fb05
feat: update header buttons when scrolling without them (#7) 2022-01-31 01:35:36 -05: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 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 0dc1b34965
fix: stricter selectors for activePanel selection 2021-06-23 10:45:14 -04:00
alistair3149 342cc2aa85
fix: stricter selector to prevent issues with nested Tabber 2021-06-23 10:29:42 -04:00
alistair3149 2580c82d06
refactor: rename Tabber classes to be more semantic 2021-06-21 19:46:17 -04:00
alistair3149 c8aa336530
refactor: remove unnessecary quotation marks 2021-06-21 19:38:59 -04:00
alistair3149 46596e450f
feat: add aria-selected support 2021-06-21 19:32:15 -04:00
alistair3149 45fb952d2d
refactor: use documentFragment for buildTabs 2021-06-21 19:28:47 -04:00
alistair3149 4d79292616
refactor: drop all jQuery 2021-06-21 17:14:33 -04:00
alistair3149 31eb88ca52
refactor: convert HTML generation into ES6 2021-06-21 16:56:00 -04:00
alistair3149 8d980ce8ff
refactor: replace some jQuery with ES6 2021-06-21 15:22:35 -04:00
alistair3149 1ee66a0a94
refactor: lint scripts with ESLint 2021-06-21 14:54:31 -04:00
alistair3149 eb9564509b
feat: initial refactor into TabberNeue 2021-06-21 13:49:47 -04:00