Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add mock data and cache to theme service #654

Merged
merged 2 commits into from
Jan 26, 2025

Conversation

mrv777
Copy link
Contributor

@mrv777 mrv777 commented Jan 16, 2025

Description

  • The current theme service doesn't work well in localhost testing since it can't pull the info from the device, so this adds mock data
  • getThemeSettings is called a few times on load so adding a cache should just do one API call instead of the 5+ we currently do. Just did 1 second to start to keep the data fresh while preventing all these same calls in the same second

Copy link
Collaborator

@WantClue WantClue left a comment

Choose a reason for hiding this comment

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

LGTM, but do we actually need to load in mock data?

@mrv777
Copy link
Contributor Author

mrv777 commented Jan 21, 2025

LGTM, but do we actually need to load in mock data?

I could be doing it wrong, but without the mock data when I try to just run the UI locally for testing no theme gets loaded so a lot more is black then there should be and doesn't look right

@eandersson
Copy link
Collaborator

LGTM, but do we actually need to load in mock data?

I could be doing it wrong, but without the mock data when I try to just run the UI locally for testing no theme gets loaded so a lot more is black then there should be and doesn't look right

I haven't tried it in a while with themes, but I believe we do need it for local testing.

@WantClue WantClue merged commit 8d8a01a into skot:master Jan 26, 2025
1 check 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