No force setting a cookie in localStorage when theme mode stays at default
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, tailwindcss, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Tái hiện vấn đề trong một dự án Gatsby sử dụng các component Flowbite và Flowbite-react, sau đó tìm cookie flowbite-theme-mode và cách xử lý cookie này trong localStorage. Xác nhận hành vi khi không cấu hình chế độ giao diện; hoàn thành nghĩa là chế độ sáng mặc định hoạt động mà không buộc cookie hoặc giá trị lưu trữ đó phải được đặt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- [x ] I have searched the Issues to see if this bug has already been reported
- [ x] I have tested the latest version
Steps to reproduce
- Create a gatsbyjs project
- Install Flowbite and Flowbite-react
- Implement component without setting a theme
- Develop with 'Gatsby develop'
- Take a look into local storage in browser
Current behavior
The 'flowbite-theme-mode' cookie is ALWAYS being set even if no theme mode being used.
Expected behavior
Having control over what cookie being set or at least fix a default value somewhere else preventing a cookie being set, when no theme mode is being used. I expect a default value written in the codes core not in a cookie.
Context
I tried to remove the cookie by code. Since I am using multiple templates, I tried removing it with onClientEntry and onInitialClientRender which will only succeed once. As soon as the site being reloaded, the cookie is back.
There seems to be no option to control this cookie. Searching the code also results in nothing. I could not find anything to control this cookie. I do use a custom theme but with no theme mode. It should be light by default, but it should definitely not being read from the local storage but being set internally. It does not make much sense to force write a default value into a cookie when this value will never ever change.
No dark mode, just default light mode.
If you dont respect GDPR because it is annoying we can team up: I dont like the rules either!
But reading default values from a cookie which is written by default does not make a lot of sense. Store the default values in the core, not in a cookie.
NOTE: I know some people are allergic on this specific issue. You can detach this from the GDPR topic and focus on NOT setting a cookie when there is no theme mode.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.1k
- Fork
- 502
- Merge trung bình
- 19 giờ 16 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của themesberg/flowbite-react
-
fix(Carousel): can't give dynamic children to CarouselCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở:bug: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
themesberg/flowbite-react#1469 · 1 bình luận ·
-
Pagination is broken if there is only one pageCó thể đã có người làm @Mukilan1600 đã nhận 1020 ngày trước. Đang mở:bug: bug confirmed good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
themesberg/flowbite-react#1048 · 7 bình luận · 1 reaction ·
-
:books: documentation help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
themesberg/flowbite-react#1696 · 2 bình luận ·
-
Add a QRCode componentĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
themesberg/flowbite-react#1693 ·
-
NavbarCollapse closes when toggling a MegaMenuDropdown on mobileCó thể làm lại được @sarthak-11231 đã nhận 43 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
themesberg/flowbite-react#1686 · 2 bình luận ·
Tất cả issue của themesberg/flowbite-react
Issue tương tự
-
Navbar avatar and name stay stale after saving profile changesCó thể đã có người làm @alexechoi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marmelab/atomic-crm#416 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
epam/ai-dial-react-file-manager#99 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
canonical/craft-actions#146 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
feature-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
bluesky-social/social-app#12343 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
lucide-icons/lucide#5165 ·
Maintainer thường phản hồi trong vòng 1 ngày