Skip to content

Conversation

@tasiotas
Copy link

@tasiotas tasiotas commented Nov 3, 2024

πŸ”— Linked issue

none

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

I added cookieAttribsto the module config. This allows to specify any cookie attribute for further configuration. Now we can specify path, domain etc. so that color-mode works across subdomains.

Thank you

@netlify
Copy link

netlify bot commented Nov 3, 2024

βœ… Deploy Preview for nuxt-color-mode canceled.

Name Link
πŸ”¨ Latest commit 9978f41
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt-color-mode/deploys/67ed77c304e40400083f0707

@zumm
Copy link

zumm commented Jan 22, 2025

May i ask to improve naming? Would be nice to use cookieAttributes insted of cookieAttribs since there is no otrher abbreviations or atleast cookieAttrs since it's canonical abbreviation for attributes.

Copy link
Author

@tasiotas tasiotas left a comment

Choose a reason for hiding this comment

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

cookieAttribs renamed to cookieAttrs

@atinux atinux changed the title Add cookie attributes feat: add cookie attributes Apr 2, 2025
@atinux
Copy link
Contributor

atinux commented Apr 2, 2025

I'm wondering, I don't think domain is very useful though, but what about just forcing the path to be / to it applies to all the website by default?

@tasiotas tasiotas mentioned this pull request May 3, 2025
@mdotme
Copy link

mdotme commented Jun 2, 2025

any updates?

@velvetcode206
Copy link

lgtm, tried locally with the cookieAttrs changes and that pesky "Some cookies are misusing the recommended β€œSameSiteβ€œ attribute" is gone

marcel-bitfly added a commit to gobitfly/beaconchain that referenced this pull request Oct 15, 2025
Saving the current `color mode` in a cookie to avoid `hydration issues`,
as this way the `server` already knows the current `color mode`.

It was necessary to use `useCookie()` to save the `color mode`
instead of the `storage setting` of `nuxtjs/color-mode`, as
the cookie value otherwise will be applied to the current `/path`.
Resulting in different `color modes` for different `paths.

See: nuxt-modules/color-mode#301
marcel-bitfly added a commit to gobitfly/beaconchain that referenced this pull request Oct 15, 2025
Saving the current `color mode` in a cookie to avoid `hydration issues`,
as this way the `server` already knows the current `color mode`.

It was necessary to use `useCookie()` to save the `color mode`
instead of the `storage setting` of `nuxtjs/color-mode`, as
the cookie value otherwise will be applied to the current `/path`.
Resulting in different `color modes` for different `paths.

See: nuxt-modules/color-mode#301
marcel-bitfly added a commit to gobitfly/beaconchain that referenced this pull request Oct 15, 2025
Saving the current `color mode` in a cookie to avoid `hydration issues`,
as this way the `server` already knows the current `color mode`.

It was necessary to use `useCookie()` to save the `color mode`
instead of the `storage setting` of `nuxtjs/color-mode`, as
the cookie value otherwise will be applied to the current `/path`.
Resulting in different `color modes` for different `paths.

See: nuxt-modules/color-mode#301
marcel-bitfly added a commit to gobitfly/beaconchain that referenced this pull request Oct 15, 2025
Saving the current `color mode` in a cookie to avoid `hydration issues`,
as this way the `server` already knows the current `color mode`.

It was necessary to use `useCookie()` to save the `color mode`
instead of the `storage setting` of `nuxtjs/color-mode`, as
the cookie value otherwise will be applied to the current `/path`.
Resulting in different `color modes` for different `paths.

See: nuxt-modules/color-mode#301
marcel-bitfly added a commit to gobitfly/beaconchain that referenced this pull request Oct 16, 2025
Saving the current `color mode` in a cookie to avoid `hydration issues`,
as this way the `server` already knows the current `color mode`.

It was necessary to use `useCookie()` to save the `color mode`
instead of the `storage setting` of `nuxtjs/color-mode`, as
the cookie value otherwise will be applied to the current `/path`.
Resulting in different `color modes` for different `paths.

See: nuxt-modules/color-mode#301
@danielroe
Copy link
Collaborator

partial support landed via #320, but we can iterate here to allow configuration

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.

7 participants