Skip to content

Conversation

@fawez9
Copy link
Contributor

@fawez9 fawez9 commented Dec 14, 2025

This PR fixes the issue where changing a setting like smoothCharts didn’t update the dashboard until you refreshed the page.
I wrapped smoothCharts in React state at the provider level, so the dashboard now updates immediately when the setting changes. Cookies are still used to persist your preferences, and SSR continues to work as expected. I also added a small DashboardWrapper to make sure SSR props and client-side context stay in sync.
How to test: toggle smoothCharts in your settings — the dashboard updates instantly. Refresh the page, and the cookie keeps your preference.

@vercel
Copy link

vercel bot commented Dec 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
testaustime Ready Ready Preview, Comment Dec 17, 2025 9:18pm
testaustime-storybook Ready Ready Preview, Comment Dec 17, 2025 9:18pm

@fawez9 fawez9 changed the title Changing settings requires refreshing the page to apply #490 FIX : Changing settings requires refreshing the page to apply #490 Dec 14, 2025
@Chicken
Copy link
Member

Chicken commented Dec 14, 2025

Build fails for eslint errors

@fawez9
Copy link
Contributor Author

fawez9 commented Dec 14, 2025

Everything is good now I think !

@Eldemarkki
Copy link
Member

There are still some checks failing, could you revert the changes in package-lock.json and try again? I'll check the code later today

@fawez9
Copy link
Contributor Author

fawez9 commented Dec 14, 2025

Check it now I think problem solved !

@Eldemarkki
Copy link
Member

Now it only updates the smooth charts setting, it should update all settings. I tested a bit myself and you can move the useSettings hook into Dashboard.tsx and get rid of the getPreferences() calls. That way there's no need for the DashboardWrapper either.

@fawez9
Copy link
Contributor Author

fawez9 commented Dec 14, 2025

i did some changes check them out when you're free and tell me if anything is not as needed , also what's the problem on the deployment here ?

@Chicken
Copy link
Member

Chicken commented Dec 14, 2025

Type error, Property 'defaultDayRange' does not exist on type 'IntrinsicAttributes & DashboardProps'.

@fawez9
Copy link
Contributor Author

fawez9 commented Dec 15, 2025

Hi @Eldemarkki , I’ve implemented the assignment check as discussed and tested it locally.
Happy to adjust anything if needed — thanks!

@fawez9
Copy link
Contributor Author

fawez9 commented Dec 15, 2025

I kept my focus on the settings changes we discussed (useSettings / removing getPreferences & DashboardWrapper).
I noticed some language-related behavior in the dashboard, but I didn’t touch i18n since I wasn’t sure if it’s in scope.

@Eldemarkki
Copy link
Member

@fawez9 I will check it this evening when I have time

@Eldemarkki
Copy link
Member

I'll merge this now, thank you for your first contribution!

@Eldemarkki Eldemarkki merged commit 92101bf into Testaustime:main Dec 17, 2025
7 checks passed
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.

3 participants