Skip to content

fix: Monaco Editor is stuck in loading state after page refresh#3838

Merged
mrCherry97 merged 5 commits intokyma-project:mainfrom
OliwiaGowor:monaco-loading
Apr 9, 2025
Merged

fix: Monaco Editor is stuck in loading state after page refresh#3838
mrCherry97 merged 5 commits intokyma-project:mainfrom
OliwiaGowor:monaco-loading

Conversation

@OliwiaGowor
Copy link
Contributor

@OliwiaGowor OliwiaGowor commented Apr 7, 2025

Description

Changes proposed in this pull request:

  • fixed Monaco Editor being stuck in loading state after page refresh
  • added passing schema to Monaco Editor

Related issue(s)
Closes #3819, closes #3291

Definition of done

  • The PR's title starts with one of the following prefixes:
    • feat: A new feature
    • fix: A bug fix
    • docs: Documentation only changes
    • refactor: A code change that neither fixes a bug nor adds a feature
    • test: Adding tests
    • revert: Revert commit
    • chore: Maintainance changes to the build process or auxiliary tools, libraries, workflows, etc.
  • Related issues are linked. To link internal trackers, use the issue IDs like backlog#4567
  • Explain clearly why you created the PR and what changes it introduces
  • All necessary steps are delivered, for example, tests, documentation, merging

@OliwiaGowor OliwiaGowor marked this pull request as ready for review April 7, 2025 05:06
@OliwiaGowor OliwiaGowor linked an issue Apr 7, 2025 that may be closed by this pull request
Copy link
Contributor

@mrCherry97 mrCherry97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also check if this fix could potentially resolve this issue: #3291

}

const { schema, loading, error } = useGetSchema({
const { fetchedSchema, loading, error } = useGetSchema({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make like this to have it more clear

Suggested change
const { fetchedSchema, loading, error } = useGetSchema({
const { schemas: fetchedSchema, loading, error } = useGetSchema({

const { fetchedSchema, loading, error } = useGetSchema({
schemaId,
skip: autocompletionDisabled,
skip: autocompletionDisabled | !!predefinedSchema,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
skip: autocompletionDisabled | !!predefinedSchema,
skip: autocompletionDisabled || !!predefinedSchema,

@mrCherry97 mrCherry97 merged commit 0a1d1d9 into kyma-project:main Apr 9, 2025
19 checks passed
@OliwiaGowor OliwiaGowor deleted the monaco-loading branch May 20, 2025 06:10
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.

Monaco Editor is stuck in loading state after page refresh Add ability to pass schema to EditorWrapper

2 participants