ChaelCodes / HuntersKeepers

An app to make managing games of Monster of the Week easier.
MIT License
40 stars 26 forks source link

Mobility has random \ #232

Closed ChaelCodes closed 3 years ago

ChaelCodes commented 3 years ago

Describe the bug When we first seeded moves, there was some confusion around how to handle multi-line strings. Because of this, many moves, like Mobility have random \ in them where newlines in the seedfile are. This issue is just for the move Mobility.

To Reproduce Steps to reproduce the behavior:

  1. Go to '/moves'
  2. Find Mobility
  3. Click on Mobility
  4. The description contains random \

Expected behavior The description wraps according to the space it has available and has no \ or newlines in the database.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context https://github.com/ChaelCodes/HuntersKeepers/blob/3b4266980c8f21965f1ee8ffcbadb93801ceddad/db/seeds/playbooks/professional.seeds.rb#L69-L79

cafce25 commented 3 years ago

So I've looked at this and I'm not exactly sure how to resolve this.

Should the database contain:

  1. no newlines and no extra whitespace
  2. both newlines and extra whitespace is ok (like it is in the other moves currently)
  3. (no newlines, extra whitespace is ok)
  4. (newlines but no extra whitespace)

None of these options affect the website since html strips extra whitespace by default.

I think the optimal would be 1 but that would mean for consistency all multiline moves should be adjusted. The other option is 2 for consistency sake since that is how the other moves are done.

I've included 3 and 4 for completenes sake but don't believe they should be considered.

ChaelCodes commented 3 years ago

Hey @cafce25 , the website should contain no newlines or extra whitespace. Eventually all Moves must match this standard, many do already, but this issue only addresses Mobility. If you would like to expand the scope of this issue, I'm fine with that, but I wouldn't mark it as a good first issue.