Commit Graph

177 Commits

Author SHA1 Message Date
Spicy_Marinara 7e9d98738f v3.2.0: Major update with JSON trackers, locking system, and UI improvements 2026-01-08 10:35:54 +01:00
Spicy_Marinara be05051a39 v3.1.1: Fix mobile tabs not initializing on mobile devices 2026-01-08 00:12:19 +01:00
Spicy_Marinara a3063aff4f v3.1.0: Add parser error detection and recommended models section 2026-01-07 22:56:26 +01:00
Spicy_Marinara c3cdac24c6 Release v3.0.0 - Major update with JSON format, lock/unlock trackers, reorganized UI, colored dialogues, editable prompts, and numerous bug fixes 2026-01-07 17:22:22 +01:00
Spicy_Marinara 8df6548e0b v2.1.3 - Improved thought bubble positioning and responsiveness
- Align thought bubbles with avatar top instead of center for better visibility
- Fix issue where bubbles extend above avatar when scrolling is limited
- Change thought circles to horizontal layout for cleaner visual flow
- Add responsive positioning that adapts to screen width changes
- Implement smart viewport detection to prevent cutoff at narrow widths
2026-01-03 11:40:07 +01:00
Spicy_Marinara 62ed7ffb18 v2.1: Add dynamic weather effects, clothing inventory, and bug fixes
Features:
- Add dynamic weather effects system (snow, rain, mist, sunshine, storm, wind, blizzard)
- Add separate Clothing tab in inventory system
- Weather effects auto-update based on Info Box weather field
- Combined effects for storm (rain+lightning) and blizzard (snow+wind)

Improvements:
- Settings migration system for automatic feature enablement
- Weather effects positioned behind chat interface (z-index: 1)
- Dynamic weather enabled by default for new users

Bug Fixes:
- Fix tab visibility issues (disabled tabs now properly hide)
- Fix theme-aware borders (remove hardcoded blue colors)
- Fix double scrollbar in Edit Trackers window
- Fix scroll position jumping when editing Present Characters
- Fix dynamic weather toggle hiding issue

Technical:
- Update inventory schema to v2.1 with clothing field
- Add automatic migration for existing v2 inventories
- Update parsers and prompts to handle clothing separately
- Add translations (EN/ZH-TW) for new features
2026-01-02 13:58:43 +01:00
Spicy_Marinara 3f58c7ceca Add holiday promotion, snowflakes effect, and Spotify music widget
- Added holiday promotion banner with 2026WITHMARINARA discount code
- Added dismiss functionality for promotion with persistent state
- Implemented snowflakes animation effect with toggle
- Added Spotify music widget above chat input
- Widget matches extension theme colors and positioning
- Added Display Options toggles to show/hide feature toggles
- Improved responsive design and mobile support
2025-12-30 20:56:43 +01:00
Spicy_Marinara 474e3ce963 Add customizable prompts editor and reorganize settings panel
- Reorganized settings: moved Auto-update, Narrator Mode, and Debug Mode to Advanced section
- Added Customize Prompts button with comprehensive prompts editor modal
- Implemented 7 customizable AI prompts: HTML, plot progression (random/natural), avatar generation, tracker instructions, tracker continuation, and combat narrative
- Added individual and bulk restore to defaults functionality
- Integrated custom prompts across generation modules (plotProgression, promptBuilder, encounterPrompts)
- Auto-update toggle now disabled when not in Separate generation mode
- Merged XML/Markdown tracker instructions into unified prompt
2025-12-29 14:41:12 +01:00
Spicy_Marinara 0b5bca56eb Fix display settings persistence and add responsive layout for plot buttons
- Fixed updateSectionVisibility() to use explicit .show()/.hide() instead of .toggle() to ensure proper element visibility on page reload
- Added responsive CSS for plot buttons to adjust to small screens and mobile devices
- Wrapped button text in spans to enable icon-only mode on very small screens (≤400px)
- Reduced button margins and added flexbox layout with wrapping for better mobile UX
2025-12-29 13:32:30 +01:00
Spicy_Marinara 3146f033df Fix clamp() to use rem/px for min/max values
- Replace clamp(Xvw, Yvw, Zvw) with clamp(Xrem, Yvw, Zrem)
- Prevents font sizes from scaling excessively on ultrawide monitors
- Now minimum and maximum values are fixed units while middle value remains responsive
- Fixes info box, stats, calendar, weather, and all other text elements
2025-12-28 23:38:41 +01:00
Spicy_Marinara ed421bee63 Fix font sizes for ultrawide monitors using clamp()
- Replace all vw-based font-size properties with clamp() to prevent excessively large text
- Set maximum font sizes to prevent issues on 3440x1440 and other ultrawide displays
- Maintain responsive behavior for normal and mobile screen sizes
- Fix gap properties using vw for better spacing consistency
2025-12-28 22:07:27 +01:00
Spicy_Marinara 3caa74fbf8 Combat encounters: Add pre-encounter config modal, targeting fixes, and tracker integration
- Add pre-encounter narrative configuration modal with combat/summary style settings
- Change POV fields to text inputs (default: narrator) for custom character names
- Fix targeting system for enemies with spaces in names (e.g., 'Gilded Thrall 1')
- Display character-specific sprites/avatars in targeting modal instead of generic emojis
- Add combat difficulty scaling guidance to prevent trivial god defeats or endless wolf battles
- Integrate tracker updates in combat summary generation (together mode)
- Update auto-save logs description to clarify file storage vs chat history
- Apply extension theming to Close Combat Window button
2025-12-27 16:06:06 +01:00
munimunigamer de11f6f7e2 llm generated image gen prompts 2025-12-25 21:13:19 -08:00
munimunigamer 7802479670 auto-image-generation 2025-12-25 19:59:25 -08:00
Spicy_Marinara 04bd314da2 Add chapter checkpoint UI improvements and separate Quests toggle
- Fix checkpoint button display with expandMessageActions setting
- Add body class observer to update buttons when setting toggles
- Add cleanupCheckpointUI function for extension disable
- Separate Quests from Inventory with independent toggle
- Add horizontal scrolling to Info Box dashboard
- Add divider between Inventory and Quests sections
2025-12-22 01:05:01 +01:00
Spicy_Marinara fe03cba802 feat: Add remove button for characters in Present Characters panel
- Add removeCharacter() function to delete characters from panel and saved data
- Remove character from both lastGeneratedData and committedTrackerData
- Add X button to character card header with hover effects
- Button removes character from display and prevents re-inclusion in next generation
- Updates are persisted to chat metadata
2025-12-19 18:01:05 +01:00
Spicy_Marinara ab7dfeaf8b feat: Add custom avatar upload for NPCs in Present Characters panel
- Add npcAvatars storage to extension settings for custom NPC images
- Implement getCharacterAvatar() to check custom avatars first
- Add uploadNpcAvatar() function with file validation (2MB max, images only)
- Make character avatars clickable with visual feedback
- Support left-click to upload and right-click to remove custom avatars
- Add camera icon overlay on hover with smooth animations
- Store avatars as base64 data URIs for persistence across sessions
2025-12-18 14:14:49 +01:00
Spicy_Marinara 3ded104218 Add chapter checkpoint feature
- New feature: bookmark messages to exclude earlier history from context
- Saves tokens by marking chapter start points in long chats
- Uses SillyTavern's /hide and /unhide slash commands
- Persists checkpoint across page reloads and generation events
- UI: bookmark icon in message menus with visual indicators
- Debounced restore function prevents concurrent executions
- Pre-generation checkpoint application ensures messages stay hidden
- Clean production-ready code with proper error handling
2025-12-18 01:59:14 +01:00
Spicy Marinara bfb63a34cd Revert "All the features" 2025-12-05 22:43:56 +01:00
Subarashimo 7e47dbfd7c chore: final cleanup 2025-12-05 18:10:21 +01:00
Subarashimo 271c69ec49 feat: remove character button 2025-12-04 21:04:56 +01:00
Subarashimo c24515db7e fix: several issues 2025-12-03 22:34:50 +01:00
Subarashimo 0f7fdfcef1 feat: json format, et al. 2025-12-03 14:55:30 +01:00
Spicy_Marinara 32c2543605 Respect showInventory toggle in prompt generation 2025-12-01 11:46:57 +01:00
Spicy_Marinara 0c5b55b190 Add character card info in separate mode with muted filtering and scrollable Past Events 2025-11-25 12:40:28 +01:00
Chanho Chung eef547b0fa fix: mobile layout of rpg-skills-section font size 2025-11-22 23:35:30 +09:00
Chanho Chung fed4e2d095 fix: mobile layout of rpg-skills-section and rpg-classic-stat 2025-11-22 23:27:45 +09:00
Chanho Chung 02f080cc98 fix: mobile layout of rpg-mobile-tabs, rpg-info-content, rpg-character-card 2025-11-22 23:09:54 +09:00
Chanho Chung 00265ba905 fix: mobile layout of rpg-info-box 2025-11-22 11:14:14 +09:00
Spicy Marinara fd9adce068 Revert "feat: v2 widget dashboard system" 2025-11-06 20:06:26 +01:00
Spicy Marinara 71727c0a50 Revert "feat: responsive dashboard layout" 2025-11-06 20:05:33 +01:00
Paperboy 705396a426 Merge branch 'main' into feat/responsive-dashboard-layout 2025-11-07 00:26:23 +11:00
Lucas 'Paperboy' Rose-Winters 8981a841fb fix: add missing styling for RPG attribute inputs
- Add .rpg-attr-name styling to match .rpg-stat-name
- Use SmartTheme colors instead of default white background
- Add focus state with highlight border
- Include .rpg-attr-toggle and .rpg-attr-remove in selectors

Fixes white background on RPG attribute text inputs (STR, DEX, etc.)
in the Tracker Editor modal.
2025-11-07 00:15:16 +11:00
Lucas 'Paperboy' Rose-Winters 643acb8142 fix: preserve Skills section in parser and improve button visibility
- Fix stripBrackets() removing Skills section header
  - Add structural header whitelist (Skills, Status, Inventory, etc.)
  - Implement smart look-ahead to detect content below labels
  - Previous logic incorrectly removed 'Skills:' when followed by category labels
- Add proper theming to category action buttons (.rpg-category-action)
  - Match styling of view toggle buttons
  - Use SmartTheme colors for better visibility
- Fix RPG attributes styling in Tracker Editor
  - Change background from --rpg-accent to --SmartThemeBlurTintColor
  - Update border to match other themed inputs

Resolves issue where skills with categories were all showing as 'Uncategorized'
due to the Skills section being truncated during parsing.
2025-11-07 00:13:34 +11:00
Lucas 'Paperboy' Rose-Winters aa0dd55fb1 feat: add disabled state UI for Recent Events widget
Show helpful message when Recent Events tracking is disabled in tracker config.

Changes:
- Check if recentEvents is enabled in trackerConfig before rendering
- If disabled, show dimmed widget with overlay message:
  - Info icon + explanation text
  - "Enable in Tracker Settings" button
  - Button opens Tracker Settings and switches to Info Box tab

UX Improvements:
- Widget opacity reduced to 0.6 to indicate disabled state
- Message centered with clear visual hierarchy
- Button has hover/active states with elevation feedback
- Clicking button directly navigates to the right settings location

Technical Implementation:
- attachDisabledStateHandlers() opens Tracker Settings modal
- Auto-switches to Info Box tab after 100ms delay
- Graceful fallback if button not found (console warning)

CSS Additions:
- .rpg-widget-disabled: Dimmed overlay state
- .rpg-widget-disabled-message: Centered message container
- .rpg-widget-enable-btn: Styled action button with hover effects

Benefits:
- Users immediately understand why Recent Events isn't updating
- One-click access to fix the issue
- Clear visual feedback about widget state
- Pattern can be reused for other widgets (Skills, etc.)

Next Steps:
- Apply this pattern to other widgets that depend on tracker config
- Consider adding similar disabled states for Skills, Stats, etc.

Related: Recent Events widget implementation, tracker config system
2025-11-06 22:29:53 +11:00
Lucas 'Paperboy' Rose-Winters a9d98a3076 feat: implement Skills widget with level progression and categories
Add comprehensive Skills widget to dashboard system with category organization,
XP tracking, level progression, and multiple view modes.

Widget Features:
- Three sub-tabs: All Skills, By Category, Quick View
- Level-up and level-down buttons for manual progression
- XP progress bars with visual feedback
- Search and filter functionality
- Category collapse/expand in By Category view
- Editable skill names and categories
- Delete skills and categories
- Add new skills and categories
- Configurable max level and XP display

UI Improvements:
- Scrollable content area for large skill lists
- Responsive card layout
- Shortened tab labels for compact display ("All", "Quick" vs "All Skills", "Quick View")
- Proper flex layout for skill names (no longer truncated)
- Level badges and action buttons

Technical Implementation:
- Event handler deduplication to prevent exponential level-up bug
- Flag-based handler attachment: container.dataset.handlersAttached
- Nested flex containers for proper space distribution
- Scrollable views wrapper matching Inventory/Quests pattern

Dashboard Integration:
- Added Skills tab to defaultLayout.js (tab 5)
  - Icon: fa-solid fa-book (fixed invalid fa-book-sparkles)
  - Dimensions: 3x7 grid cells
  - Default config: All Skills tab, show XP, show categories
- Auto-arrange support in dashboardManager.js
  - Skills category group with priority order 6
  - Auto-creates Skills tab when skills widgets detected
- Widget registration in dashboardIntegration.js

Widget Files:
- src/systems/dashboard/widgets/userSkillsWidget.js (new)
  - Full widget implementation with all sub-tabs and features
  - State management with Map-based storage
  - Category-based and flat views
  - Search/filter/sort functionality

Styling:
- style.css: Added skills widget styles
  - Skill cards, headers, action buttons
  - Level-down button with accent color
  - XP progress bars
  - Category sections

Fixes from iteration:
1. Invalid FontAwesome icon (fa-book-sparkles → fa-book)
2. Tab labels too wide (shortened to single words)
3. Skill names truncated (fixed with proper flex structure)
4. Widget height incorrect (adjusted to h:7)
5. Level-up exponential bug (duplicate handlers, added flag guard)
6. No level-down button (added with minimum level 1)
7. No scrollbar on long lists (added .rpg-skills-views wrapper)

Category: skills
Integration: Fully integrated with dashboard v2.0 system
Tested: Layout, interactions, scrolling, level progression

Refs: AI tracker integration (separate commit)
2025-11-06 22:08:48 +11:00
Spicy_Marinara ad4b4feee5 Fix: Add missing CSS for RPG Attributes and Relationship Status delete buttons 2025-11-06 11:13:25 +01:00
Lucas 'Paperboy' Rose-Winters 3cda7f7f52 fix: move level indicator to top-right in compact userInfo layout
Resolves overlap issue between long character names and level indicator
in 1x2 userInfo widgets. Level now displays at top-right corner flush
with container, while name remains at bottom with full width available.

- Changed level container position from bottom: 0 to top: 0
- Prevents text overlap for names like 'Seol Yi-hwan Lvl 1'
- Maintains clean, compact layout at 1080p and other resolutions
2025-11-06 21:03:29 +11:00
Lucas 'Paperboy' Rose-Winters 8dc07a938a feat: implement responsive dashboard layout with column-aware widget sizing
**Status Tab Layout Changes:**
- User Info widget: 1x2 vertical (left column) instead of 2x1 horizontal
- User Stats widget: scales from 1x3 (narrow) to 2x3 (wide)
- User Mood widget: 1x1 positioned below User Info
- User Attributes widget: scales from 2x4 (narrow) to 3x4 (wide), full width

**Technical Changes:**
- Update widget definitions to use column-aware defaultSize() functions
- userInfoWidget: Returns 1x2 for desktop, 1x1 for mobile
- userStatsWidget: Returns 1x3 for 2 cols, 2x3 for 3+ cols
- userAttributesWidget: Returns 2x4 for 2 cols, 3x4 for 3+ cols
- Remove autoLayout from resetLayout() to preserve default positions
- Add resetWidgetSizesToDefault() to apply column-aware sizes
- Update CSS for 1x1 compact avatar (round) and 1x2 wide avatar layouts

**User Info Widget Improvements:**
- 1x2 layout: Horizontal split with name left, level right over avatar
- 1x1 layout: Round avatar with bottom nameplate (flush positioning)
- Transparent glass-style backgrounds for better avatar visibility
- Proper aspect-ratio for circular avatar in compact mode

**Result:**
- Widgets scale intelligently based on panel width (2-4 columns)
- Desktop users get larger, more spacious layouts
- Mobile/narrow screens get efficient vertical stacking
- Reset Layout respects custom positions while applying responsive sizes
- Window resize triggers autoLayout via ResizeObserver for reflow
2025-11-06 20:42:57 +11:00
Spicy_Marinara ce811018b3 Mobile improvements: Increase character stats text size and reduce Recent Events height
- Increase character name, traits, and emoji sizes for better mobile readability
- Limit Recent Events section to 150px max height on mobile
- Make events widget scrollable to save screen space
- Reduce padding and gaps for more compact layout
2025-11-06 10:08:12 +01:00
Spicy Marinara 3e75d03af6 Merge pull request #36 from paperboygold/feat/v2-widget-dashboard-system
feat: v2 widget dashboard system
2025-11-06 10:06:30 +01:00
Lucas 'Paperboy' Rose-Winters 2ed7133566 feat: redesign user info widget with avatar background overlay
Changed from avatar + text layout to avatar as background with text overlay.

Previous approach: Tried horizontal/vertical layouts which caused either
horizontal or vertical scrollbars at narrow widths (w:1 h:1).

New approach: Avatar fills entire widget as background-image, name + level
display as centered overlay with semi-transparent backdrop and blur effect
for readability. Uses background-size: contain to show full avatar without
cropping.

Benefits:
- No layout conflicts - works at any widget size
- No scrollbars (horizontal or vertical)
- Full avatar visible without cropping
- Visually interesting design
- Simpler code (no layout switching logic)

Changes:
- userInfoWidget.js: Avatar set as background-image with contain sizing
- userInfoWidget.js: Simplified onResize (removed layout switching)
- style.css: Container uses background-image with gradient overlay
- style.css: Text container has backdrop-filter blur + dark background
- style.css: Simplified compact mode (no portrait/layout-specific rules)
2025-11-05 12:49:55 +11:00
Lucas 'Paperboy' Rose-Winters babd2af345 feat: add compact mode to user info widget for better vertical scaling
Applied compact mode pattern to user info widget (avatar, name, level) to
improve vertical fit at narrow widths (< 3 grid units).

Changes:

1. style.css (lines 2040-2072):
   Added .rpg-user-info-compact class with size reductions:
   - Container padding: 0.5rem → 0.3rem (40% reduction)
   - Container gap: 0.75rem → 0.4rem / 0.5rem → 0.3rem (47%/40% reduction)
   - Avatar size: 2.5-3rem → 2rem (20-33% reduction)
   - Avatar border: 2px → 1.5px (thinner)
   - Avatar shadow: 0 0 8px → 0 0 4px (subtler)
   - Text gap: 0.2rem → 0.15rem (25% reduction)
   - User name font: 0.9rem → 0.75rem (17% reduction)
   - Level label font: 0.75rem → 0.65rem (13% reduction)
   - Level value font: 0.85rem → 0.75rem (12% reduction)
   - Level padding: 0.15/0.4rem → 0.1/0.3rem (25-33% reduction)

2. userInfoWidget.js (lines 156-161):
   - Added compact class logic: if (newW < 3) → add class
   - Removed inline avatar sizing (CSS handles via compact class)
   - Preserved existing vertical/horizontal layout switching

Result: ~30-35% vertical space reduction at narrow widths while maintaining
horizontal scaling. Matches compact mode pattern from scene info, inventory,
and quests widgets.

Fixes: User info widget poor vertical scaling at narrow widths
2025-11-05 10:47:58 +11:00
Lucas 'Paperboy' Rose-Winters e055c6d112 fix: apply mobile sizing to scene info widget at narrow desktop widths
Fixed text clipping in date display by applying mobile's proven size reductions
to narrow desktop widgets (< 3 grid units wide).

Root Cause:
- At narrow widths (~296px, 2 columns), date text wraps: "3rd Day of the Ninth Month" + "Tuesday"
- Top 1/4 of first line was clipped (top of "3" and "D" cut off)
- Mobile displays work perfectly at even smaller widths

Solution - Mirror Mobile Sizing:
Mobile uses smaller dimensions that prevent clipping:
- Padding: 0.3125rem (vs 0.375rem desktop)
- Gap: 0.3125rem (vs 0.375rem desktop)
- Font size: 0.8125rem (vs 0.875rem desktop)
- Label font: 0.625rem (vs 0.6875rem desktop)

Changes:

1. style.css (lines 2782-2812):
   - Added .rpg-scene-info-compact class with mobile-like sizing
   - Reduces padding, gaps, and font sizes
   - Applied when widget width < 3 grid units

2. sceneInfoWidget.js (lines 367-385):
   - Added onResize handler
   - Applies .rpg-scene-info-compact at newW < 3
   - Removes class at newW >= 3
   - Matches pattern used for inventory/quests compact modes

Result: Date text displays without clipping at narrow widths, exactly as mobile does.

Fixes: Text clipping in scene info date display at 2-column layout (~296px)
2025-11-05 10:27:42 +11:00
Lucas 'Paperboy' Rose-Winters 13b1acb151 fix: center icons in compact buttons with fixed dimensions and flexbox
Properly centered icons by wrapping text in spans and forcing exact button
dimensions to override base min-width: fit-content style.

Root Cause:
- Base .rpg-inventory-add-btn has min-width: fit-content
- Even with span hidden, button width wasn't constrained
- Icon appeared off-center with extra space to the right

Solution:

1. HTML Structure (inventoryWidget.js, questsWidget.js):
   - Wrapped text in <span class="rpg-btn-label">
   - Pattern: <i class="fa-solid fa-plus"></i><span class="rpg-btn-label"> Add Item</span>
   - Applied to: Add Item, Add Location, Add Asset, Add Quest buttons

2. CSS (style.css):
   - Hide labels: .rpg-inventory-compact .rpg-btn-label { display: none; }
   - Force square dimensions: width: 32px !important (overrides fit-content)
   - Center icon: display: inline-flex; justify-content: center; align-items: center
   - Remove padding: padding: 0 (icon uses full 32px space)

Result: Perfect 32×32px square buttons with centered icons in compact mode,
matching the pattern used for sub-tab buttons throughout the codebase.

Fixes: Icon skewed left in Add Item/Quest buttons at narrow widths
2025-11-05 10:16:21 +11:00
Lucas 'Paperboy' Rose-Winters 55f4e0aee6 fix: apply widget responsive classes on tab switch
Fixed issue where compact mode styling was lost when switching tabs.
Widgets now consistently show icon-only buttons and truncated headers
at narrow widths, regardless of how they were rendered.

Root Cause:
- onTabChange() rendered widgets but never called onResize handlers
- Compact classes (.rpg-inventory-compact, .rpg-quests-compact) only applied:
  * After auto-arrange (explicit onResize calls)
  * During window resize (ResizeObserver triggers)
- Tab switches rendered widgets fresh WITHOUT compact classes
- Result: Buttons/headers overflowed after tab switch at narrow widths

Changes:

1. dashboardManager.js onTabChange() (lines 1224-1233):
   - Added onResize handler calls after rendering tab widgets
   - Iterates this.widgets Map (currently rendered widgets)
   - Calls definition.onResize(element, w, h) for each widget
   - Applies responsive styling based on widget dimensions

2. questsWidget.js onResize() (lines 463-468):
   - Added .rpg-quests-compact class application at < 3 grid units
   - Toggles between wide/compact modes based on width

3. style.css compact mode styling:
   - Inventory: icon-only buttons (font-size: 0), truncated headers
   - Quests: icon-only buttons (font-size: 0), truncated headers
   - Headers max-width: 140px (inventory), 120px (quests)
   - Buttons: 32×32px icon-only with restored icon size

Flow Now:
1. Window resize → onResize called → compact classes applied ✓
2. Auto-arrange → onResize called → compact classes applied ✓
3. Tab switch → onResize called → compact classes applied ✓ (NEW)

All three paths now apply responsive styling consistently.

Fixes: "Add Item" button cut-off and header overflow after auto-arrange
or tab switching at narrow widths (~296px, 2 columns)
2025-11-05 09:59:33 +11:00
Lucas 'Paperboy' Rose-Winters a7ed100780 fix: improve inventory and quests widget resizing at narrow widths
Resolved issues where inventory and quests widgets didn't properly adapt
to narrow desktop widths (~296px, 2 columns):
- Assets tab was cut off (1/3 off-screen)
- Widgets shrank vertically instead of expanding
- Sub-tabs overflowed horizontally

Changes:

1. Widget onResize Handlers (inventoryWidget.js, questsWidget.js):
   - Strengthened inventory onResize to call render() for full re-layout
   - Added quests onResize handler with re-render + width-aware styling
   - Both apply responsive CSS classes at narrow widths

2. Increased maxAutoSize for 2-Column Layouts:
   - inventoryWidget.js: h: 6 → h: 8 (creates expansion headroom)
   - questsWidget.js: h: 5 → h: 7 (user requested height)
   - Previously: defaultSize = maxAutoSize → zero expansion possible
   - Now: defaultSize < maxAutoSize → widgets can expand vertically

3. Added Missing Quests Widget Container Styles (style.css):
   - Added .rpg-quests-widget and .rpg-quests-views flex container styles
   - Proper overflow handling (hidden on container, auto on content)
   - Prevents Assets tab horizontal cut-off

4. Implemented Compact Mode CSS (style.css):
   - .rpg-inventory-compact: reduced padding, icon-only sub-tabs
   - Applied when widget width < 6 grid units
   - Prevents 3 sub-tabs from overflowing 296px container
   - Icons remain visible, labels hidden for space savings

5. Grid Engine Boolean Return (gridEngine.js):
   - setContainerWidth now returns true/false for column changes
   - Allows DashboardManager to optimize resize handling

Why This Works:
- Auto-layout expansion requires defaultSize < maxAutoSize for headroom
- Flex container styles prevent overflow with proper scroll handling
- Compact mode makes sub-tabs fit within narrow containers
- onResize handlers ensure internal layouts adapt to dimension changes

Fixes: Assets tab cut-off, vertical shrinking, sub-tab overflow at ~296px
2025-11-05 09:47:56 +11:00
Lucas 'Paperboy' Rose-Winters 3873eb82b1 fix: Use theme system CSS variables for modal/menu backgrounds
How theming actually works:
- Themes set CSS variables on .rpg-panel[data-theme="..."]
  (--rpg-bg, --rpg-accent, --rpg-text, --rpg-highlight, --rpg-border)
- Elements inside .rpg-panel inherit these solid-color variables
- Base .rpg-modal-content already uses var(--rpg-accent) gradient

Solution:
1. Copy data-theme attribute from panel to modals/menus
2. Define theme variables for .rpg-modal-content[data-theme]
3. Variables automatically apply to gradient background

Now modals/menus inherit theme styling through CSS variables:
- Sci-fi: --rpg-bg: #0a0e27, --rpg-accent: #1a1f3a
- Fantasy: --rpg-bg: #2b1810, --rpg-accent: #3d2414
- Cyberpunk: --rpg-bg: #000000, --rpg-accent: #0d0d0d
- Custom themes: Just work through variable system

Changes:
- style.css: Add variable definitions for themed .rpg-modal-content
- promptDialog.js: Copy data-theme from panel
- tabContextMenu.js: Copy data-theme (menu + icon picker)
2025-11-04 14:33:59 +11:00
Lucas 'Paperboy' Rose-Winters bedfbc77d5 fix: Use solid RGB colors for modal and menu backgrounds
Problem: CSS variables --rpg-bg and --rpg-accent have 0.9 opacity,
making all modals and menus transparent even with gradient backgrounds.

Solution: Use solid RGB colors directly in gradients:
- rgba(22, 33, 62, 1) instead of var(--rpg-accent)
- rgba(26, 26, 46, 1) instead of var(--rpg-bg)

Changes:
- style.css: .rpg-modal-content uses solid gradient
- tabContextMenu.js: Context menu uses solid gradient
- Both maintain inset shadow for depth
- Mobile long-press support included

Now modals and context menus have opaque backgrounds matching
widget styling instead of see-through transparency.
2025-11-04 14:24:31 +11:00
Lucas 'Paperboy' Rose-Winters 3117cd2598 fix(dashboard): enable smart grid layout by passing widget dimensions and removing CSS overrides
Previous commit (cd3acba) added smart column calculation but it didn't work because:
1. config._width was undefined (dashboardManager didn't pass it)
2. CSS rules with higher specificity forced 2 columns everywhere

This commit fixes BOTH issues so the 3×3 grid for 9 attributes actually works.

Changes:

1. Pass widget dimensions in dashboardManager.js (line 765):
   - Changed: definition.render(element, widget.config || {})
   - To: definition.render(element, {...widget.config, _width: widget.w, _height: widget.h})
   - Why: Widget dimensions (w, h) are in widget object, not widget.config
   - Result: Smart column calculation now receives actual widget width!

2. Remove desktop CSS override (style.css, line 1914):
   - Removed: grid-template-columns: repeat(2, 1fr);
   - Kept: gap styling
   - Why: This rule had specificity that overrode inline styles
   - Result: Widget's inline style now applies on desktop

3. Scope mobile media query to legacy panel (style.css, line 6600):
   - Changed: .rpg-classic-stats-grid { ... !important }
   - To: .rpg-panel .rpg-classic-stats-grid { ... !important }
   - Why: !important was forcing 2 columns on ALL mobile screens
   - Result: Dashboard widgets control their own layout on mobile

4. Scope narrow screen media query to legacy panel (style.css, line 6860):
   - Changed: .rpg-classic-stats-grid { ... !important }
   - To: .rpg-panel .rpg-classic-stats-grid { ... !important }
   - Why: Same as mobile - prevent override of dashboard widgets
   - Result: Dashboard widgets work on all screen sizes

Expected Behavior After Fix:
- 9 attributes → widget requests w=3 → gets 3 columns → perfect 3×3 grid! 
- 6 attributes → widget requests w=2 → gets 2 columns → 3×2 grid 
- Widget resize → onResize() updates columns → responsive 
- Mobile/tablet → dashboard widgets control layout → legacy panel unaffected 

Related: commit cd3acba (added smart grid logic that now works)
Related: User feedback - World of Darkness 9 attributes needed 3×3 grid
2025-11-04 10:54:28 +11:00