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

Customize errorMessage position #271

Merged
merged 13 commits into from
Jan 7, 2020
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jan 29, 2019

Error messages can be set above or below textfield

Spencer Müller Diniz added 3 commits January 2, 2019 16:23
@ghost ghost changed the title Customizate errorMessage position Customize errorMessage position Jan 29, 2019
Copy link
Contributor

@jaredegan jaredegan 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 to me 👌

@jaredegan
Copy link
Contributor

What do you think @k0nserv?

@jaredegan
Copy link
Contributor

Actually, the new public/open vars are missing documentation blocks as comments.

@jaredegan
Copy link
Contributor

The textColor of errorLabel does not get updated in updateColors.

} else {
textAlignment = .right
titleLabel.textAlignment = .right
titleLabel.textAlignment = .right
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy paste error, you meant to paste in errorLabel here.

@spencerdiniz
Copy link
Contributor

The textColor of errorLabel does not get updated in updateColors.

Is this necessary?
errorLabel.textColor is always errorColor, which is set in createErrorLabel().

@spencerdiniz
Copy link
Contributor

Issues addressed and branch updated.

@jaredegan
Copy link
Contributor

It is necessary. If a user of this class changes the errorColor after initialization, the color of errorLabel will not be updated and it will still be red.

@spencerdiniz
Copy link
Contributor

It is necessary. If a user of this class changes the errorColor after initialization, the color of errorLabel will not be updated and it will still be red.

Fixed and pushed.

Spencer Müller Diniz and others added 3 commits February 18, 2019 16:17
…dded unit tests, adjust syntax to be consistent with project
Assorted adjustments to better fit SkyFloatingLabelTextField style
@k0nserv
Copy link
Contributor

k0nserv commented Feb 21, 2019

Hey 👋 I am a bit concerned about feature creep. There's more and more PRs that add custom variations and I am concerned that all these variants will decrease maintainability and increase the risk of introducing bugs. Because of this I'd ask if we can consider whether this can be implemented as a subclass rather than a variant

@spencerdiniz
Copy link
Contributor

spencerdiniz commented Feb 21, 2019

Hi. We did consider implementing this as a subclass, but that would require us to refactor a lot of our existing code that uses the current class. That’s why we decided to include the feature in the class itself and not subclass.

Also, when we considered adding this feature through subclassing, we found out the some of the properties and methods are private, which doesn't allow us to override them.

@Bernix01
Copy link
Contributor

Bernix01 commented Apr 2, 2019

any update on this?

@odanu
Copy link

odanu commented Apr 7, 2019

Yeap, indeed guys, are these commits going to join the main branch? :)

@ghost
Copy link
Author

ghost commented May 2, 2019

@k0nserv and @jaredegan can we approve this PR to master? I understand the manutenability concern but the unit tests can help us to keep code working. Besides that, this specific feature is not that complex, it is about the error message position.

@jaredegan
Copy link
Contributor

I am not an official maintainer.
If the code is legit but the official maintainer doesn't want it, I don't know what the best path forward would be. For me I forked it and I am using my fork. A bit of a hassle to stay up-to-date with changes as that becomes a very manual process, but open source software is hard!

@k0nserv
Copy link
Contributor

k0nserv commented May 3, 2019

Since there seems to be a signficant number of people who are interested in this feature we should probably merge it. @rethink-eder can you add this behaviour to the example app please?

@ghost
Copy link
Author

ghost commented May 3, 2019

@k0nserv I just committed a change in the screen "Setting text properties". We added a switch that will change the errorMessage position.

@adrianod1as
Copy link

+1

@ghost
Copy link
Author

ghost commented May 21, 2019

Hi @k0nserv did you have the opportunity to check the last commit with the screen example of this new property?

@ghost
Copy link
Author

ghost commented Jun 25, 2019

Hi @k0nserv . Would you approve this PR?

@alexbtlv
Copy link

+1

@CaioSanchez
Copy link

Any update on this?

@olegdanu-newstore
Copy link

Hey people :)
What is the status of this PR? What are the blockers to proceed on merging it?
What should be done to make this PR mergeable?

@ghost
Copy link
Author

ghost commented Oct 3, 2019

Hi @k0nserv. Are we ready for approve this PR?

1 similar comment
@ghost
Copy link
Author

ghost commented Dec 18, 2019

Hi @k0nserv. Are we ready for approve this PR?

@k0nserv
Copy link
Contributor

k0nserv commented Dec 18, 2019

The build is failing atm so that needs to be fixed at the very least

@ghost
Copy link
Author

ghost commented Dec 18, 2019

Hi @k0nserv. The issue is now fixed. We merged from master and fixed the errors. Build is now working. Can you approve this PR?

@@ -1,6 +1,8 @@
language: objective-c
xcode_project: SkyFloatingLabelTextField/SkyFloatingLabelTextField.xcodeproj
xcode_scheme: SkyFloatingLabelTextField
before_install:
- gem install bundler
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed? It should be handled by Travis already I believe

Copy link
Author

@ghost ghost Jan 5, 2020

Choose a reason for hiding this comment

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

@k0nserv k0nserv merged commit dd82b26 into Skyscanner:master Jan 7, 2020
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.