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: Date range filter for workflow list. Fixes #8329 #8596

Merged
merged 19 commits into from
Jun 11, 2022

Conversation

momom-i
Copy link
Contributor

@momom-i momom-i commented May 3, 2022

Fixes #8329

Add a date range filter for workflow

Now if a user has more than 20 workflows, show them a pop-up window that warns it may takes time.
But this number is a kind of temporary value so I'd appreciate if you could let me know more appropriate value.

dependabot bot and others added 8 commits April 23, 2022 07:44
Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 2.9.0 to 3.8.0.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](peaceiris/actions-gh-pages@v2.9.0...v3.8.0)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.75.0 to 0.76.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.75.0...v0.76.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/argoproj/pkg](https://github.com/argoproj/pkg) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/argoproj/pkg/releases)
- [Commits](argoproj/pkg@v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: github.com/argoproj/pkg
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/argoproj/pkg](https://github.com/argoproj/pkg) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/argoproj/pkg/releases)
- [Commits](argoproj/pkg@v0.13.0...v0.13.1)

---
updated-dependencies:
- dependency-name: github.com/argoproj/pkg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.76.0 to 0.77.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.76.0...v0.77.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/argoproj/pkg](https://github.com/argoproj/pkg) from 0.13.1 to 0.13.2.
- [Release notes](https://github.com/argoproj/pkg/releases)
- [Commits](argoproj/pkg@v0.13.1...v0.13.2)

---
updated-dependencies:
- dependency-name: github.com/argoproj/pkg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot bot and others added 2 commits May 4, 2022 00:34
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.77.0 to 0.78.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.77.0...v0.78.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@alexec alexec changed the title feat: Date range filter for workflow feat: Date range filter for workflow list. May 4, 2022
@alexec alexec changed the title feat: Date range filter for workflow list. feat: Date range filter for workflow list. Fixes #8329 May 4, 2022
Copy link
Contributor

@alexec alexec left a comment

Choose a reason for hiding this comment

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

I've run this locally and it seems to work. You've changed the defaults. By default, all workflows are show. Now only the last month are shown. I like this new behaviour. But, we need to make sure the user knows.

That can be archived using the new <FirstTimeUserPanel/>. This panel is inspired by the same UI element that iPhone shows after upgrades:

image

This element replaces the element it explains, and once dismissed, is never shown again.

image

This panel needs some small improvements:

  • Center the text.
  • Allow the user to add a margin.

E.g.

export const FirstTimeUserPanel = ({id, explanation, children ,style}: {id: string; explanation: string; children: ReactChildren, style: CSSProperties}) => {
    const localStorageKey = 'FirstTimeUserPanel/' + id;
    const [dismissed, setDismissed] = useState(localStorage.getItem(localStorageKey) === 'true');

    useEffect(() => {
        localStorage.setItem(localStorageKey, String(dismissed));
    }, [dismissed]);

    if (!dismissed) {
        return (
            <div className='white-box' style={{textAlign: 'center', ...style }}>
                <p>{explanation}</p>
                <p>
                    <a onClick={() => setDismissed(true)}>Continue</a>
                </p>
            </div>
        );
    }
    return <>{children}</>;
};

The user may wish to quickly clear the dates, so can we add an "X" to the date-picker that clears the date?

@momom-i
Copy link
Contributor Author

momom-i commented May 8, 2022

I'm sorry for the delay. Now it looks like as follows.

  • Add clear button

スクリーンショット 2022-05-08 22 14 30

  • Add FirstTimeUserPanel

スクリーンショット 2022-05-08 22 15 08

@alexec alexec self-requested a review June 11, 2022 02:31
<FirstTimeUserPanel
id='WorkflowListPanel'
explanation={
'This page shows a list of your workflows. You can filter by namespace, label and now date and time. ' +
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'This page shows a list of your workflows. You can filter by namespace, label and now date and time. ' +
'This page shows a list of your workflows. You can filter by namespace, label and date/time. ' +

id='WorkflowListPanel'
explanation={
'This page shows a list of your workflows. You can filter by namespace, label and now date and time. ' +
'By default, only the last months workflows are shown.'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'By default, only the last months workflows are shown.'
'By default, only the last month's workflows are shown.'

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.

Date range filter for workflow list in UI
2 participants