Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor loading state shows flash of incorrect rendering mode #69088

Open
fabiankaegy opened this issue Feb 7, 2025 · 4 comments · May be fixed by #69099
Open

Editor loading state shows flash of incorrect rendering mode #69088

fabiankaegy opened this issue Feb 7, 2025 · 4 comments · May be fixed by #69099
Labels
[Package] Editor /packages/editor [Type] Regression Related to a regression in the latest release

Comments

@fabiankaegy
Copy link
Member

With some of the changes we recently applied to the "default rendering mode" we have introduced a regression in the loading state of the editor.

Previously the editor waited till the post / template etc was resolved before the editor canvas was actually shown. This no longer seems to be the case which now means the editor canvas renders before all the items are available and even when the default rendering mode is set to template-locked the editor first renders in post-only mode for a second before it switches over.

CleanShot.2025-01-17.at.13.55.55.mp4

Expected behavior

Ideally, we get back to the state where the editor shows a loading indicator till the canvas is really ready and doesn't show the incorrect rendering mode state.

@fabiankaegy fabiankaegy added [Package] Editor /packages/editor [Type] Regression Related to a regression in the latest release labels Feb 7, 2025
@fabiankaegy
Copy link
Member Author

@Mamaduka
Copy link
Member

Mamaduka commented Feb 7, 2025

I think regression was accidentally introduced in #68110, which delays the setting the default rendering mode until the template is loaded.

@Mayank-Tripathi32
Copy link
Contributor

I think regression was accidentally introduced in #68110, which delays the setting the default rendering mode until the template is loaded.

Hey @Mamaduka @fabiankaegy , I tried looking through the linked PR and doing following seems to fix the issue, not sure if its the correct way though.

Changing

 defaultMode:  hasTemplate && hasDefaultMode ? _defaultMode: 'post-only',

to

defaultMode: hasDefaultMode ? _defaultMode: 'post-only',

This essentially removes the check for template and avoid the flash from 'post-only' mode.

loading.issue.mov

I will open up a Draft PR to see if it passes cli tests.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 7, 2025
@Mamaduka
Copy link
Member

Mamaduka commented Feb 8, 2025

Thanks for giving this a try, @Mayank-Tripathi32! Unfortunately, we can't just remove the hasTemplate condition. The #68110 explains why it's needed.

I'm afraid fixing this requires a bit more refactoring.

@Mamaduka Mamaduka removed the [Status] In Progress Tracking issues with work in progress label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Editor /packages/editor [Type] Regression Related to a regression in the latest release
Projects
Development

Successfully merging a pull request may close this issue.

3 participants