Removed mobiledoc rendering and HTML-to-mobiledoc conversion#28906
Draft
kevinansfield wants to merge 1 commit into
Draft
Removed mobiledoc rendering and HTML-to-mobiledoc conversion#28906kevinansfield wants to merge 1 commit into
kevinansfield wants to merge 1 commit into
Conversation
no ref - Ghost moved to Lexical years ago but kept two legacy mobiledoc paths alive: converting HTML to mobiledoc (via ?source=html and on import) and rendering stored mobiledoc to HTML. These only ran for rare edge cases yet forced the mobiledoc-kit based dependencies to stay installed. - HTML now always converts to Lexical, and any content still stored as mobiledoc is converted to Lexical (via @tryghost/kg-converters) before rendering, leaving a single rendering path. - This drops @tryghost/kg-mobiledoc-html-renderer, @tryghost/html-to-mobiledoc and @tryghost/kg-default-atoms, removing mobiledoc-kit from ghost/core's dependency tree. - Mobiledoc is still stored for legacy posts; only the conversion and rendering paths are removed, so existing mobiledoc content keeps working.
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
ref https://linear.app/ghost/issue/GVA-816
Ghost moved to Lexical years ago, but
ghost/corestill carried two legacy mobiledoc paths that only ran for rare edge cases:?source=html(and data import) converted incoming HTML to mobiledocBoth relied on
@tryghost/html-to-mobiledocand@tryghost/kg-mobiledoc-html-renderer, which keepmobiledoc-kitin the dependency tree.This drops both paths:
@tryghost/kg-converters) and then rendered, leaving a single rendering path. Postingmobiledocto the API or importing a legacy mobiledoc export is accepted and auto-converted to Lexical on save (importing runs the cleaned mobiledoc through the model's normal conversion path).@tryghost/kg-mobiledoc-html-renderer,@tryghost/html-to-mobiledocand@tryghost/kg-default-atoms, removingmobiledoc-kitfromghost/core's dependency tree.Mobiledoc is still stored for legacy posts — the columns,
mobiledoc_revisionstable, snippet mobiledoc and URL transforms are untouched, so existing mobiledoc content keeps working. Only the conversion and rendering paths are removed.Behavioural consequences worth calling out:
populateImageSizesstep (which filled in image dimensions onforce_rerender) no longer applies; Lexical relies on editor-stored dimensions.Also fixes a latent connection-pool deadlock in the post model's revision path that surfaced once more content became Lexical (
getOwnerUserwas called without the surrounding transaction).