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

Show Description Character Limit on Project Submission Page #273

Open
4 tasks
DBNess opened this issue Dec 1, 2014 · 9 comments
Open
4 tasks

Show Description Character Limit on Project Submission Page #273

DBNess opened this issue Dec 1, 2014 · 9 comments

Comments

@DBNess
Copy link
Member

DBNess commented Dec 1, 2014

Description
On the project submission page at https://www.codemontage.com/organizations/new, there's a 255-character limit for the Description that is not reflected to the user at all.

codemontage

Ask
Enforce this length limitation on the frontend so that users get feedback if their descriptions are too long rather than triggering an unseeable database error.

To Do
There are a number of ways to go about doing this. Pick at least one of the following, and we should be good to go.

  • Set a hard html limit on the input.
  • Add a length validation on the Project model.
  • Use the ClientSideValidations gem to set a validation in the frontend.
  • Add a dynamically-updated counter (e.g. 175/255).
@thefenry
Copy link
Contributor

thefenry commented Dec 2, 2014

Hello @DBNess ,

I was wondering what exactly you were looking for. Do you want to just show the character limit, or do you want to be able to keep count of your character and compare to limit? aka: 175 / 255

Also do you want to add an html limit to the input field so that no more that 255 characters are able to be to entered in the input field?

Thanks :)

@DBNess
Copy link
Member Author

DBNess commented Dec 2, 2014

Thanks for asking, @thefenry! I'll defer to @bmartinstudio and @courte on the specifics here, but wanted to point out there's already some support for this in Zurb Foundation, which is installed, and it might make sense to check out Abide framework for mobile-friendly best practices http://foundation.zurb.com/docs/components/abide.html

@thefenry
Copy link
Contributor

thefenry commented Dec 3, 2014

Alright, I will wait for @bmartinstudio or @courte for more of the info. Thanks for the foundation link I will make use of it when I hear from them.

@courte
Copy link
Member

courte commented Dec 31, 2014

Hey, @thefenry, thanks for asking! Sorry for the long delay.

  • Frontend-wise, a hard html limit will get the job done, but I would love to pair that with the optimal UX of the counter you suggested (175/255).
  • On the back end, adding a validation to the project model so an error could be raised above the database level would also be a helpful way to go.

So those are three separate steps to closing this issue. I know it's been a while since your last comment, @thefenry. Let us know if there's a part of this you'd like to take on. Thank you again!

@thefenry
Copy link
Contributor

thefenry commented Jan 2, 2015

Yeah I think I can manage these tasks. I will try to get this in the next day or so.

@thefenry
Copy link
Contributor

I am sorry I have been busy at work and moving. I tried getting this done the other day and I am having a hard time modifying the simple-fields. I cannot figure out how to add a html element after the label and before the input. I read some of the documentation but none of the solutions where working for me. I managed to do it through jquery but it is not very efficient since it does not load this until it finishes loading the page. Any suggestions would be appreciated. Or If anyone would like to take over it let me know.

@courte
Copy link
Member

courte commented Feb 3, 2015

@thefenry - Congrats on the move! I hope you're settled in now.

I appreciate you taking this issue on. If the jQuery option is working - however inefficient - it would be great if you could submit it as a PR. If it doesn't work, then maybe just changing the placeholder would be be a clear marker. Any small step forward is really helpful to us.

Thanks again for taking the time! 😄 🎉

@laramelniker
Copy link

Hi @thefenry , I know it's been a few months so I'd like to take over if you don't mind :) 🐫🐩

@DBNess or @courte , I have a solve for the character limit by using a :maxlength attribute. As for the other aspects of the issue, they will take me a little longer (to learn the codebase and Ruby!) Should I do each of these in separate pull requests?

  • Set a hard html limit on the input. (<-- the one I have ready)
  • Add a length validation on the Project model.
  • Use the ClientSideValidations gem to set a validation in the frontend.
  • Add a dynamically-updated counter (e.g. 175/255).

@thefenry
Copy link
Contributor

thefenry commented May 4, 2015

@laramelniker Yeah definetly go for it. I have been busy with other projects and forgot about this one.

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

4 participants