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

Standardize the sync/suspend/edit buttons #4080

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

opudrovs
Copy link
Contributor

@opudrovs opudrovs commented Oct 16, 2023

Part of weaveworks/weave-gitops-enterprise#3374

  • Replaced the Sync/Suspend/Resume controls, used in the SyncActions and CheckboxActions components, with the new Sync/Suspend/Resume controls (the SyncControl component).

  • Moved all components, related to syncing and suspending objects (existing SyncActions and CheckboxActions and new SyncControls and ResumeIcon), to the Sync folder.

  • Updated the related UI snapshot.

  • Added SyncControls to exports.

  • Moved custom actions to the start (left) of SyncControls buttons.

  • Re-arranged icons in IconType alphabetically (because it was hard to add new icons – to decide to which part of the list of icons or select cases to add new icon and to check if they already exist in the project, now it's somewhat easier).

Notes:

  • I've kept the original logic of creating sync/suspend handlers in general. Only added passing them to the new standartized SyncControls component and passing with/without source sync options (set with the new radio buttons) to the handlers.

  • We decided not to add Sync/Suspend notifications to enterprise for the time being. Notifications will be covered in the follow-up issues.

Screen recording of the new controls working in OSS:

Screen.Recording.2023-10-29.at.21.20.16.mp4

Design (there might be some differences between video and Figma design or design system, I tried to combine it in the most logical way):

The latest video with the design:
weaveworks/weave-gitops-enterprise#3374 (comment)
Figma:
https://www.figma.com/file/IVHnM9iyeFWpd11evtY8ux/Weave-GitOps?type=design&node-id=20086-71968&mode=design&t=46JWHoVfIwzQyShI-0

@opudrovs opudrovs added the type/enhancement New feature or request label Oct 16, 2023
@opudrovs opudrovs force-pushed the WGE3374-standartize-sync-suspend-edit-buttons branch 15 times, most recently from 8b79682 to c919c50 Compare October 23, 2023 08:09
@opudrovs opudrovs force-pushed the WGE3374-standartize-sync-suspend-edit-buttons branch 14 times, most recently from 41f1db5 to 77bf81d Compare October 27, 2023 11:59
@opudrovs
Copy link
Contributor Author

Add links to the latest video and Figma.

@opudrovs
Copy link
Contributor Author

Changed the format of my screen recording to MP4.

Copy link

@jpellizzari jpellizzari left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work

@opudrovs
Copy link
Contributor Author

@jpellizzari thank you! 🎉

Copy link
Contributor

@joshri joshri left a comment

Choose a reason for hiding this comment

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

This is awesome! Great code!

I noticed my sync requests in the ImageAutomations section are timing out, but I don't have enough faith in the objs on my cluster to say for sure if it's because of this PR - were you able to test img repos and update automations?

@opudrovs
Copy link
Contributor Author

opudrovs commented Oct 30, 2023

@joshri thank for testing it and notifying me about the issue! ✨

I don't think it is related to the current PR, because it should not affect the backend. But there was another PR merged in a few days ago which introduced some major changes to the sync/suspend backend code.

I will re-test my PR now with some ImageAutomations objects.

@joshri
Copy link
Contributor

joshri commented Oct 30, 2023

Yep - figured as much. I think this is safe to merge and we should address whatever's happening/not happening there in a follow up

@opudrovs
Copy link
Contributor Author

opudrovs commented Oct 30, 2023

@joshri tested several requests, have not been able to receive a request timeout or an error for iamge repos or image update automations, works fine for me.

Screenshot 2023-10-30 at 21 44 09 Screenshot 2023-10-30 at 21 44 17 Screenshot 2023-10-30 at 21 44 23 Screenshot 2023-10-30 at 21 44 37 Screenshot 2023-10-30 at 21 44 50 Screenshot 2023-10-30 at 21 45 03

@opudrovs
Copy link
Contributor Author

I only managed to reproduce request timeout (in most cases, but sometimes the request still succeeds) when trying to sync many objects, some of which are red or stuck in reconciling. But I see this issue in both main and current branches:

Screenshot 2023-10-30 at 22 21 36 Screenshot 2023-10-30 at 22 24 40

opudrovs added a commit that referenced this pull request Oct 30, 2023
…nd `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component). (#4080).

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.
@opudrovs opudrovs force-pushed the WGE3374-standartize-sync-suspend-edit-buttons branch from 98edb43 to 9bb7c2f Compare October 30, 2023 21:38
opudrovs added a commit that referenced this pull request Oct 30, 2023
…nd `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080)

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.
@opudrovs opudrovs force-pushed the WGE3374-standartize-sync-suspend-edit-buttons branch from 9bb7c2f to 91db5c3 Compare October 30, 2023 22:44
opudrovs added a commit that referenced this pull request Oct 31, 2023
…nd `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080)

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.
@opudrovs opudrovs force-pushed the WGE3374-standartize-sync-suspend-edit-buttons branch from 91db5c3 to fe336d6 Compare October 31, 2023 13:33
opudrovs added a commit that referenced this pull request Oct 31, 2023
…nd `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080)

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.
@opudrovs opudrovs force-pushed the WGE3374-standartize-sync-suspend-edit-buttons branch from 56289e8 to dd4c5fc Compare October 31, 2023 13:45
opudrovs added a commit that referenced this pull request Oct 31, 2023
…nd `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080)

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.
@opudrovs opudrovs force-pushed the WGE3374-standartize-sync-suspend-edit-buttons branch from dd4c5fc to 496ddb2 Compare October 31, 2023 13:55
opudrovs added a commit that referenced this pull request Oct 31, 2023
…nd `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080)

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.
@opudrovs opudrovs force-pushed the WGE3374-standartize-sync-suspend-edit-buttons branch from 496ddb2 to b2d13d1 Compare October 31, 2023 14:57
…nd `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080)

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.
@opudrovs opudrovs force-pushed the WGE3374-standartize-sync-suspend-edit-buttons branch from b2d13d1 to 859747a Compare October 31, 2023 15:44
@opudrovs
Copy link
Contributor Author

opudrovs commented Oct 31, 2023

Re-tested the current PR, works fine, so I am merging it. Will merge the enterprise part of this issue when enterprise is updated for the main OSS branch.

@opudrovs opudrovs merged commit 595df06 into main Oct 31, 2023
17 checks passed
@opudrovs opudrovs deleted the WGE3374-standartize-sync-suspend-edit-buttons branch October 31, 2023 18:44
AsmaaNabilBakr pushed a commit that referenced this pull request Nov 6, 2023
…nd `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080)

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.
AsmaaNabilBakr added a commit that referenced this pull request Nov 7, 2023
* fix duplicate icons

* policy icon size

* fix audit icon size

* update icon

* refactor: refactor away from deprecated wait.Poll calls

With the update, some other calls had to be updated:
- `NewDiscoveryRESTMapper` expects an extra `HTTPClient` argument
- `client` does not have `NewDelegatingClient` anymore, instead we can
  create the same resource with `client.New(...)`

Resolves #3812

References:
- #3812
- kubernetes-sigs/controller-runtime#2150
- https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0

Signed-off-by: Balazs Nadasdi <balazs@weave.works>

* try to update github.com/fluxcd/pkg/runtime to the earliest version with updated controller-runtime

Signed-off-by: Balazs Nadasdi <balazs@weave.works>

* Cleanup datatable (#4091)

* cleanup datatable

* sort filtered items by `sortValue || value`

* Update pkg/run/session/connect/connect.go

Co-authored-by: Yiannis Triantafyllopoulos <8741709+yiannistri@users.noreply.github.com>

* Refactoring Status column  (#4098)

* fix: Remove GitOps Run CLI commands

* Replace the Sync/Suspend/Resume controls, used in the `SyncActions` and `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080)

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.

* add new svg icon as CLusterDiscovery icon

* fix typo

* update import order

* build(deps): Bump google.golang.org/grpc from 1.51.0 to 1.56.3

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.51.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.51.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): Bump github.com/weaveworks/tf-controller/api version

* build(deps): Bump postcss from 8.4.21 to 8.4.31 in /website

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.21 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.21...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: Remove GitOps Run components

* build(deps): Remove gitops bucket server from build

* chore: Remove unused code previously used for GitOps Run

* build(deps): Bump @babel/traverse from 7.20.13 to 7.23.2 in /website

Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.20.13 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix duplicate icons

* remove extra space

---------

Signed-off-by: Balazs Nadasdi <balazs@weave.works>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Joshua Israel <joshua.israel@weave.works>
Co-authored-by: Balazs Nadasdi <balazs@weave.works>
Co-authored-by: a.shabaan <ahmed.shabaan@weave.works>
Co-authored-by: Yiannis Triantafyllopoulos <8741709+yiannistri@users.noreply.github.com>
Co-authored-by: Luiz Filho <luizbafilho@gmail.com>
Co-authored-by: yiannis <yiannis@weave.works>
Co-authored-by: opudrovs <opudrovs@gmail.com>
Co-authored-by: ahussein3 <ahmed.magdy@weave.works>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants