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

name of pet gets too long #55

Closed
redxzeta opened this issue May 24, 2021 · 7 comments · Fixed by #56
Closed

name of pet gets too long #55

redxzeta opened this issue May 24, 2021 · 7 comments · Fixed by #56
Assignees
Labels
bug Something isn't working easy issue is easy for newcomers or beginners good first issue Good for newcomers

Comments

@redxzeta
Copy link
Owner

Some pet names get too long and extend the card height.
Maybe set a max number of characters for the pet name.
Open to suggestions.
image

@redxzeta redxzeta added bug Something isn't working good first issue Good for newcomers easy issue is easy for newcomers or beginners labels May 24, 2021
@SJellen
Copy link
Contributor

SJellen commented May 24, 2021

Screen Shot 2021-05-24 at 2 35 35 PM

Also there is a need to replace some of the character codes with the correct characters. In this case the code is for ' .
The best bet would be to create a function that fixes the special characters and truncates the long names all in one. Then add that to every instance of the pet.name. like ....

<h1>{petNameCleaner(pet.name)}</h1>

I believe that there is also a css truncate option but it wouldn't fix the character code errors.
Screen Shot 2021-05-24 at 2 50 00 PM
css truncate

@redxzeta
Copy link
Owner Author

oh thats a good point

@redxzeta
Copy link
Owner Author

did you want to create this issue or should I

@SJellen
Copy link
Contributor

SJellen commented May 25, 2021

I'll give it a shot. At least I should have the function done quickly. Look for a PR on Wednesday.

@redxzeta
Copy link
Owner Author

are you working on both or just fixing the special characters?

@SJellen
Copy link
Contributor

SJellen commented May 25, 2021

I was going to add them together as a single js function. But if you prefer they can be broken into 2.
A function for the regex and the css fix for the truncating.

@redxzeta
Copy link
Owner Author

Ahh okay thats fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy issue is easy for newcomers or beginners good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants