Skip to content
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

feat(editor): Add pagination to the workflows list #13100

Merged
merged 46 commits into from
Feb 14, 2025

Conversation

MiloradFilipovic
Copy link
Contributor

@MiloradFilipovic MiloradFilipovic commented Feb 6, 2025

Summary

Implementing pagination in the workflows list. In order to achieve this, we are introducing the following changes:

  • ResourcesListLayout component:
    • Added new mode, list-paginated, which renders list of Items with pagination controls
    • Renamed old list mode to list-full
    • Added pagination-related state and logic
    • Added option to skip front-end sorting and filtering
    • Added new loading state when only list items are loading
    • Re-ordered component options so they are inline with our guidelines
    • Renamed type IResource --> Resource
    • Changed interface IFilters to type and renamed --> BaseFilters
  • WorkflowsView component:
    • Updated so it only passes one workflows page at a time to the ResourcesListLayout
    • Handles paging and filtering changes from the resource list and fetches workflows pages with set values
  • WorkflowCard component now emits events related to workflow action so they can be communicated up to the WorkflowsView
  • Also added support for fetching specific workflows page to the store and API and added API method that returns both count and data as served by our rest endpoints

Screenshot

image

Related Linear tickets, Github issues, and Community forum posts

Closes ADO-3153

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

- Adding `paginated-list` mode to the `ResourcesListLayout`component
- Implemented paging in workflows store
@MiloradFilipovic MiloradFilipovic changed the title Ado 3153 workflow list pagination feat(editor): Add pagination to the workflows list Feb 6, 2025
@MiloradFilipovic MiloradFilipovic self-assigned this Feb 6, 2025
@MiloradFilipovic MiloradFilipovic marked this pull request as draft February 6, 2025 12:49
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Feb 6, 2025
@MiloradFilipovic MiloradFilipovic force-pushed the ADO-3153-workflow-list-pagination branch from 7844693 to b3a84df Compare February 11, 2025 14:59
⚡️ Using wf activator return value in the workflow card
@MiloradFilipovic MiloradFilipovic force-pushed the ADO-3153-workflow-list-pagination branch from b3a84df to 73ee4f9 Compare February 11, 2025 15:57
r00gm
r00gm previously approved these changes Feb 13, 2025
Copy link
Contributor

@r00gm r00gm left a comment

Choose a reason for hiding this comment

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

@MiloradFilipovic some minor comments.

Tested the branch and it seems to be working correctly

Copy link

cypress bot commented Feb 13, 2025

n8n    Run #9265

Run Properties:  status check failed Failed #9265  •  git commit f0a7b1187a: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 MiloradFilipovic 🗃️ e2e/*
Project n8n
Branch Review ADO-3153-workflow-list-pagination
Run status status check failed Failed #9265
Run duration 05m 01s
Commit git commit f0a7b1187a: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 MiloradFilipovic 🗃️ e2e/*
Committer Milorad FIlipović
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 5
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 435
View all changes introduced in this branch ↗︎

Tests for review

Failed  e2e/23-variables.cy.ts • 1 failed test

View Output Video

Test Artifacts
Variables > licensed > should search for a variable Test Replay Screenshots Video
Flakiness  e2e/12-canvas.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Canvas Node Manipulation and Navigation > should preserve connections after rename & node-view switch Screenshots Video

Copy link
Contributor

✅ All Cypress E2E specs passed

r00gm
r00gm previously approved these changes Feb 13, 2025
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link
Contributor

✅ All Cypress E2E specs passed

@MiloradFilipovic MiloradFilipovic merged commit 8e37088 into master Feb 14, 2025
37 checks passed
@MiloradFilipovic MiloradFilipovic deleted the ADO-3153-workflow-list-pagination branch February 14, 2025 08:51
@github-actions github-actions bot mentioned this pull request Feb 17, 2025
@janober
Copy link
Member

janober commented Feb 20, 2025

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants