[94] Fix: canvas syntax highlighting not syncing with theme changes via GPThemes btn#97
Merged
itsmartashub merged 13 commits intomainfrom Jan 7, 2025
Merged
Conversation
- Manually changing the theme value in localStorage now dispatches a `StorageEvent` to notify the system of the update
- This ensures the CodeMirror syntax theme updates correctly without requiring a page refresh
- Note: The theme change may cause a brief lag, but it avoids the need for a full page reload
Changes summary:
- Dispatching a `StorageEvent` after setting the theme value in localStorage to ensure the CodeMirror syntax theme updates correctly, avoiding the need for a page refresh. A brief lag may occur during the theme change, but this will prevent the need for a full page reload.
- Remove some transitions, such as those in sidebars
- Limit global transitions to specific properties instead of using "all"
- Note: Further investigation is needed to refine the transition settings
Changes summary:
- Removed some transitions, particularly in sidebars, and limited global transitions to specific properties to improve performance. Further investigation is planned to refine these settings.
…PCs (#94) - Add a loader to indicate theme changes are in progress - Ensure the loader is displayed during theme changes, especially when the canvas chat is opened, to prevent lagging on lower-performance systems - Note: The loader may appear briefly if the changes are quick, but it ensures a smoother user experience Changes summary: - Added a loader to indicate theme changes are in progress, ensuring a smoother user experience, especially when the canvas chat is opened and on lower performance systems.
…anager-2.js` (#94) - Replace "loading" text with a spinner in the loader - Introduce themeManager 2 to evaluate performance and user experience improvements Changes summary: - Updated the loader to use a spinner instead of "loading" text and introduced themeManager-2 to assess performance and user experience, aiming to reduce lag and improve UX.
…-full (#94) - There are still issues with animations not being triggered...
…rver and DOM awaiter (#94)
…n transition on the first load
…out it for testing (#94)
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.
Closes #94
Dispatch
StorageEventto trigger all the ChatGPT functions that are based onlocalStoragetheme value.On slower devices this seems laggy for Chromium users, but it is what it is if we want to avoid the need of page refreshing to change the theme for Canvas code syntax too...
Maybe I will add some loader showed during the theme appling process, but the loader duration can't be dynamic in this case, and I don't like to use the fixed predefined values...