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

Provide configuration options via the interface #99

Open
BrianGenisio opened this issue Jan 9, 2017 · 2 comments
Open

Provide configuration options via the interface #99

BrianGenisio opened this issue Jan 9, 2017 · 2 comments

Comments

@BrianGenisio
Copy link
Contributor

One limitation I've hit a couple of times has been the 5000 character limit which is somewhat arbitrary. I changed some copy from 4990 to 5010 characters the other day and it all-of-a-sudden stopped working.

Is there a philosophical reason for a limit that large? Is it based on empirical evidence? Or is it mostly just arbitrary?

Was thinking we could have a way of changing that default? Perhaps globally, as well as per-call.

balanceText.config({maxTextWidth: 12345}); // global setting
balanceText(el, {maxTextWidth: 12345}); // per-call
balanceText(el, {anyTextWidth: true}); // perhaps just disable the check?

I'm happy to do the work if we decide this is the way to go... just thought I'd put it out there as a discussion point. Will there be other config settings we care about such that we setup a good pattern for it?

@redmunds
Copy link
Contributor

redmunds commented Jan 9, 2017

@BrianGenisio Totally arbitrary. Making this configurable would be great!

@redmunds
Copy link
Contributor

redmunds commented Jan 9, 2017

I think a global config setting would be sufficient:

balanceText.config({maxTextWidth: 12345}); // global setting

This could be set to a very high value to effectively turn off check. This is mostly a fail safe for people that accidentally add the setting to a ridiculously long piece of text to prevent page from "freezing". I don't know why anyone would want to have a different value for different parts of page (i.e. setting per call).

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

No branches or pull requests

2 participants