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

Add timeslider support for date fields #534

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

spencerwahl
Copy link
Member

@spencerwahl spencerwahl commented Jan 17, 2025

Related Item(s)

https://github.com/ramp4-pcar4/tcei-tmx-cwa-storylines/issues/121

Changes

  • [FEATURE] add date formatter option to timeslider
  • [FEATURE] add arcgisDate option to timeslider to convert slider value to arcgis format for queries

Notes

  • date formatter
    • treats the slider values as "epoch time" timestamps and converts that to readable dates.
    • format is specified in config as string an example: "YYYY/M/DD" outputs something like "2025/01/17"
      • Y for year, M for month, D for day, h for hour, m for minute, s for seconds. Number of the letter = length of output (except for month). if YYYY is 2025 then YY would be 25
  • arcgis date queries
    • arcgis stores date fields with epoch time but is not queryable with them. arcgisDate option flags for conversion to arcgis format eg: TIMESTAMP '2025-01-17 00:00:00'
  • adds a debounce to the slider update so that layer redraws aren't spammed if someone is dragging though many values

Testing

Steps:

  1. Open testing page and scroll to timeslider map
  2. See fancy date formats

Like the other formatting PR the layer doesnt match with any of these values so expect nothing on the map. I tested the actual querying thoroughly with project specific layers.


This change is Reviewable

@spencerwahl spencerwahl added the PR: Frontend PR that primarily involves frontend changes. UI experts and CSS Wizards are asked to review. label Jan 17, 2025
Copy link

@spencerwahl
Copy link
Member Author

Updated to add schema changes

Copy link
Member

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @spencerwahl)

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @spencerwahl)

Copy link
Member Author

@spencerwahl spencerwahl left a comment

Choose a reason for hiding this comment

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

Undid test config changes

Reviewable status: 6 of 7 files reviewed, all discussions resolved (waiting on @RyanCoulsonCA and @yileifeng)

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @spencerwahl)

@yileifeng yileifeng merged commit 6d5ec69 into ramp4-pcar4:main Jan 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Frontend PR that primarily involves frontend changes. UI experts and CSS Wizards are asked to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants