feat: implement clean Foundry V13 compliant tab system
- Remove custom tab implementation in favor of official ApplicationV2 tabs - Implement ApplicationTab typedef structure for Actor and Item sheets - Add memory-safe event listener management with proper cleanup - Update all sheet templates to use standard Foundry tab structure - Add template safety checks to prevent undefined access errors - Optimize performance with DOM updates instead of full re-renders - Maintain backward CSS compatibility during transition - Add dynamic tab configuration based on item types Key improvements: - ~200 lines of custom tab code removed - Memory leak prevention with proper event cleanup - Performance optimization (no re-render on tab switch) - Standards-compliant with Foundry V13 ApplicationV2 API - Consistent implementation across Actor and Item sheets - Template safety with Handlebars guards - Dynamic icon and localization support All 31 modified files now use the official Foundry VTT v13 tab system.
This commit is contained in:
parent
2c4dbb2620
commit
40e14d1196
31 changed files with 653 additions and 379 deletions
|
@ -4,12 +4,14 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
.ds4-sheet-body {
|
||||
.ds4-sheet-body,
|
||||
.sheet-body {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
// Prevent double scrollbars on biography tab
|
||||
.ds4-sheet-tab.tab.biography.active {
|
||||
.ds4-sheet-tab.tab.biography.active,
|
||||
.tab[data-tab="biography"].active {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
.ds4-sheet-tab {
|
||||
.ds4-sheet-tab,
|
||||
.tab {
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
height: 100%;
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
@use "../../utils/variables";
|
||||
|
||||
.ds4-sheet-tab-nav {
|
||||
.ds4-sheet-tab-nav,
|
||||
nav.tabs {
|
||||
border-bottom: variables.$border-groove;
|
||||
border-top: variables.$border-groove;
|
||||
display: flex;
|
||||
|
@ -16,7 +17,8 @@
|
|||
line-height: calc(2 * var(--line-height-16));
|
||||
margin: variables.$margin-sm 0;
|
||||
|
||||
&__item {
|
||||
.ds4-sheet-tab-nav__item,
|
||||
.item {
|
||||
flex: 0 1 auto !important; // necessary to override the styling from lang-de, see https://gitlab.com/henry4k/foundryvtt-lang-de/-/issues/9
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue