- Add `role="switch"`, `aria-checked`, `aria-label`, and `tabindex="0"` to toggle switches in `christmas-sidebar.ts`.
- Add keyboard event handling (Enter/Space) to toggle switches.
- Add `:focus-visible` styles to `sidebar.css` for better keyboard navigation visibility.
- Ensure toggle logic is shared between mouse and keyboard interactions.
- Introduce to for reusable path drawing.
- Refactor Candy Cane effect to use native for smoother performance and cleaner code.
- Align Candy Cane animation flow and speed with other effects.
- Hoisted critical resource variables in `setup` to ensure scope availability.
- Implemented a `cleanup` function to safely dispose of DOM elements, listeners, and intervals.
- Updated error handling to call `cleanup` on initialization failure, preventing partial state.
- Returned `cleanup` function for proper extension lifecycle management.
- Replaces `initStars` with `updateStars` to support incremental updates.
- Extracts star and nebula creation into `createStarEntity` and `createNebulaEntity`.
- Updates `drawEnhancedBackground` to call `updateStars` on resize events, preventing stars from vanishing.
Added a `MAX_RETRIES` limit (50 retries / 5 seconds) to the `installBackgroundHook` function in `js/background-themes.js`. This prevents potential infinite loops if `app.canvas` never becomes available.
Fallback to a hardcoded default theme instead of returning null when the configured theme and the 'classic' fallback are both missing. This prevents potential UI glitches.
Replaced the unreliable 100ms timeout with a polling mechanism to wait for the extension manager to be ready before registering the sidebar tab. This prevents race conditions and ensures the sidebar is registered correctly even if the extension manager loads slowly.
This commit introduces a `CONTRIBUTING.md` file to establish clear guidelines for developers who wish to contribute to the project.
The file is based on a template provided by the project owner and has been adapted for the `ComfyUI-ChristmasTheme` repository.
It includes sections on:
- How to report bugs and suggest enhancements, with correct links to the issue tracker.
- The contribution workflow for submitting pull requests.
- A link to the Contributor Covenant Code of Conduct.
This will help streamline the contribution process and encourage community involvement.