Skip to content

chore: add a deprecation message#2660

Open
artem-harbour wants to merge 1 commit intomainfrom
artem/uidisplayfallbackfont
Open

chore: add a deprecation message#2660
artem-harbour wants to merge 1 commit intomainfrom
artem/uidisplayfallbackfont

Conversation

@artem-harbour
Copy link
Copy Markdown
Contributor

No description provided.

@artem-harbour artem-harbour force-pushed the artem/uidisplayfallbackfont branch from 68aa9c7 to e86dc92 Compare April 2, 2026 09:33
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

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

@artem-harbour approach looks good, just a couple of small things: the warning message wording and telling users what to use instead. also consider using the existing warnOnce() helper. left inline comments.


if (hasConfiguredUiDisplayFallbackFont) {
console.warn('[SuperDoc] config.uiDisplayFallbackFont is going to be deprecated and removed in future releases');
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we already have a warnOnce() helper in src/helpers/deprecation.js that prevents the same warning from showing multiple times. worth using here instead of console.warn?


if (hasConfiguredUiDisplayFallbackFont) {
console.warn('[SuperDoc] config.uiDisplayFallbackFont is going to be deprecated and removed in future releases');
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

two things on the message: "is going to be deprecated" should be "is deprecated" to match the rest of the codebase, and it should tell the user what to use instead.

Suggested change
}
console.warn('[SuperDoc] config.uiDisplayFallbackFont is deprecated and will be removed in a future version. Use createTheme({ font: \'...\' }) or the --sd-ui-font-family CSS variable instead.');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants