Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 377932 - Clone repository should trim blanks
Summary: Clone repository should trim blanks
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.5 M2   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-27 11:36 EDT by Ken Walker CLA
Modified: 2012-05-21 17:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Walker CLA 2012-04-27 11:36:20 EDT
If you paste in a clone link that happens to have blanks at either end of the link then the clone fails for reasons that are not apparent.  Manually trimming the blanks will fix this.

So we should trim any blanks from either end of the clone link.
Comment 1 Szymon Brandys CLA 2012-04-27 12:10:13 EDT
Similar to bug 371930. Susan is there a way to add validators to slideouts?
Comment 2 Susan McCourt CLA 2012-04-27 16:21:32 EDT
(In reply to comment #1)
> Similar to bug 371930. Susan is there a way to add validators to slideouts?

I didn't realize you were wanting validation attached to the slideout field in that other bug.  When I think of a validator, I think of things like the submit button being gray, and an "invalid" message, etc.  And do we validate per keystroke or at the end, etc. etc.

Would this work?
- each command parameter can be given a validation regex
- each command parameter can be given an error message

We run the regex on submit.  If there's a match, we give the matched part as the value in the callback.  If there's no match, we keep the slideout open with the error message (which would be pretty generic).

I'd like to avoid the keystroke level validation and all the "don't open in an invalid state" issues for now.
Comment 3 Szymon Brandys CLA 2012-04-29 05:49:03 EDT
(In reply to comment #2)
> I didn't realize you were wanting validation attached to the slideout field in
> that other bug.  When I think of a validator, I think of things like the submit
> button being gray, and an "invalid" message, etc.  And do we validate per
> keystroke or at the end, etc. etc.

I was not sure either. It just came to my mind that we could make validators part of the slideout declaration.

> Would this work?
> - each command parameter can be given a validation regex
> - each command parameter can be given an error message

I think so. But it seems to not be high on our priority list. If it is low effort for you, we can add it in M2.
Comment 4 Susan McCourt CLA 2012-04-30 12:13:01 EDT
I'll mark M2 to keep it on the radar, but it could slip.  It's a small/contained change we could add in an RCx if we need to.
Comment 5 Susan McCourt CLA 2012-05-18 15:29:44 EDT
moving out of 0.5M2 to 0.5 milestone until we have more specific buckets for future
Comment 6 Susan McCourt CLA 2012-05-21 17:18:35 EDT
I think it should be safe to just trim blanks for all cases rather than worry about generic validator support right now.  (Validation opens too big a can of worms, whereas I can't think of a case where trimming doesn't make sense.)

Fixed in http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=3f26733a4aaa93b10500164d06d50fdcf7e8b0f2