fix(agenda): Agenda 'now' fallback to next event if there is no current event#8693
Merged
rjsparks merged 4 commits intoietf-tools:mainfrom Mar 19, 2025
Merged
fix(agenda): Agenda 'now' fallback to next event if there is no current event#8693rjsparks merged 4 commits intoietf-tools:mainfrom
rjsparks merged 4 commits intoietf-tools:mainfrom
Conversation
NGPixel
requested changes
Mar 18, 2025
| if (nowEventId) { | ||
| document.getElementById(`agenda-rowid-${nowEventId}`)?.scrollIntoView(true) | ||
| } else { | ||
| message.warning('There is no event happening right now.') |
Member
There was a problem hiding this comment.
missing "or in the future" to be consistent with AgendaMobileBar
| findNowEventId () { | ||
| const currentEventId = this.findCurrentEventId() | ||
|
|
||
| if (currentEventId) return currentEventId |
| if (sh.adjustedStart > current) { | ||
| // -> Use the first event of multiple events having identical times | ||
| if (nextEvent.start === sh.adjustedStart.toMillis()) { | ||
| continue |
Member
There was a problem hiding this comment.
Use break instead? No need to keep iterating, as events are already chronological.
Contributor
Author
There was a problem hiding this comment.
I've simplified this loop ... see 52678da
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8693 +/- ##
==========================================
- Coverage 88.88% 88.80% -0.08%
==========================================
Files 312 314 +2
Lines 40891 41243 +352
==========================================
+ Hits 36345 36626 +281
- Misses 4546 4617 +71 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
NGPixel
approved these changes
Mar 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 'now' internal page link would fail if there was no current event. For example, clicking 'now' before
events start for the day would fail. This PR adds a fallback where it will find the next event even if it hasn't started yet.