Paginate the events list endpoint #40
Labels
No labels
bug
chore
data
feature
frontend
good first issue
intermediate
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal#40
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Explore should load fast on a phone.
/api/events/returns every event at once (about 1.35 MB), and it grows with each source we add.Current state
get_all_eventsinapi/app/api/events.py(GET /api/events/,@public, commented "should only be used for testing purposes"). It supportsterm,tags,date,event_typebut has no limit or date window.web/src/context/UserContext.tsx(fetchEvents), andweb/src/app/components/SearchResultSidebar.tsxfilters by date, type and text on the client, then paginates 20 per page.description, which the endpoint never returns, so that part does nothing.Scope
start,end; default now to now + N weeks) and pagination (limitpluscursororpage) to/api/events/. Return{events, next_cursor/total}.events.start_datetime), via an alembic migration./events/.api/tests/api/for the window, page size and filters.Done when
Notes
Coordinate with the bug "Explore shows no events by default", which changes what the endpoint returns and who can call it. Land that first or in the same PR. Explore v2 builds on this.