-
Notifications
You must be signed in to change notification settings - Fork 70
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
Refactor data fetching to use browser timezone, remove server rendering #110
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #110 +/- ##
==========================================
- Coverage 80.26% 77.66% -2.61%
==========================================
Files 29 31 +2
Lines 2954 3138 +184
Branches 201 217 +16
==========================================
+ Hits 2371 2437 +66
- Misses 575 693 +118
Partials 8 8 ☔ View full report in Codecov by Sentry. |
benvinegar
changed the title
Refactor data fetching to use browser timezone, remove server rendering [WIP]
Refactor data fetching to use browser timezone, remove server rendering
Nov 14, 2024
benvinegar
added a commit
that referenced
this pull request
Dec 20, 2024
…ng (#110) * Begin refactoring date/interval code into utils.ts * Time series chart renders * Add timezone to time series chart * Sites ordered by hits doesnt need tz * Update resources.country to use client tz * Cards all pass timezone * Fix errant cf timezone in resources.paths.tsx * Reload timeseries chart on interval change * Refactor stats into its own card, remove all uses of cf timezone * Fix tests * Fix lint errors * Fix "unknown" site id issue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #109 and #107
This is a major change that removes all server-side rendered React, so that the app can first inspect the user's browser timezone, and pass that along to every component.
By doing so, we avoid having to use Cloudflare Worker's
cf.timezone
property, which can create confusing scenarios (like #107) when the user's internet doesn't route through the timezone they're located in (e.g. when using a VPN or proxy).