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: make https repo credentials editable in the UI #9782

Merged
merged 16 commits into from Aug 19, 2022

Conversation

ciiay
Copy link
Contributor

@ciiay ciiay commented Jun 24, 2022

signed-off: @ciiay
fixes: #9108

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

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).
  • 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.
  • Optional. My organization is added to USERS.md.
  • 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).

Screenshot:
Screen Shot 2022-06-24 at 9 26 38 AM
Screen Shot 2022-06-24 at 9 27 25 AM

@ciiay ciiay force-pushed the ui-9108-make-repo-setting-editable branch from c47cb65 to b7984c5 Compare June 24, 2022 12:51
@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Merging #9782 (bfc7c72) into master (f84d828) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #9782   +/-   ##
=======================================
  Coverage   45.92%   45.92%           
=======================================
  Files         229      229           
  Lines       28278    28278           
=======================================
  Hits        12987    12987           
  Misses      13518    13518           
  Partials     1773     1773           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@crenshaw-dev crenshaw-dev changed the title feat: ui-9108-make-https-repo-credential-editable feat: make https repo credentials editable in the UI Jun 24, 2022
@reginapizza
Copy link
Contributor

Hi Yi! Just tried this out and it works great but I have one little nit. When the validation error pops up, usually they are on the line below the input. Here it is in the text input itself, making you not able to click on it to get the cursor (see video below). I would suggest making the validation errors like the other text inputs, as seen in the second picture here. Otherwise looks great so far, I'll continue to look into it code-wise! 😄

simplescreenrecorder-.2.mp4

ex 1

@ciiay ciiay force-pushed the ui-9108-make-repo-setting-editable branch from e3a3ede to b9f2067 Compare June 28, 2022 20:20
@ciiay
Copy link
Contributor Author

ciiay commented Jun 28, 2022

Hi @reginapizza , thanks for the review. Good catch on that unclickable input field. I actually reused a current <EditablePanel> component and its style. So it's an existing issue for wherever this component is used. I fixed it at my new PR update, it should fix the issue for where else it's used too.

e.g. Not clickable input field before my fix here too
Screen Shot 2022-06-28 at 4 11 58 PM

Regarding the location of this error message, if I make it underneath the input field, it will stretch out the entire section which doesn't look good, so I prefer to keep it inside the input as it's an existing style already. How do you think?

*no error message: small and neat section
Screen Shot 2022-06-28 at 4 25 15 PM
v.s. with the error message: stretched out section with extra thick bottom margin
Screen Shot 2022-06-28 at 4 25 07 PM

input {
z-index: 10;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@reginapizza Here's the fix for unclickable input field issue.

Copy link
Contributor

@saumeya saumeya left a comment

Choose a reason for hiding this comment

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

Great PR Yi, left a small comment

<EditablePanel
values={repo}
validate={input => ({
password: !input.password && input.username && 'Password is required if username is given.'
Copy link
Contributor

Choose a reason for hiding this comment

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

In case where only password is added without the username, there is no validation check and shows success box. That case can also be addressed here.

Copy link
Contributor Author

@ciiay ciiay Jun 30, 2022

Choose a reason for hiding this comment

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

Thanks for the review. I see the same thing when I wrote it but I aligned up with the current validation for the creation sliding panel. It only checks one way, so I kept it consistent. Do you think I should update both places or only the updating page?
Screen Shot 2022-06-30 at 1 23 30 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe better to update both places for better user experience?

@ciiay ciiay force-pushed the ui-9108-make-repo-setting-editable branch from 4a70b87 to 79dac4a Compare July 6, 2022 00:46
Copy link
Contributor

@saumeya saumeya left a comment

Choose a reason for hiding this comment

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

LGTM

@wtam2018 wtam2018 requested a review from rbreeze July 14, 2022 17:35
Copy link
Member

@rbreeze rbreeze left a comment

Choose a reason for hiding this comment

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

LGTM

crenshaw-dev and others added 11 commits August 18, 2022 17:12
Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
Signed-off-by: Yi Cai <yicai@redhat.com>
…t in CRD (argoproj#10191)

* chore: infer managed resources health from redis instead of storing it in CRD

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* apply reviewer notes

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
…proj#10361)

Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Xijun Dai <daixijun1990@gmail.com>

Signed-off-by: Xijun Dai <daixijun1990@gmail.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
Signed-off-by: Yi Cai <yicai@redhat.com>
…rgoproj#10390)

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
@ciiay ciiay force-pushed the ui-9108-make-repo-setting-editable branch from 92b0009 to 8bc8002 Compare August 18, 2022 21:14
Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
@crenshaw-dev crenshaw-dev added this to the v2.5 milestone Aug 19, 2022
@crenshaw-dev crenshaw-dev merged commit f93d678 into argoproj:master Aug 19, 2022
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.

Make Repos and other setting items editable in the Argo CD UI
10 participants