Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Apr 10, 2025

☑️ Resolves

Allow to overwrite the theme for some parts of the UI.
Also adjust the dark theme composable to respect this value by using the injected theme.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

@susnux susnux added enhancement New feature or request 3. to review Waiting for reviews labels Apr 10, 2025
@susnux susnux added this to the 9.0.0 milestone Apr 10, 2025
@susnux susnux changed the title Feat/nc date time feat(NcThemeProvider): allow to override the current theme for parts of the UI Apr 10, 2025
@susnux
Copy link
Contributor Author

susnux commented Apr 10, 2025

/backport to stable8

@susnux susnux force-pushed the feat/nc-date-time branch from c4ffa42 to ef6260a Compare April 12, 2025 14:29
@susnux susnux requested a review from ShGKme April 12, 2025 14:29
@susnux susnux force-pushed the feat/nc-date-time branch from ef6260a to a35e1b6 Compare May 12, 2025 12:43
@susnux susnux mentioned this pull request May 26, 2025
15 tasks
susnux added 2 commits July 7, 2025 11:33
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the feat/nc-date-time branch from a35e1b6 to 3fb2c80 Compare July 7, 2025 09:33
Co-authored-by: Grigorii K. Shartsev <me@shgk.me>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the feat/nc-date-time branch from 3fb2c80 to 1dd2dc2 Compare July 15, 2025 12:48
@susnux susnux requested a review from ShGKme July 15, 2025 12:48
</script>

<template>
<div :[`data-theme-${theme}`]="theme">
Copy link
Contributor

Choose a reason for hiding this comment

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

Work, although I'm not fond of having another wrapper.

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you prefer a directive?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, missed that. I meant putting everything in another div, although this would feel better as a directive, yes

@susnux susnux merged commit ef1f2d9 into main Jul 15, 2025
25 checks passed
@susnux susnux deleted the feat/nc-date-time branch July 15, 2025 13:38
export const useIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement())
export function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {
const isDarkTheme = useInternalIsDarkTheme()
const enforcedTheme = inject(INJECTION_KEY_THEME)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't there be a default value passed? Console is bloating with warnings:

Image

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

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants