Skip to content

Provide support for supplying a NSAttributedString for the token instead...#24

Open
BayPhillips wants to merge 2 commits into
venmo:masterfrom
BayPhillips:master
Open

Provide support for supplying a NSAttributedString for the token instead...#24
BayPhillips wants to merge 2 commits into
venmo:masterfrom
BayPhillips:master

Conversation

@BayPhillips

Copy link
Copy Markdown

... of a NSString. There are a couple ways this could be accomplished but I figured this would be the simplest and wouldn't interfere with current usages of it.

@BayPhillips

Copy link
Copy Markdown
Author

This is also in reference to #7

@BayPhillips

Copy link
Copy Markdown
Author

Looking into the tests break.

@ayanonagon

Copy link
Copy Markdown
Contributor

Hey! Taking a look at this now. Thanks for the pull request. :octocat: 👍

@BayPhillips

Copy link
Copy Markdown
Author

Was just looking over this now and I think I may have a bug with not applying the attributes to the comma in the attributed string!

@BayPhillips

Copy link
Copy Markdown
Author

I also realized there's a lot more that we need to support when adding NSAttributedString support.

  • How do we want the To field to look? Should it be the same size as the tokens?
  • We need to make sure the highlighted background view receives the same frame (with or without a padding?)
  • Should the input text be the same style as well? What about the collapse text?

Either way, I'm going to be working some more on this. Sorry for the delay.

@ayanonagon

Copy link
Copy Markdown
Contributor

No need to be sorry about anything! Really appreciate your help with this, @BayPhillips. Those are all really good questions. We don't do much customization at all for Venmo, so I'm curious to get input from other people who use this pod in terms of what is expected. Maybe the best thing to do is make is pretty flexible, we can apply individual styling to the collapsed, input, and token texts. It's tricky though, because the token field would look weird if the input style is really different from the token text, etc.

@BayPhillips

Copy link
Copy Markdown
Author

Yeah, that's definitely my primary concern. I'm thinking of having a default properties dictionary that gets applied to all of those texts. Allow users to overwrite the default styling, while also giving them additional properties for each one which if set, will be used. Keeping this backwards compatible for you guys and anyone else who uses the default styling is definitely my first priority.

@m1entus

m1entus commented Apr 9, 2015

Copy link
Copy Markdown

Please merge that ...

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.

3 participants