Skip to content

[$50] Empty message change #483

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

Closed
jmgasper opened this issue Mar 23, 2021 · 11 comments
Closed

[$50] Empty message change #483

jmgasper opened this issue Mar 23, 2021 · 11 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Mar 23, 2021

Current

Current behavior: when a member tries to post something without any content, they receive a “Body is required” message. Doesn’t make much sense to the members.

Screen Shot 2021-03-23 at 6 40 27 pm

Expected

UPDATE error message to Cannot post an empty message and update the look and feel as follows:

Screen Shot 2021-03-23 at 6 40 02 pm

MarvelApp: https://marvelapp.com/prototype/c06bg41/screen/77868363

@jmgasper
Copy link
Collaborator Author

Challenge https://www.topcoder.com/challenges/f9aa7ade-18fb-404a-b62e-a43faf1042dc has been created for this ticket.

This is an automated message for ghostar via Topcoder X

@jmgasper
Copy link
Collaborator Author

Challenge https://www.topcoder.com/challenges/f9aa7ade-18fb-404a-b62e-a43faf1042dc has been assigned to obog.

This is an automated message for ghostar via Topcoder X

@atelomycterus
Copy link
Collaborator

atelomycterus commented Apr 4, 2021

@jmgasper Vanilla generates a message from DB schema if some fields must be not null.
I've implemented the main requirements and added validation on client side. The error message is displayed and the buttons are disabled if body is empty.

  • The Vanilla.Comment.MaxLength parameter is used:
    image

image

  • If body comment length > max comment length:
    image

There are few questions related to this issue.

  • Vanilla trims spaces from a comment before saving it in DB. User types several spaces, auto-save is running in several seconds and the error message is displayed. It is confusing.
    image

So I've implemented the same on the client. Trying to post a comment with spaces:
image

  • What message should be displayed if comment length > max comment length? Vanilla displays the message:
    image

  • Do you want to disable the submit button if comment length > max comment length?

@jmgasper
Copy link
Collaborator Author

jmgasper commented Apr 5, 2021

@atelomycterus - For now, let's just focus on the minimum comment limit. I think the space handling you document is fine.

I'll log something for the max character limit as well, thanks.

@atelomycterus
Copy link
Collaborator

@jmgasper Please apply PRs:
#536
topcoder-platform/forums-topcoder-editor-plugin#18
topcoder-platform/forums-theme#35

Thanks!

Testing

Please clear browser cache before testing.

Adding a new comment:
image

Editing a comment:
image

@jmgasper
Copy link
Collaborator Author

jmgasper commented Apr 5, 2021

Payment task has been updated: https://www.topcoder.com/challenges/f9aa7ade-18fb-404a-b62e-a43faf1042dc
Payments Complete
Winner: obog
Copilot: ghostar
Challenge f9aa7ade-18fb-404a-b62e-a43faf1042dc has been paid and closed.

This is an automated message for ghostar via Topcoder X

@sdgun
Copy link
Collaborator

sdgun commented Apr 6, 2021

@jmgasper This same issue is there with discussions too, are we only fixing this in comments?

image

@jmgasper
Copy link
Collaborator Author

jmgasper commented Apr 6, 2021

@sdgun - Thanks for catching that - I'll log a separate issue.

@sdgun
Copy link
Collaborator

sdgun commented Apr 6, 2021

Verified in Dev with comments(empty/spaces/auto saving) the expected error message is displayed with the red outline. When logged in from a user with upload access, the upload icon disappears when this error is displayed, but it reappears when user enters some text.

Screencast.2021-04-06.mp4

@atelomycterus
Copy link
Collaborator

@sdgun @jmgasper

When logged in from a user with upload access, the upload icon disappears when this error is displayed, but it reappears when user enters some text.

The default message is hidden in the status bar when the error is displayed. Please let me know if it's confusing. I'll fix it.

@sdgun
Copy link
Collaborator

sdgun commented Apr 9, 2021

Verified in production.

image

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