Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Add option for not trimming input value #19

Merged
merged 1 commit into from
Jan 31, 2020

Conversation

LukaszKokot
Copy link

We add a "trim" option that is by default set to "true", in order for the
component to stay backward compatible. However, when this property is set
to "false", the value is the one directly entered by the user, with all
whitespaces left untouched.

We add a "trim" option that is by default set to "true", in order for the
component to stay backward compatible. However, when this property is set
to "false", the value is the one directly entered by the user, with all
whitespaces left untouched.
@LukaszKokot LukaszKokot changed the title ✨ Add option for not trimming input value Add option for not trimming input value Jan 17, 2020
Copy link

@RichardCzechowski RichardCzechowski left a comment

Choose a reason for hiding this comment

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

This looks good to me. I'm not overly familiar with this code, but from what I do know, I'd be happy bringing it in and verifying in Looker.
Looks like you've essentially built angular-ui#2064, we should discuss whether this is something we should open back into the original repo.

Copy link

@rlm1023 rlm1023 left a comment

Choose a reason for hiding this comment

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

👍 . So I didn't even know we had this repo. Might want someone that's worked in here before to review.

@@ -1139,7 +1140,7 @@ describe('ui-select tests', function () {
var el = createUiSelect();
expect(el.find('.ui-select-choices-group .ui-select-choices-group-label').map(function () {
return this.textContent;
}).toArray()).toEqual(["Foo", "Baz", "bar"]);
Copy link

Choose a reason for hiding this comment

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

Interesting that this line changed.

Copy link

Choose a reason for hiding this comment

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

Yeah that is weird... @LukaszKokot do you know why this changed?

@rlm1023
Copy link

rlm1023 commented Jan 17, 2020

The last few commits are me 🤦‍♂ . This is the angular ui-select, got it. Disregard my last comment.

@LukaszKokot
Copy link
Author

It was really a quick fix, no worries @rlm1023. Thanks for the review!

@LukaszKokot
Copy link
Author

LukaszKokot commented Jan 17, 2020

@RichardCzechowski Looks like there already is a PR (cf. angular-ui#2157) open since August 2018. Not sure the original repo is really maintained anymore.

@rlm1023
Copy link

rlm1023 commented Jan 17, 2020

We really might want someone like @stalbot 's opinion here. A little worried with how this could fallout.

@rlm1023
Copy link

rlm1023 commented Jan 17, 2020

Who's on paternity leave. Maybe @lameyer ?

@lameyer
Copy link

lameyer commented Jan 17, 2020

uh oh I've been summoned 😂 I'll take a look

@LukaszKokot
Copy link
Author

@rlm1023 @lameyer @RichardCzechowski For the record, I have a PR using this version of ui-select and the CI tests just turned all green. And since the trimming is being done by default (so in all other cases where the component is used), it's kinda safe I would say.

Copy link

@lameyer lameyer left a comment

Choose a reason for hiding this comment

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

Since this is just adding an option, and by default does the exact same thing, I feel pretty comfortable with this. @LukaszKokot if you can confirm with manual testing when you have helltool with this change the other input boxes will still trim spaces, then I feel like we're good

@@ -1139,7 +1140,7 @@ describe('ui-select tests', function () {
var el = createUiSelect();
expect(el.find('.ui-select-choices-group .ui-select-choices-group-label').map(function () {
return this.textContent;
}).toArray()).toEqual(["Foo", "Baz", "bar"]);
Copy link

Choose a reason for hiding this comment

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

Yeah that is weird... @LukaszKokot do you know why this changed?

@LukaszKokot
Copy link
Author

@lameyer this is for fixing a unit test failing from the last commit to master. Please see Rob's comment, cf. #19 (comment) :-)

@rlm1023
Copy link

rlm1023 commented Jan 21, 2020

Sorry my "disregard comment" comment was about this one:

So I didn't even know we had this repo. Might want someone that's worked in here before to review.

Not that unit test changing. Still want to make sure we understand why that changed.

@LukaszKokot
Copy link
Author

LukaszKokot commented Jan 21, 2020

So, I ran the tests on master, and that test I fixed was there, so something was wrong before my PR. And the last master commit is the one currently used in the main app code. Should I investigate further? (asking because I'm multi-tasking different issues at once)

@lameyer
Copy link

lameyer commented Jan 22, 2020

So this test was broken on master as well you're saying? That's probably fine then 🤷‍♀

@rlm1023 rlm1023 merged commit 507d9f2 into looker:master Jan 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants