Skip to content

Conversation

keithchong
Copy link
Contributor

@keithchong keithchong commented Oct 28, 2024

A bit of history:
Second follow-up change for: #18615
Original change: #14124 (See my PR review comments, which led to PR 18615)

The rollback and history page is not user-friendly for multiple sources (at least at the time of the original implementation earlier this year). A lot of scrolling is needed. In fact, a similar usability issue was brought up even for single-source apps, which was addressed by #16871, by adding a Show/Hide button. It however has an issue where for multi-source apps, the single button would show or hide all the source parameter sections, and it should actually show/hide each section individually. This PR fixes that problem and also makes it look a bit more consistent with the Sources tab for multi-source apps, by using collapsible sections.

There is no Issue opened for this.

See screenshots and animated gif below.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Updated to Rollback and History panel, showing multi-source app history:

CollapsibleSections

The current Sources Tab for a multi-source app which has collapsible sections, for comparison:

SourceTabMultisourceApp

Single Source collapsed (no Show/Hide button), to be consistent with multi-source case:

SingleSourceCollapsed

Single Source expanded:

SingleSourceExpanded

Error loading, when expanding section:

20241026-ExpandedError

Demo animated gif showing the changes for a multi-source app:

DemoRollbackHistoryMultiSourceApp

Signed-off-by: Keith Chong <kykchong@redhat.com>
@keithchong keithchong requested a review from a team as a code owner October 28, 2024 21:32
Copy link

bunnyshell bot commented Oct 28, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@keithchong
Copy link
Contributor Author

keithchong commented Oct 29, 2024

Hi @pasha-codefresh , @reggie-k , because you reviewed #16871 , could you please review this PR change? This PR will remove the Show/Hide button.

Here is an example multi-source app for test purposes.

project: default
destination:
  server: https://kubernetes.default.svc
  namespace: default
sources:
  - repoURL: https://github.com/keithchong/argocd-example-apps.git
    path: helm-guestbook
    targetRevision: HEAD
    helm: {}
  - repoURL: https://github.com/keithchong/values-files.git
    targetRevision: HEAD
    ref: values_test

@pasha-codefresh
Copy link
Member

Sure @keithchong , we will allocate time and will review it

Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

Overall change looks good to me!!
Thanks @keithchong for addressing this.

Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

@keithchong looks like UI lint is still failing. Can you take a look at that?

Copy link
Contributor

@todaywasawesome todaywasawesome left a comment

Choose a reason for hiding this comment

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

Just the lint fix

@pasha-codefresh
Copy link
Member

@CodiumAI-Agent /review

@CodiumAI-Agent
Copy link

CodiumAI-Agent commented Oct 30, 2024

PR Reviewer Guide 🔍

(Review updated until commit d67b7a9)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

12183 - Fully compliant

Fully compliant requirements:

  • Display the last deployed revision as a summary when the History and Rollback window is opened.
  • Allow user to click on the last deployed revision to view details.
⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Code Complexity
The new implementation introduces complex state management and multiple conditional renderings which could be simplified for better maintainability.

Possible Bug
The use of null checks and the handling of indices in the collapsible sections might lead to runtime errors or unexpected behavior.

@pasha-codefresh
Copy link
Member

I have checked manually, change looks good

@CodiumAI-Agent
Copy link

Persistent review updated to latest commit d67b7a9

1 similar comment
@CodiumAI-Agent
Copy link

Persistent review updated to latest commit d67b7a9

Copy link
Member

@reggie-k reggie-k left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this fix, @keithchong!

I have tested manually and this panel looks much better than the button and better integrates with the ArgoCD UI overall.

One thing I liked about the button was that I could press on exactly the same location on the screen to both show and hide, while with the new panel I could click anywhere on the panel it to expand it, but can only click on the arrow to collapse, and I also think that the arrow needs to be a bit more visible in dark mode.

WDYT?

@keithchong
Copy link
Contributor Author

keithchong commented Oct 31, 2024

Thanks a lot for this fix, @keithchong!

I have tested manually and this panel looks much better than the button and better integrates with the ArgoCD UI overall.

One thing I liked about the button was that I could press on exactly the same location on the screen to both show and hide, while with the new panel I could click anywhere on the panel it to expand it, but can only click on the arrow to collapse, and I also think that the arrow needs to be a bit more visible in dark mode.

WDYT?

Here is the reason why I have the expand/collapse behaviour this way.

  1. The collapsed version of these sections look pretty much the same as those cards shown in the Settings page. I wanted to have the same look and feel. However, instead of the arrow pointing to the right as in the Settings page, these arrows will be pointing down, to indicate the collapsed state. In the Settings page, you can also click any where on the card to bring you to the next page. Here, for the collapsed section, I wanted to maintain that behaviour. However, we could just as easily force the user to click on the drop-down arrow too, but the current way makes it easier. (Note that if we were using a standard framework, like Patternfly or Carbon, we would simply just use whatever widget they provide.)
  2. After the section is expanded, you must click on the up-arrow to collapse it, as you've discovered. This must be the case because users may want to copy the field values, so they must be able to click to select the text (instead of collapsing the section).

The arrows are currently the same colour in dark mode as those arrows in the Settings page. i agree that it can be brighter, so I made the changes:

Collapsed:
20241026-DarkModeCollapsed

Expanded:
20241026-DarkModeExpanded

Signed-off-by: Keith Chong <kykchong@redhat.com>
Signed-off-by: Keith Chong <kykchong@redhat.com>
Signed-off-by: Keith Chong <kykchong@redhat.com>
Signed-off-by: Keith Chong <kykchong@redhat.com>
@keithchong
Copy link
Contributor Author

@pasha-codefresh , @reggie-k - updated and rebased. Thanks for your time again.

@reggie-k
Copy link
Member

reggie-k commented Nov 4, 2024

Thanks for the making the arrow look better in dark mode, Keith.
So I understand we cannot make it both collapsible and text-selectable?
Actually, expanding/collapsing the "SYNC STATUS" on the left filters sidebar is available by clicking on the arrow only and not on the entire row.
I think having the panel collapsible and text searchable would be nice, not mandatory, but if it is complicated to achieve, maybe we can enforce collapsing/expanding by clicking the arrow only, like in left filters sidebar, or just leave it as is, up to you.
I don't have a really strong opinion from a UX point of view and this LGTM also as it is right now.

@keithchong
Copy link
Contributor Author

Thanks @reggie-k , I'll leave it for now, and if people complain about how it works, we can revisit it in another PR.

Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

@todaywasawesome any concerns with merging the PR?

@pasha-codefresh pasha-codefresh dismissed todaywasawesome’s stale review November 4, 2024 14:52

Comment was resolved. Dan is on PTO

@pasha-codefresh pasha-codefresh merged commit 8cf990b into argoproj:master Nov 4, 2024
24 checks passed
adriananeci pushed a commit to adriananeci/argo-cd that referenced this pull request Dec 4, 2024
…20566)

* fix: Rollback multi-source apps; 2nd follow-up to PR 14124

Signed-off-by: Keith Chong <kykchong@redhat.com>

* Pull out styles changes; Make arrows more pronounced

Signed-off-by: Keith Chong <kykchong@redhat.com>

* Lint issue again

Signed-off-by: Keith Chong <kykchong@redhat.com>

* More lint errors. (Need to update my linter)

Signed-off-by: Keith Chong <kykchong@redhat.com>

* Simplify code

Signed-off-by: Keith Chong <kykchong@redhat.com>

---------

Signed-off-by: Keith Chong <kykchong@redhat.com>
Signed-off-by: Adrian Aneci <aneci@adobe.com>
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.

6 participants