feat: add Ultra Dark theme support - #557
Conversation
|
@cmdr-chara is attempting to deploy a commit to the fileverse Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @mbj36, when you have a moment, could you please take a look at this? It adds component-level support for the hosted Ultra Dark design, including focused tests and accessibility checks. I’d especially appreciate confirmation that the theme-key and token approach fits the intended architecture. Thanks! |
|
@cmdr-chara Hi, thanks for the changes. Unfortunately, design tokens live in our shared UI package, so they need to land there first. But we will enable the Ultra Dark theme in coming days. |
Thanks for clarifying! I’d also be happy to contribute to the hosted dDocs app more broadly, not only to the Ultra Dark integration. I can help with testing, UI polish, and other features wherever it’s useful. Feel free to point me toward an appropriate task, I'm grateful that dDocs exists ^_^ |
What
Adds
theme-ultra-darkas a supported dDoc theme with a complete, self-contained token set. The theme uses the#0a0a0adocument canvas shown by the hosted dDocs Ultra Dark preview and a slightly darker#050505editor shell.The demo includes an Ultra Dark toggle so the theme can be tested independently of the hosted application's theme selector.
Why
Consumers can currently pass light, dark, Sepia, Pink, and Green theme keys, but there is no supported key for the hosted Ultra Dark design. Adding it at the component layer allows consumers to opt in without relying on an additional
.darkancestor or overriding internal tokens.Implementation
theme-ultra-darktoThemeKeyand the Tailwind safelist;DdocEditor;Accessibility
Automated checks cover the principal neutral foregrounds against the
#0a0a0acanvas:7:1;4.5:1;3:1.Test plan
rgb(10, 10, 10).rgb(5, 5, 5).git diff --check.npm run build.Repository test-suite note
The full suite currently reports 70 passing tests, while two pre-existing suites fail during collection because
package/utils/make-editoris missing:package/hooks/use-editor-commands.test.tsxpackage/utils/selection-utils.test.tsThe same failures reproduce on the unmodified
mainrevision and are unrelated to this theme.Hosted-app scope
This PR adds support in the open-source dDoc component. Enabling the “Ultra Dark — Coming soon” option in the hosted dDocs application may require a coordinated change in the host application and/or
@fileverse/ui.