Skip to content

Fix incorrect pagination of workflows - #258

Merged
yousefmoazzam merged 1 commit into
mainfrom
fix-workflows-view-pagination
Oct 29, 2026
Merged

yousefmoazzam merged 1 commit into
mainfrom
fix-workflows-view-pagination

Conversation

@yousefmoazzam

Copy link
Copy Markdown
Collaborator

The code was taken from the workflows dashboard for how that project deals with the incorrect pagination behaviour of the graph-proxy (the workflows graphql service), see the following for where the code was copied from and modified slightly:

The code was taken from the workflows dashboard for how that project
deals with the incorrect pagination behaviour of the graph-proxy (the
workflows graphql service), see the following for where the code was
copied from and modified slightly:
- https://github.com/DiamondLightSource/workflows/blob/cd253acd7cf18b48cb1f9e061065f379bae8c538/frontend/relay-workflows-lib/lib/utils/useServerSidePagination.ts
- https://github.com/DiamondLightSource/workflows/blob/cd253acd7cf18b48cb1f9e061065f379bae8c538/frontend/relay-workflows-lib/lib/components/WorkflowsContent.tsx#L44
@yousefmoazzam

Copy link
Copy Markdown
Collaborator Author

@NatLeung96 I'm not necessarily expecting you to understand the new useServerSidePagination.ts file, I certainly don't, but just to have someone check that I haven't done something very silly in this rather inelegant approach to get "something that works" would be nice.

I think the displayed workflows is now correct when traversing across pages, but I've only tested it a bit, so having that be double-checked is also useful.

@NatLeung96

Copy link
Copy Markdown
Collaborator

Yeah, it's annoying that we have to implement something like this in the frontend when it should be fixed in the graph.

@NatLeung96 NatLeung96 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

A side note for another ticket. Playing around around with the table, I noticed that the column widths keeps changing so they move around. It would be good if we can fix these.

@yousefmoazzam
yousefmoazzam merged commit b2ad507 into main Oct 29, 2026
1 check passed
@yousefmoazzam
yousefmoazzam deleted the fix-workflows-view-pagination branch October 29, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants