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

Added time slider, time layer aware HOC #314

Merged
merged 8 commits into from Jan 5, 2018

Conversation

hwbllmnn
Copy link
Member

@hwbllmnn hwbllmnn commented Jan 2, 2018

Adds a time slider that operates on ISO 8601 time strings. Also adds a HOC that updates layers based on the current time setting.

@terrestris/devs please review

@hwbllmnn hwbllmnn changed the title WIP: Added time slider, time layer aware HOC Added time slider, time layer aware HOC Jan 4, 2018
Copy link
Member

@dnlkoch dnlkoch left a comment

Choose a reason for hiding this comment

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

Great addition! I really like the HOC.

I just added some minor (non-blocking) comments you might want to address.

package.json Outdated
@@ -119,6 +119,7 @@
"metalsmith-layouts": "1.8.1",
"metalsmith-markdown": "0.2.1",
"minami": "1.2.3",
"moment": "2.20.1",
Copy link
Member

Choose a reason for hiding this comment

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

Should be a dependency.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.


/**
* The default value(s).
* @type {any}
Copy link
Member

Choose a reason for hiding this comment

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

Is there any other type than Array<String> or String supported?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, docs adapted.


/**
* The current value(s).
* @type {any}
Copy link
Member

Choose a reason for hiding this comment

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

See above.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, docs adapted.

* @return {String} the formatted timestamps
*/
formatTimestamp = unix => {
return moment(unix * 1000).format('DD.MM. HH:mm');
Copy link
Member

Choose a reason for hiding this comment

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

Please make format string configurable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@hwbllmnn hwbllmnn merged commit c0d193b into terrestris:master Jan 5, 2018
@hwbllmnn hwbllmnn deleted the add-time-components branch January 5, 2018 10:59
@KaiVolland KaiVolland mentioned this pull request Jan 25, 2018
56 tasks
hblitza pushed a commit that referenced this pull request Oct 19, 2022
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.

None yet

2 participants