Skip to content

Conversation

@matyasf
Copy link
Collaborator

@matyasf matyasf commented Nov 5, 2025

  • Type the new theme objects. Its a bit chaotic now because we will support old themes, a cleanup will make it much nicer when we delete them
  • remove require path from docs build, because it was used to import from the deprecated 'canvas-theme', 'canvar-high-contrast-theme' packages
  • remove functional theme support, it was used only for Avatar
  • useStyle no longer needs generateComponentTheme since this is not used by new themes

@matyasf matyasf self-assigned this Nov 5, 2025
@matyasf matyasf requested a review from HerrTopi November 5, 2025 09:47
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-11-06 12:07 UTC

const parsed: MainDocsData['themes'] = {}
parsed[canvas.key] = {
resource: canvas,
requirePath: '@instructure/canvas-theme'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The requirePath is only used in the Themes docs pages to show how to import them. This is not needed, because now we import everything from ui-themes

doc.id as keyof typeof functionalComponentThemes
]
if (typeof generateTheme === 'function' && themeVariables) {
// @ts-ignore todo type
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Typing is still not perfect, but it will be much simpler to do when we can delete the old themes

@balzss balzss changed the title refactor(many): type new themes properly [v12] refactor(many): type new themes properly Nov 6, 2025
remove require path, because it was used to import from the deprecated
'canvas-theme', 'canvar-high-contrast-theme' packages
remove functional theme support, it was used only for Avatar
useStyle no longer needs generateComponentTheme since this is not used by new themes
@matyasf matyasf merged commit 101c2a9 into v12 Nov 6, 2025
6 of 7 checks passed
@matyasf matyasf deleted the new_theme_typing branch November 6, 2025 12:07
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.

3 participants