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: date offset and auto progress date #270

Merged
merged 10 commits into from
Oct 29, 2020
Merged

Conversation

kommander
Copy link
Collaborator

@kommander kommander commented Oct 28, 2020

Optionally adds an hourly offset to the used date string, which allows the date string generated to load data to be in the past, not loading new data at 12pm exactly.

Note: also fixes an error when trying to add images to map which were already loaded.

@DanielHabenicht @ChristophWersal what nobody noticed so far... we never automatically increment the current date at any point. So unless you reload the app, you won't get new data. Simple approach would be to take current date +- offset, calculate the duration to 12pm and set a timeout to set the current date. This only works without the TimeSlider though, whenever you are looking at another day, it should not update the current date automatically. Currently everything is done in UTC, timezones are another topic. Friggin' dates...

@restyled-io restyled-io bot mentioned this pull request Oct 28, 2020
@github-actions
Copy link

Bundle difference

Asset group Old size New size Diff
all 12.11 MB 12.11 MB -836 B (-0.01%)
documents 3.54 KB 3.54 KB 0 B (0.00%)
scripts 2.4 MB 2.4 MB 65 B (0.00%)
stylesheets 181.71 KB 181.71 KB 0 B (0.00%)
images 796.78 KB 796.78 KB 0 B (0.00%)
misc 1016.3 KB 1016.3 KB 0 B (0.00%)

@github-actions
Copy link

Bundle difference

Asset group Old size New size Diff
all 12.11 MB 12.11 MB -728 B (-0.01%)
documents 3.54 KB 3.54 KB 0 B (0.00%)
scripts 2.4 MB 2.4 MB 96 B (0.00%)
stylesheets 181.71 KB 181.71 KB 0 B (0.00%)
images 796.78 KB 796.78 KB 0 B (0.00%)
misc 1016.3 KB 1016.3 KB 0 B (0.00%)

Co-authored-by: Restyled.io <[email protected]>
@github-actions
Copy link

Bundle difference

Asset group Old size New size Diff
all 12.11 MB 12.11 MB -712 B (-0.01%)
documents 3.54 KB 3.54 KB 0 B (0.00%)
scripts 2.4 MB 2.4 MB 96 B (0.00%)
stylesheets 181.71 KB 181.71 KB 0 B (0.00%)
images 796.78 KB 796.78 KB 0 B (0.00%)
misc 1016.3 KB 1016.3 KB 0 B (0.00%)

@restyled-io restyled-io bot mentioned this pull request Oct 29, 2020
@github-actions
Copy link

Bundle difference

Asset group Old size New size Diff
all 12.11 MB 12.11 MB 2.53 KB (0.02%)
documents 3.54 KB 3.54 KB 0 B (0.00%)
scripts 2.4 MB 2.4 MB 688 B (0.03%)
stylesheets 181.71 KB 181.71 KB 0 B (0.00%)
images 796.78 KB 796.78 KB 0 B (0.00%)
misc 1016.3 KB 1016.3 KB 0 B (0.00%)

Co-authored-by: Restyled.io <[email protected]>
@kommander kommander changed the title Fix/date offset fix: date offset and auto progress date Oct 29, 2020
@github-actions
Copy link

Bundle difference

Asset group Old size New size Diff
all 12.11 MB 12.11 MB 2.53 KB (0.02%)
documents 3.54 KB 3.54 KB 0 B (0.00%)
scripts 2.4 MB 2.4 MB 688 B (0.03%)
stylesheets 181.71 KB 181.71 KB 0 B (0.00%)
images 796.78 KB 796.78 KB 0 B (0.00%)
misc 1016.3 KB 1016.3 KB 0 B (0.00%)

@kommander kommander added enhancement New feature or request LGTM labels Oct 29, 2020
Co-authored-by: Restyled.io <[email protected]>
@github-actions
Copy link

Bundle difference

Asset group Old size New size Diff
all 12.11 MB 12.11 MB 4.07 KB (0.03%)
documents 3.54 KB 3.54 KB 0 B (0.00%)
scripts 2.4 MB 2.4 MB 1.47 KB (0.06%)
stylesheets 181.71 KB 181.71 KB 0 B (0.00%)
images 796.78 KB 796.78 KB 0 B (0.00%)
misc 1016.3 KB 1016.3 KB 0 B (0.00%)

2 similar comments
@github-actions
Copy link

Bundle difference

Asset group Old size New size Diff
all 12.11 MB 12.11 MB 4.07 KB (0.03%)
documents 3.54 KB 3.54 KB 0 B (0.00%)
scripts 2.4 MB 2.4 MB 1.47 KB (0.06%)
stylesheets 181.71 KB 181.71 KB 0 B (0.00%)
images 796.78 KB 796.78 KB 0 B (0.00%)
misc 1016.3 KB 1016.3 KB 0 B (0.00%)

@github-actions
Copy link

Bundle difference

Asset group Old size New size Diff
all 12.11 MB 12.11 MB 4.07 KB (0.03%)
documents 3.54 KB 3.54 KB 0 B (0.00%)
scripts 2.4 MB 2.4 MB 1.47 KB (0.06%)
stylesheets 181.71 KB 181.71 KB 0 B (0.00%)
images 796.78 KB 796.78 KB 0 B (0.00%)
misc 1016.3 KB 1016.3 KB 0 B (0.00%)

@@ -129,6 +129,9 @@ export const CovMap = () => {
map.on("idle", handleMapIdleOrRemoved);
map.once("remove", handleMapIdleOrRemoved);
config.imageIcons?.map(({ id, url, pixelRatio, sdf }) => {
if (map.hasImage(id)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this has nothing to do with date offset and is just performance optimization?

@alexanderthieme alexanderthieme merged commit 2db1706 into master Oct 29, 2020
@github-actions
Copy link

🎉 This PR is included in version 1.2.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request LGTM released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants