Skip to content

Conversation

@meganelacheny
Copy link
Collaborator

Update of Admin customization documentation: config.theme is being replaced with config.theme.light and config.theme.dark

👉 See contribution PR

@meganelacheny meganelacheny added source: Dev Docs PRs/issues targeting the Developer Docs pr: updated content PRs updating existing documentation content internal PRs created by the Strapi core team target: v4 Documentation PRs/issues targeting content from docs.strapi.io (main branch). labels Sep 29, 2022
@meganelacheny meganelacheny self-assigned this Sep 29, 2022
@vercel
Copy link

vercel bot commented Sep 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
documentation ✅ Ready (Inspect) Visit Preview Oct 10, 2022 at 1:24PM (UTC)

Copy link
Collaborator

@pwizla pwizla left a comment

Choose a reason for hiding this comment

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

All good for me! Thanks for the update, Mégane!

Copy link
Contributor

@ronronscelestes ronronscelestes left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the update 💃

Comment on lines +510 to +513
To extend the theme, use either:
- the `config.theme.light` key for the Light mode
- the `config.theme.dark` key for the Dark mode
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd omit that and add a comment in the above code example instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think a comment in the code example should replace this explanation, especially since otherwise there's no proper information about how to extend the theme in the "Theme extension" section. I'll leave this here. But I integrated all you other suggestions, thank you for your review!

::: note
Strapi applications can be displayed either in Light or Dark mode (see [administrator profile setup in the User Guide](/user-docs/latest/getting-started/introduction.md#setting-up-your-administrator-profile)), however custom theme extension is only applied for Light mode. When choosing Dark mode for a Strapi application, theme customizations are ignored.
::: caution
The former syntax `config.theme` to extend the theme will soon be deprecated by Strapi, and will stop being supported when the next major release is available. We encourage you to update any custom theme using the new syntax that supports custom development for both Light and Dark modes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The former syntax `config.theme` to extend the theme will soon be deprecated by Strapi, and will stop being supported when the next major release is available. We encourage you to update any custom theme using the new syntax that supports custom development for both Light and Dark modes.
The former syntax for `config.theme` without `light` or `dark` keys is deprecated at will be removed in the next major release. We encourage you to update your custom theme to use the new syntax that supports light and dark modes.

meganelacheny and others added 3 commits October 10, 2022 15:09
Co-authored-by: Gustav Hansen <gu@stav.dev>
Co-authored-by: Gustav Hansen <gu@stav.dev>
Co-authored-by: Gustav Hansen <gu@stav.dev>
@pwizla pwizla added this to the 4.4.4 milestone Oct 19, 2022
@pwizla pwizla merged commit b7daebd into main Oct 19, 2022
@pwizla pwizla deleted the dev/dark-mode_update branch October 19, 2022 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: updated content PRs updating existing documentation content source: Dev Docs PRs/issues targeting the Developer Docs target: v4 Documentation PRs/issues targeting content from docs.strapi.io (main branch).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants