Conversation
- Updated Storybook guidelines with detailed structure and widget story requirements. - Refactored StorybookApplication to utilize a centralized registry for story management. - Introduced new story modules for basic, fullscreen, and mobile engine stories. - Enhanced the StoryRegistryService to create instances of story widgets dynamically. - Added new story templates for better UI representation of engine stories.
- Added detailed architecture overview and widget implementation guidelines to Storybook documentation. - Refactored StorybookApplication to improve story registration and error handling. - Introduced StoryRow type for better management of story widgets in the sidebar. - Enhanced StoryRegistryService to validate and filter story modules during registration. - Updated EngineStoryWidget to improve signal handling and error management. - Implemented new control types and improved UI control creation for story properties.
- Modified globs in app-architecture.mdc and typescript-best-practices.mdc to remove .tsx files. - Added a description to blueprint-templates.mdc for clarity. - Adjusted globs in excalibur-packages.mdc for consistency. - Updated general-guidelines.mdc to enable alwaysApply and removed description. - Refined globs in package-management.mdc for better matching. - Ensured proper formatting in gjs-packages.mdc and gobject-patterns.mdc by adding spaces and descriptions.
…-tiled - Updated dependencies in yarn.lock, including new versions for @babel packages and added @adobe/css-tools. - Updated submodule references for excalibur and excalibur-tiled to latest commits.
…cripts - Removed Basic, Fullscreen, and Mobile engine story widgets, consolidating functionality into a single EngineStoryWidget. - Updated build script in package.json to reflect the new engine.story.blp file. - Added new engine.story.blp file to define the EngineStoryWidget layout and controls.
- Add @gjsify/vite-plugin-blueprint to maker-gjs, storybook-gjs, and engine-gjs - Remove manual blueprint-compiler npm scripts and build:blueprints steps - Update all widget imports from .ui?raw to .blp files - Add TypeScript declarations for .blp modules - Simplify build process by leveraging Vite's blueprint plugin - Update git commit best practices documentation
- Add SpriteResource class with image data and dimension properties - Add SpriteSheetResource class for managing collections of sprites - Export new resources from data-gjs package index - Migrated from maker-gjs to enable cross-package reuse
- Add package.json with GTK4/Adwaita dependencies - Configure TypeScript with Blueprint template support - Add environment declarations for .blp file imports - Set up package structure for widget exports - Enables sharing UI components between maker and storybook apps
- Add SpriteWidget for individual sprite rendering with scaling - Add SpriteSheetWidget for grid-based sprite collection display - Include Blueprint templates for declarative UI definitions - Support sprite selection with event handling - Migrated from maker-gjs for cross-app reusability
- Update sprite widget imports to use @pixelrpg/ui-gjs - Update sprite resource imports to use @pixelrpg/data-gjs - Remove migrated widget exports from index - Maintain existing functionality with new package structure
- Remove sprite object files (migrated to @pixelrpg/data-gjs) - Remove sprite widget files (migrated to @pixelrpg/ui-gjs) - Clean up obsolete Blueprint templates - Completes migration to reusable package structure
- Document sprite widget components with usage examples - Explain package architecture and design principles - Include development and integration guidelines - Add file structure overview and contributing guide - Provide clear API documentation for reusable components
- Add @pixelrpg/ui-gjs dependency to maker-gjs app - Move gobject-2.0 to devDependencies in data-gjs package - Update yarn.lock with new package relationships - Maintain proper dependency separation between packages
- Remove unnecessary type casting in ImageResource - Clean up TODO comments that are no longer needed - Remove unused code in story widget - Improve type safety in GObject property definitions
- Update template import syntax documentation - Clarify usage of vite plugin for blueprint resolution - Reflect current implementation patterns in guidelines
- Remove all GdkPixbuf dependencies from resource classes - Eliminate pixbuf-based scaling in favor of widget-level scaling - Convert ImageResource to pure texture loading and storage - Update SpriteResource to texture-only constructor - Modernize SpriteSetResource with direct texture loading - Add @girs/gdk-4.0 dependency for texture support - Improve performance with GPU-optimized texture handling
- Add scale property to SpriteWidget with 0.1-10.0 range - Implement widget-level scaling via Gtk.Picture properties - Replace pixbuf scaling with clean GPU-accelerated scaling - Configure Picture widget for optimal aspect ratio handling - Update sprite sheet widget to use public sprite property - Remove Blueprint template redundant properties
- Create SpriteMockData class with pure GdkMemoryTexture architecture - Support multiple patterns: solid, checkerboard, stripes, gradient, border - Implement direct texture creation from raw pixel data - Add configurable colors and sizes for testing scenarios - Use GdkMemoryTexture.new() for optimal GPU performance - Eliminate all pixbuf intermediate steps in mock generation
- Create comprehensive SpriteWidgetStory for storybook - Add interactive controls for width, height, pattern, and colors - Support all mock data patterns with real-time preview - Include informational display of sprite dimensions - Use Blueprint template for clean UI layout - Integrate with SpriteMockData for dynamic sprite generation
- Create stories module exporting UIStories collection - Export stories from main package index - Add story exports to sprite widget index - Add story-gjs dependency for storybook integration - Enable storybook integration for UI component showcase
…nel story - Remove tilesetCount and defaultPage controls completely - Display all loaded tilesets by default without configuration options - Simplify story to focus on showcasing the panel functionality - Remove related logic for dynamic control handling - Update info label to show essential panel information only
- Remove unused SpriteSheetWidget import from MapEditorPanel story - Simplify the MapEditorPanel story by eliminating unnecessary controls - Focus on showcasing the panel functionality without dynamic control handling - Update story to display all loaded tilesets by default - Maintain clarity and relevance in the story presentation
- Remove generic 'message-received' signal from Engine class - Add specific signals using EngineEventType enum values: - STATUS_CHANGED: emits EngineStatus - PROJECT_LOADED: emits projectId string - MAP_LOADED: emits mapId string - ERROR: emits message string and optional Error object - Update all signal connections to use enum-based signal names - Update ProjectView and EngineStoryWidget to use new typed signals - Improve type safety and eliminate magic strings in signal handling
…on guide - Remove outdated migration-guide.md referencing non-existent EngineView class - Add comprehensive getting-started.md with current API examples: - Basic usage with enum-based signals - Complete GTK application example - Blueprint template integration - Advanced configuration and error handling - Best practices and troubleshooting - Update README.md to reference new getting-started guide - Replace generic examples with typed signal usage throughout
- Add abstract GameProjectResource in data-core with common interface - Refactor GJS and Excalibur implementations to extend base class - Extract loadGameProjectData, loadSpriteSets, and loadMaps methods - Align method signatures between platform implementations - Add proper resource exports to data-core index - Fix engine-excalibur mapData access pattern Both implementations now share consistent interface while maintaining platform-specific functionality for GNOME and web environments.
Include src/resource in barrelsby build script to automatically generate exports for the new GameProjectResource base class.
…ify API - Add abstract SpriteSetResource base class with common interface - Update GameProjectResource to return SpriteSetResource instead of data - Unify getSpriteSet method across platforms - Export new SpriteSetResource from barrel files
- Extend SpriteSetResource base class instead of Loadable - Add super() call to constructor - Fix imports to use explicit SpriteSetData type import - Maintain existing getSpriteSet method signature
- Extend SpriteSetResource base class instead of Loadable - Add path getter and getSprite method to match interface - Simplify getSpriteSet to return resource instead of data - Remove unused SpriteSetData imports - Apply consistent code formatting
…oading - Add GameProjectResource integration to ProjectView - Implement project and map loading event handlers - Load sprite sets and pass data to sidebar - Simplify sidebar API to accept map data and sprite sheets - Remove deprecated tileset and layers setter methods
- Add initializeMapData method to replace separate setter methods - Accept MapData and SpriteSheet array directly - Update story to use new initialization method - Maintain backward compatibility during transition
…ution - Add loadProject() method to ProjectView for parallel GameProjectResource loading - Update ApplicationWindow to load engine and ProjectView simultaneously using Promise.all() - Replace broken projectId-based path resolution with direct path usage - Improve error handling with proper project ID mismatch validation - Enhance user feedback with loading success/failure toasts - Apply consistent formatting to data-core barrel exports Resolves issue where projects failed to load due to incorrect path derivation from projectId, improving loading performance through parallel execution.
- Fix LayerSelector setLayers method to properly handle ScrolledWindow content replacement - Add layers_scrolled_window as InternalChild in Blueprint template for direct access - Simplify layer widget replacement logic using Blueprint best practices - Enhance layer display with visibility icons and improved layout - Remove complex parent-chain traversal in favor of clean template-based approach Resolves issue where layers were not displaying due to incorrect ScrolledWindow content handling. Layers now properly show in both maker-gjs and storybook-gjs apps.
…ctoring - Reorganize CSS structure to centralized ui-gjs package with proper imports - Fix CSS selectors to match new SpriteWidget (Adw.Bin) hierarchy in FlowBoxChild - Add CSS variables (_variables.css) for consistent theming across applications - Update CSS import chain: apps → ui-gjs/index.css → sprite components - Remove duplicate sprite-sheet.widget.css from maker-gjs (now centralized) - Add package.json exports for CSS files to enable proper module resolution Resolves issue where sprite selection highlights were not appearing due to CSS selectors targeting the wrong DOM hierarchy after SpriteWidget refactoring. Selection and hover states now work correctly in both maker-gjs and storybook-gjs.
…lectors - Remove unnecessary spacing and margins in layer-selector and tileset-selector templates for a cleaner UI - Update sprite-sheet widget to align with new layout standards by eliminating margins - Adjust sprite scale property in tileset-selector for improved default behavior These changes enhance the overall visual consistency and usability of the map editor components.
…afety - Create EngineCommandEventDataMap interface with typed command data mapping - Add EngineCommand interface and EngineCommandHandler type for consistency - Export new types from engine-core package index - Update engine-excalibur to import and use EngineCommandEventDataMap - Remove TODO comment about type safety in RPC handler Provides type-safe command handling similar to EngineEventDataMap pattern, ensuring proper typing for engine command parameters across the system.
BREAKING CHANGE: Consolidate EngineEventType and EngineCommandType into unified EngineMessageType system - Create unified EngineMessageType enum covering both commands and events - Add EngineMessageDataMap interface with type-safe message data mapping - Refactor RPC handlers to use dedicated methods per message type instead of generic engineCommand - Update handler names to match message types (load-project, load-map, start, stop) - Mark legacy types as @deprecated for backward compatibility - Update all implementations to use new unified system - Update documentation to reflect new message system Migration path: - Replace EngineEventType with EngineMessageType - Replace EngineCommandType with EngineMessageType - Replace EngineEvent with EngineMessage - Replace EngineCommand with EngineMessage - Update RPC calls from engineCommand to specific handler names Improves type safety, reduces code duplication, and provides cleaner API surface.
…ences BREAKING CHANGE: Remove all deprecated engine types and legacy imports - Delete deprecated engine-event-type.ts, engine-command-type.ts files completely - Delete deprecated engine-event.ts, engine-command.ts interface files - Remove all @deprecated exports from types/index.ts - Update EngineInterface to use EngineMessage instead of EngineEvent - Clean legacy imports from engine implementations - Remove backward compatibility aliases to eliminate technical debt This completes the migration to the unified EngineMessageType system by removing all deprecated code paths. No backward compatibility is maintained as all references have been updated to use the new unified system. Resolves build issues where old handler names were still being registered, ensuring only the new unified message handlers (start, stop, load-project, load-map) are available.
BREAKING CHANGE: Introduce semantic RPC communication with clear categories - Create RpcMethodRegistry with type-safe method definitions and categories - Add TypedRpcEndpointBase with semantic methods (sendCommand, sendEvent, sendInput) - Implement typed RPC endpoints for GJS and WebView environments - Add comprehensive RPC communication guide and documentation ## RPC Categories: - **Commands** (sendCommand): Operations requiring responses (start, stop, load-project, load-map) - **Events** (sendEvent): Fire-and-forget notifications (status changes, completion events) - **Input Events** (sendInput): High-frequency user interactions (mouse, keyboard) ## Type Safety: - All RPC methods defined in central registry with parameter/response types - Compile-time type checking for method calls and handlers - Clear semantic meaning prevents misuse (e.g., using sendRequest for notifications) ## Performance: - Commands: Response required, timeout overhead - Events: Fire-and-forget, fast execution - Input: Optimized for high frequency, minimal overhead ## Migration Benefits: - Eliminates confusion between sendRequest/sendNotification usage - Provides clear guidelines for when to expect responses - Improves performance by using appropriate communication patterns - Enables better error handling and debugging Replaces inconsistent RPC usage with semantic, type-safe communication patterns.
This reverts commit 1ebece7.
…e property - Rename spriteScale to scale in TilesetSelectorStory for consistency across the component - Update related logic and controls to reflect the new property name - Ensure backward compatibility by defaulting to scale value in relevant methods This change enhances clarity and maintains uniformity in property naming within the map editor components.
…ferences - Delete deprecated GameCommandType and EngineEventType files, along with their associated interfaces. - Remove deprecated methods and properties from GameProjectResource and SpriteSetResource. - Update EngineError to use a new error type system for better clarity. - Refactor input event handling in WebView and EditorInputSystem to align with the new structure. This cleanup enhances code maintainability and ensures a more consistent approach across the engine's architecture.
…t UI patterns - Revise Blueprint templates documentation to focus on clarity and conciseness, emphasizing a declarative approach to UI design. - Consolidate sections on property binding, signal handling, and TypeScript integration for better readability. - Introduce a new comprehensive documentation creation guide to standardize technical writing practices across projects. - Update GObject patterns documentation to reflect modern practices and improve clarity on properties and signals. These changes improve the overall structure and usability of the documentation, making it easier for developers to implement and understand Blueprint and GObject patterns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a Storybook-like testing environment for GTK widgets, split into two main packages:
Key Features
Technical Details
Documentation
Testing
The implementation has been tested with various widgets from our codebase:
Notes
Screenshots
The PR also includes significant refactoring work and improvements in widget lifecycle management and GTK4 rendering system integration. Special attention has been paid to GC safety and adherence to modern GTK4/GJS best practices.