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

Implement an infinite loading for the deployment list page #559

Merged
merged 1 commit into from Jul 29, 2020

Conversation

cakecatz
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@cakecatz cakecatz changed the title Implement a infinite loading for the deployment list page Implement an infinite loading for the deployment list page Jul 29, 2020
@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 20.77%. This pull request does not change code coverage.


export type Deployment = Required<DeploymentModel.AsObject>;
export type Stage = Required<PipelineStage.AsObject>;
export type DeploymentStatusKey = keyof typeof DeploymentStatus;

const ITEMS_PER_PAGE = 30;
const ITEMS_PER_PAGE = 50;
const FETCH_MORE_ITEMS_PER_PAGE = 30;
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

Copy link
Member

Choose a reason for hiding this comment

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

1回目(開く時)の数は50, 2回目から(load more)30ですね。

Copy link
Member

Choose a reason for hiding this comment

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

お、これはありがたいです。

>("deployments/fetchMoreList", async (_, thunkAPI) => {
const { deployments, deploymentFilterOptions } = thunkAPI.getState();
const lastItem = selectLastItem(deployments);
const maxUpdatedAt = lastItem ? lastItem.updatedAt : 0;
Copy link
Member

Choose a reason for hiding this comment

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

👍

@nghialv
Copy link
Member

nghialv commented Jul 29, 2020

Thank you.
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nghialv.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot pipecd-bot merged commit a04a614 into master Jul 29, 2020
@pipecd-bot pipecd-bot deleted the deployment-paging branch July 29, 2020 08:54
@pipecd-bot
Copy link
Collaborator

TEMPLATE

failed to handle template rule examples

Details
Error: unabled to push rendered files to destination

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants