-
Notifications
You must be signed in to change notification settings - Fork 77
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
Show events from user communities on dashboard #2026
Conversation
.where(ClusterSubscription.user_id == context.user_id) | ||
.where(Cluster.is_official_cluster) | ||
.order_by(Node.id) | ||
.limit(100000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda copied this from threads.py
where 100000 is an arbitrarily "large enough" (?) number/page size cap so it should be sufficient to include all communities the user is in one page, but not unbounded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever we convert this into a subquery, the list of clusters will not be extracted from the database and this arbitrary limit will go away. So it is fine for now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backend looks good! There's still some failing frontend CI tests though.
It's because of this - https://gitlab.com/gitlab-com/gl-infra/production/-/issues/5590 😠 apparently the adjacent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing
Otherwise, users can barely any details of the time without most of it being cropped off
The button loads more events on page rather than taking user to the all events page based on PR comment
ee7edd0
to
a6e2a91
Compare
).not.toBeInTheDocument(); | ||
|
||
// Simulates scrolling horizontally to the end | ||
mockIsIntersecting(screen.getByRole("progressbar"), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
fetchNext={isBelowSm ? fetchNextPage : undefined} | ||
hasMore={hasNextPage} | ||
isFetching={isFetching} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I totally forgot I put this functionality in :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, made my job very easy 😉
…er-communities Show events from user communities on dashboard
Probably my first time getting my hands dirty on the backend a little bit on this project, so hopefully I haven't done anything too terrible :p it was too inefficient and annoying me to have to send one request per community just to find out which events are in the communities the user is in, so I extended the
ListMyEvents
rpc to include events from the user's communities by default as well.Desktop
Mobile
Closes #1880
Backend checklist
autoflake -r -i --remove-all-unused-imports src && isort . && black .
inapp/backend
develop
if necessary for linear migration historyWeb frontend checklist
yarn format && yarn lint --fix
yarn lint