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

Add OK/Cancel buttons to the text input fields #3521

Conversation

vrubezhny
Copy link
Contributor

This PR adds OK/Cancel buttons to the text input fields used at the creation of a cluster namespace/project as well as at the adding of a Devfile Registry (name, URL, token)

@vrubezhny
Copy link
Contributor Author

All the input fields have common view like the following for normal text values:

image

and for the passwords/tokens:

image

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Attention: 143 lines in your changes are missing coverage. Please review.

Comparison is base (f7c404c) 34.49% compared to head (237970c) 34.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3521      +/-   ##
==========================================
- Coverage   34.49%   34.23%   -0.26%     
==========================================
  Files          81       82       +1     
  Lines        5787     5847      +60     
  Branches     1158     1171      +13     
==========================================
+ Hits         1996     2002       +6     
- Misses       3791     3845      +54     
Files Coverage Δ
src/openshift/openshiftItem.ts 43.39% <25.00%> (+1.08%) ⬆️
src/openshift/cluster.ts 9.20% <28.57%> (+0.99%) ⬆️
src/util/inputValue.ts 6.97% <6.97%> (ø)
src/registriesView.ts 25.47% <1.04%> (-8.08%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robstryker robstryker changed the title Add OK/Cabcel buttons to the text input fields Add OK/CaNcel buttons to the text input fields Nov 3, 2023
@robstryker robstryker changed the title Add OK/CaNcel buttons to the text input fields Add OK/Cancel buttons to the text input fields Nov 3, 2023
@vrubezhny vrubezhny force-pushed the fix-create-project-input-field-add-ok-cancel-buttons branch from 08c108f to e316f5c Compare November 3, 2023 20:18
Copy link
Collaborator

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

Works very well from my testing.

One thing I ran into is that the back button doesn't work as expected in the "Add Devfile Registry" workflow. I think it would be helpful to have the back button working. Do you want to work on that in this PR, or should I file this as an issue to work on in the future?

@vrubezhny vrubezhny self-assigned this Nov 3, 2023
@vrubezhny vrubezhny marked this pull request as draft November 3, 2023 21:14
@vrubezhny
Copy link
Contributor Author

One thing I ran into is that the back button doesn't work as expected in the "Add Devfile Registry" workflow. I think it would be helpful to have the back button working. Do you want to work on that in this PR, or should I file this as an issue to work on in the future?

Thanks for looking at this. I think you're right, and Back button should allow to navigate back through all the fields. I'll continue working on this PR.

@vrubezhny vrubezhny force-pushed the fix-create-project-input-field-add-ok-cancel-buttons branch from e316f5c to 7ed9acc Compare November 6, 2023 17:18
@vrubezhny
Copy link
Contributor Author

Added the possibility to go back when creating a Devfile Registry item:

Screencast.from.2023-11-06.18-22-33.webm

@vrubezhny vrubezhny marked this pull request as ready for review November 6, 2023 17:59
@datho7561
Copy link
Collaborator

If I enter an invalid URL (eg. registry.stage.devfile.io (without the https://)) and then hit the enter key, it freezes.

@vrubezhny
Copy link
Contributor Author

vrubezhny commented Nov 7, 2023

If I enter an invalid URL (eg. registry.stage.devfile.io (without the https://)) and then hit the enter key, it freezes.

I can't reproduce any kind of freeze here. But yes, there is a bug: if input is not valid it just closes the input URL dialog leaving the promise not resolved, so it might freeze later on repeated retries.

UPD: The problem is an exception happening in new URL() and not being caught, thus leaving the field not editable and the result not resolved.

UPD 2: Fixed now

@vrubezhny vrubezhny force-pushed the fix-create-project-input-field-add-ok-cancel-buttons branch 2 times, most recently from 3aa6fe5 to 0785f32 Compare November 7, 2023 13:25
@vrubezhny vrubezhny marked this pull request as ready for review November 7, 2023 14:08
datho7561
datho7561 previously approved these changes Nov 7, 2023
Copy link
Collaborator

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

Looks good and seems to working well. Thanks, Victor!

@datho7561 datho7561 added this to the 1.11.0 milestone Nov 7, 2023
@datho7561 datho7561 added the kind/enhancement New feature or request label Nov 7, 2023
This PR adds OK/Cancel buttons to the text input fields used at the creation of
a cluster namespace/project as well as at the adding of a Devfile Registry (name, URL, token)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
@vrubezhny vrubezhny force-pushed the fix-create-project-input-field-add-ok-cancel-buttons branch from 0785f32 to 237970c Compare November 7, 2023 20:13
@datho7561 datho7561 merged commit 1d03188 into redhat-developer:main Nov 7, 2023
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants