mozilla / webmaker-core

React-based core for Webmaker shared across all platforms
https://foundation.mozilla.org/en/artifacts/webmaker/
Mozilla Public License 2.0
64 stars 39 forks source link

Project titles don't persist without a description #994

Closed xmatthewx closed 8 years ago

xmatthewx commented 8 years ago

In 1.6 Beta, you can't change the default title without also adding a description.

  1. Access project settings via Editor or Make view.
  2. Edit title, but not description.
  3. Exit and return to Make view or settings view.
    • Result: title resets to "My Project"
  4. Edit title and add a description
  5. Exit and return to Make view or settings view.
    • Result: title saves properly

Loosely related: After you set a description, you can change it, but not delete all the characters. It doesn't save as an empty string.

cc @gvn @alanmoo

xmatthewx commented 8 years ago

Thumbnails are fixed and regenerated. Last bug before we can release all your work to the world.

ryanwarsaw commented 8 years ago

@xmatthewx I can knock this out, is this the only one left before we can land 1.6.0?

xmatthewx commented 8 years ago

Thanks @ryanwse! There's one other known bug that I'll file now. Otherwise, yes, squashing this would unblock the work everyone did toward this version. Let us know if you have any questions.

xmatthewx commented 8 years ago

This is a regression introduced when we recently added the Description field. Titles previously worked.

ryanwarsaw commented 8 years ago

The cause of this problem originates from api.webmaker.org and how it validates the parameter description. Currently, you can't send an empty string to the API, or it will respond with a 400 status code. This might also happen with titles, however its never been exposed due to its minimum and maximum character requirements.

Specifically, the validation for this route: https://api.webmaker.org/docs?server=https://api.webmaker.org&path=/users/{user}/projects/{project}#PATCH

xmatthewx commented 8 years ago

Good catch. I posted an issue at https://github.com/mozilla/api.webmaker.org/issues/197. I'll leave this open just to track it.

ryanwarsaw commented 8 years ago

@xmatthewx A fix for this was just landed over at api.webmaker.org, this should be good to close!

xmatthewx commented 8 years ago

in the bag :handbag:. done and done!