fix: scoped-count capability + single-day flat-list for location scope pages (#428)#430
Merged
Conversation
Contributor
Homeboy Results —
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #428 (substrate half).
What's fixed in this PR
1. Scoped-count capability for the substrate
The canonical event query ability (
data-machine-events/query-events) now accepts an explicit, generictime_scopeparameter (today,tonight,this-weekend,this-week). The value is resolved through the sameScopeResolverthe calendar LIST uses, and the resulting date/time window flows into the existingUpcomingFilterdate-range path. This lets callers request a scoped count without the substrate ever reading consumer query variables likeevent_scope.inc/Abilities/EventDateQueryAbilities.php: addstime_scopeto input schema and resolves it todate_start/date_end/time_start/time_endbefore building the query. Explicitdate_start/date_endtake precedence; bare requests remain unchanged.inc/public-api.php: documents the newtime_scopeparam in thedata_machine_events_query_events()wrapper.2. Single-day scopes render a flat list instead of a carousel
In
inc/Blocks/Calendar/src/frontend.ts, single-day scopes (today,tonight) now skip the horizontal carousel and render a flat vertical list. Multi-day scopes (this-week,this-weekend) keep the carousel. This mirrors the existing month-grid carousel skip pattern and reads the server-emitteddata-scopeattribute the same wayisMonthGridMode()readsdata-display-mode.What's intentionally NOT in this PR
The consumer wiring that reads
event_scopeinextrachill-eventsand passestime_scopeinto the query ability is a follow-up in theextrachill-eventsrepo. That layer owns theevent_scopequery variable; this substrate change stays layer-pure and knows nothing about it.Verification
php -lpasses oninc/Abilities/EventDateQueryAbilities.phpandinc/public-api.php.npm run buildininc/Blocks/Calendarsucceeded;frontend.jswas regenerated (build artifacts are.gitignored, source change is the committed delta).grep -rn \"event_scope\" inc/returns nothing — no consumer query-var leakage into the substrate.Files changed
inc/Abilities/EventDateQueryAbilities.phpinc/Blocks/Calendar/src/frontend.tsinc/public-api.php