Fix: Ensure Custom Themes Are Applied in Monaco Editor Initialization#198
Fix: Ensure Custom Themes Are Applied in Monaco Editor Initialization#198sancheet230 wants to merge 2 commits intoaccordproject:mainfrom
Conversation
Signed-off-by: sancheet230 <sancheet.p24@medhaviskillsuniversity.edu.in>
✅ Deploy Preview for ap-template-playground ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
@DianaLease Can you review this PR and attached issue whenever you are free |
DianaLease
left a comment
There was a problem hiding this comment.
I cannot reproduce your original issue and your PR changes break the dark mode toggle.
|
@DianaLease @nitro56565 have already solved the main theme issue for monaco editor with #139 But I purposed some new performance and readability modifications like Performance Improvement: Using useMemo and useCallback can improve performance by memoizing values and functions preventing unnecessary re-renders |
Closes #197
This PR resolves the issue where custom themes were not being applied correctly in the Monaco Editor. The primary change involves defining the custom themes using the
beforeMountprop to ensure they are set prior to the editor's initializationChanges
beforeMountprop to define custom themes before the Monaco Editor initializes, ensuring the themes are applied correctly.MonacoEditorwith the direct use of the Editor component from@monaco-editor/reactto simplify the code and ensure proper theme application.useCallbackanduseMemohooks to memoize functions and variables, preventing unnecessary re-renders and function recreations.Author Checklist
--signoffoption of git commit.mainfromfork:branchname