Skip to content

Conversation

@itsmartashub
Copy link
Owner

Refactored the logic for managing UI states like the thinking process visibility. Instead of directly modifying CSS variables, the implementation now toggles attributes on the <html> element. This approach improves code clarity, reduces redundancy, and makes it easier to extend functionality for new elements in the future.

… vars for managing UI states

- Refactor `useToggleStorage` and `hideThinkingProcess` to toggle attributes on the `<html>` element instead of directly modifying CSS variables
- Replace direct CSS variable updates with attribute-based toggling for cleaner, more maintainable, and extensible code
- Ensure the new approach is DRY (Don't Repeat Yourself) and easier to extend for future elements or features

Changes summary:
- Refactored the logic for managing UI states like the thinking process visibility. Instead of directly modifying CSS variables, the implementation now toggles attributes on the `<html>` element. This approach improves code clarity, reduces redundancy, and makes it easier to extend functionality for new elements in the future.
@itsmartashub itsmartashub self-assigned this Sep 4, 2025
@itsmartashub itsmartashub merged commit 1bd8d47 into main Sep 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant