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

prop to allow truncation of email #49

Closed
AndBroCorp opened this issue Mar 26, 2020 · 4 comments
Closed

prop to allow truncation of email #49

AndBroCorp opened this issue Mar 26, 2020 · 4 comments

Comments

@AndBroCorp
Copy link

AndBroCorp commented Mar 26, 2020

I would love to see a prop to stop truncation of email addresses.

Suggestion:
emailTruncate?: false

@AndBroCorp AndBroCorp changed the title prop to allow truncating of email prop to allow truncation of email Mar 26, 2020
@joshswan
Copy link
Owner

Using truncate={0} will disable link truncation. Or do you want to configure truncation depending on the type of link? If that's the case, my initial inclination is to suggest using renderLink as adding truncateEmail, truncateHashtag, etc. seems a bit much.

Let me know what you think.

@AndBroCorp
Copy link
Author

I was more looking in to type of link adding the ability to disable it for mailto primarily.
Problem i have is that the strings are not static and tend to be different everytime and i found it little bit ugly and confusive with the truncation of email addresses. This idea of turning it off stem primarily from users started to ask why the emails were cut off in the middle reporting it as a bug.

As a side note i can also see a usage of turning it off for hashtags as well.

@joshswan
Copy link
Owner

I'm curious why you don't just want to disable truncation entirely. Is there a type of link that you do want to truncate?

I'm actually considering disabling truncation by default in v5.

@joshswan
Copy link
Owner

v4.0.0 (currently release candidate) disabled truncation by default (use truncate={32} for previous behavior). The truncate function can be imported and combined with renderLink for complete flexibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants