NUKnightLab / NUKnightLab/TimelineJS3
"All eras must have start and end dates" Error when exact same date supplied in Era config
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.2k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
If you setup your era config to have the same start and end date, you'll get get the error "All eras must have start and end dates". You'll get this because TimelineConfig._processDates(slide_or_era) will strip the end date since it thinks it's a regular Slide. This message will be in the trace logs: "End date same as start date is redundant; dropping end date".
This shouldn't happen because the era config is different than a regular event slide. Structurally, it's the same, but it's used differently. At the very least, the documentation - https://timeline.knightlab.com/docs/json-format.html#json-era - should state that the two start and end dates shouldn't be exactly the same.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in TimelineConfig._processDates(slide_or_era) and reproduce the trace message when an era has identical start and end dates. Compare the date handling for era configuration with regular event slides, then check the JSON era documentation. Done means the configuration no longer produces the missing-date error, or the documentation clearly states that identical dates are unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100