Skip to content

Optimize CSS editor component#13962

Open
Wotrdev wants to merge 1 commit into
darkreader:mainfrom
Wotrdev:patch-1
Open

Optimize CSS editor component#13962
Wotrdev wants to merge 1 commit into
darkreader:mainfrom
Wotrdev:patch-1

Conversation

@Wotrdev
Copy link
Copy Markdown

@Wotrdev Wotrdev commented Feb 25, 2025

  • Refactored state handling using toggleDialog(isVisible) to avoid redundant context.refresh()
  • Replaced let textNode with a useRef-like object to manage textarea state efficiently
  • Simplified conditionals and used optional chaining for better readability
  • Improved performance by avoiding unnecessary reassignments and direct DOM manipulation
  • Ensured MessageBox renders only when needed, reducing unnecessary component updates

@Myshor Myshor requested a review from alexanderby February 25, 2025 21:02
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