Conversation
|
Amazing work!
I guess I'm only confused about the meaning of the slider position right now. It looks like the blue part (highlighted part) of the slider is the data range we DO NOT show, while the gray part is what we show, which I find a tiny bit confusing. I would easily make sense of a range slider since it's clear that you'd show only the features within this time range. |
|
|
Awesome!!! It would be wonderful to have a play/pause (and framerate) control :) Do you think that should be a separate PR? |
|
Integration tests report: appsharing.space |
67a97ce to
3618cb9
Compare
martinRenou
left a comment
There was a problem hiding this comment.
Thanks! That looks amazing
I played a bit with it, some things I noticed:
Toggling the time controls panel makes the bottom toolbar disappear
Screencast.From.2025-02-07.09-51-53.mp4
The time controls panel does not update itself upon layer selection
To reproduce:
- Open the
earthquakes.jGISdoc - Do not select any layer yet
- Open the time controls panel (it should say "You need to select a layer")
- Select a layer
-> The time controls panel does not update itself automatically
Probably related to the one above, the time controls panel button in the toolbar should be disabled if there is no selection OR if the current selection is a multi-selection OR if the selected object is a source, not a layer
It seems I cannot even make the time slider work on earthquakes.jGIS, even though the feature "time" is selected. Nothing shows up
Screencast.From.2025-02-07.09-59-00.mp4
| newSource = new VectorSource({ | ||
| features: featureCollection | ||
| }); | ||
| console.log('finish'); |
There was a problem hiding this comment.
| console.log('finish'); |
I swear this used to work 😿
👍
This was because the range for the earthquake data is only a month, if you went to days for the step it would've worked. I added a check to only display steps that make sense with the data. |
|
So now my last question is, did you find a correlation between earthquakes and pirate attacks? 😆 |
Turns out pirates are actually an earthquake deterrent. |
martinRenou
left a comment
There was a problem hiding this comment.
This looks amazing really, but I still have comments/suggestions 😄
When there is only one selectable feature, should we automatically select it?
| "348d85fa-3a71-447f-8a64-e283ec47cc7c": { | ||
| "name": "Custom GeoJSON Layer Source", | ||
| "parameters": { | ||
| "path": "../../examples/eq.json" |
There was a problem hiding this comment.
I'm curious to know why the path changed, we may have a bug somewhere around the file selector. This path change makes it fail when I try to load that file in JupyterLite, it should stay:
| "path": "../../examples/eq.json" | |
| "path": "eq.json" |
|
please update snapshots |
| const playAnimation = () => { | ||
| // Clear any existing interval first | ||
| if (intervalRef.current) { | ||
| clearInterval(intervalRef.current); |
There was a problem hiding this comment.
I've never seen this interval thingy, I'm more familiar with the requestAnimationFrame, could it be more reliable for browser animation?
There was a problem hiding this comment.
I don't think it's related to that. The html version of slider has valuesasnumber, valuenow, and current-value attributes in lite, but in lab it has value and current-value (I don't know why they change). The callback in the interval changes currentValue in the component correctly, but for some reason only setting the valueAsNumber prop works in lab (setting value instead of valueAsNumber make the slider out of sync with the actual value), but in lite the slider is based on the value prop.
That's a long way of saying the interval was happening correctly.
There was a problem hiding this comment.
Oh, could JupyterLite be providing an outdated version of the ui-toolkit that provides that slider?
|
please update snapshots |
1 similar comment
|
please update snapshots |
743c271 to
7942eab
Compare
martinRenou
left a comment
There was a problem hiding this comment.
Some more things I noticed while testing:
- The feature on which to run the time controls should be selected automatically when opening the controls (first one from the list)
- If we remove the layer on which the time controls are running, we should close the time controls
- If I open the time controls, play with the animation a bit, then change the symbology of the vector layer to e.g. a heatmap, the time controls stop working
7942eab to
a8ec175
Compare
The first two are done. For now I just made the controller close when changing to a heatmap. I'm trying to get the slider to work with heatmap layers, but no luck with that so far. |
mfisher87
left a comment
There was a problem hiding this comment.
🤩 Wow, there's a lot here. How'd you get this done so fast? 😅 Amazing work 🤩
407fdff to
d056ffc
Compare
d056ffc to
fede96c
Compare
martinRenou
left a comment
There was a problem hiding this comment.
Thanks a lot! Quite a lot of work done here :D
* Refactor getFeature stuff * Add toolbar item * Add temporal boolean * Start adding time slider thing * Continue * New example * wip * Add date-fns and examples * wip * Saving * I think it works * wip * Still works * Clean up slider * Add CSS class * Emit signal on feature select * Examples * Use awareness to hold time boolean * UI tweak * UI rework * Refactor filters logic * Make the icon toggleable * Refactor adding filter in slider component * Do time filtering in memory * Save * CSS * Clean up * Fix state check * Add FPS control * Update commands * yarrr * Fix layer selecting * Only display steps that make sense * Enable/Disabel toolbar button based on selection * Clean up * Fix CSS for mainview * Add raster layer check * Clean up * Actually use state * Clear filter when closing * Fix animate in lite * Add borders * Remove status bar border and restore screenshots * Remove filter from example * Select default feature * Pass commands to mainview * Close on layer deleteion or type change * Set default step correctly * Suggestions * Heatmap wip * Remove feature from schema * Enable for heatmap layers * Close * Heatmaps work? * Tweak * State restore wip * Set filter states in mainview * Fixed * Clean up



Description
First attempt at adding a way to display features based on a time field.
Still very much a wip. Right now this works if the selected time feature is a date string (if that string is in one of a few formats).
It also 'works' if the feature is a number, but it's hard to distinguish between a timestamp and any other number, so this requires some vigilance from the user when selecting the feature to use.
I'm also not sure how the UI should look. @martinRenou suggested a double-ended slider to control start and end dates, unfortunately the slider in
jupyter-ui-toolkitdoesn't support that, but there's plenty of sliders that do. I'm open to any feedback on this.Edit: Final iteration of UI:

Checklist
Resolves #XXX.Failing lint checks can be resolved with:
pre-commit run --all-filesjlpm run lint📚 Documentation preview: https://jupytergis--421.org.readthedocs.build/en/421/
💡 JupyterLite preview: https://jupytergis--421.org.readthedocs.build/en/421/lite