-
Notifications
You must be signed in to change notification settings - Fork 755
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
enhancement: frontend validation for duplicate repo entry in tui (#550) #729
enhancement: frontend validation for duplicate repo entry in tui (#550) #729
Conversation
if you like the work, do add a tip. It was more time taking than anticipated.. |
…tonaio#550) related to --multi-project command Signed-off-by: Abhishek Kumar Gupta <abhishekguptaatweb17@gmail.com>
1285082
to
1ddc522
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhishek818 thanks for tackling this issue. Unfortunately, your solution might not be ideal for users. Your flow breaks the creation flow in the duplication scenario which is not what we want.
I suggest the following:
- In manual mode - use the
input.Validate
function to display that the repo is a duplicate (i.e. return an error that will be displayed in the input) - In TUI mode - the repo that was already selected should be disabled from selection completely (ideally, if the user were to focus on the repo with arrows, the TUI would automatically skip over that repo)
I'm placing the PR in draft. No need to close it since you will be able to reuse most of the work. Thanks!
@Tpuljak if i understand correctly, my current changes doesnt breaks the flow (true for both manual and TUI modes). It rather allows the users to select a different option and gives a duplicate warning in the title header WITHOUT 'breaking the command and returning a fatal error'. Please correct me if i am missing something.. |
yeah, agreed much better way. Will go with this. hey, but should i keep the 'ALREADY SELECTED' tag or not for these options? |
This is what i am doing currently, what is missing ? Are you talking about not returning error in the title rather throw it in footer or something etc. ? |
@abhishek818 I didn't mean it breaks the command but it breaks the UX. The user needs to input a repo, select yes/no for more projects and then a new screen opens up.
I'm talking about return the appropriate error from the function. The error should say that the project is a duplicate and that will then be rendered in the input and not allow the user to move forward. Try it and you'll see what I mean.
You can keep the tag but let's make it say "Already selected" instead. Caps lock is a bit too aggressive 😄 P.S. No need to tag me in a separate comment, I get an email for each reply you post 😄 |
c3857d4
to
8f6c096
Compare
@Tpuljak
|
👍 😅 |
8f6c096
to
1cd4e39
Compare
…io#550) Related to workspace creation using multi-project command 1. skip selection/focus view over duplicate repo & git provider options (skips git provider having all repos already selected) 2. enable validation before breaking command flow and throwing fatal error and UX flows 3. disable 'enter' keypress for disabled options 4. handle duplicate entries over a mix of auto and manual modes (duplicate entry in manual input invoked inside auto mode) Signed-off-by: abhishek kumar gupta <abhishekguptaatweb17@gmail.com>
1cd4e39
to
b3bfb45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhishek818 nice work on implementing the latest changes! This now feels like a great CLI improvement.
I left 2 comments that should improve this a bit more.
P.S. We recognize the effort that went into this and, of course, a tip will be provided 🙂
…ytonaio#550) Signed-off-by: abhishek818 <abhishekguptaatweb17@gmail.com>
cdacf6e
to
a0131f5
Compare
Signed-off-by: abhishek818 <abhishekguptaatweb17@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhishek818 nice work! Everything seems to work great now.
Signed-off-by: abhishek818 <abhishekguptaatweb17@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this out and it looks great! NIce work!
The code is also okay to be merged, I just added a few comments for typos
Signed-off-by: abhishek818 <abhishekguptaatweb17@gmail.com>
/tip $10 |
🎉🎈 @abhishek818 has been awarded $10! 🎈🎊 |
@Tpuljak do let me know if daytona has any pending issues/features and looking to bounty it.. |
@abhishek818 thank you for your interest! We definitely plan on putting bounties on more issues so keep an eye out. |
I feel 50$ at the least would be the overall perfect bounty amount for the effort spent on this one. Would keep me motivated for contributing more.. |
@abhishek818 I understand what you're getting at but we feel like the already-provided tip justified the effort needed to complete this issue. You have to understand that the amount of time invested is not something that influences the bounty amount but the objective effort needed to complete it. |
Related to --multi-project command
Pull Request Title
enhancement: frontend validation for duplicate repo entry in tui (#550)
Description
related to --multi-project command
Related Issue(s)
This PR addresses issue #550
closes #550
/claim #550
Screenshots
If relevant, please add screenshots.