Open irvinlim opened 7 years ago
The message "Contribute, get credited and help other students!" was there in case user get confused with the empty Section.
I can implement it later on, but need to be more specific on how to make those changes.
I was thinking we should just run through the database, find rows where content matches exactly to "Contribute, get credited and help other students!", and replace with empty string. Then, the frontend should check for empty string, and display accordingly. The problem I have with this right now is that the words are too striking red, and I want to style them a bit, which makes it difficult to do.
As for the Some Tips part, we can also do the same thing, find exact matches and replace with empty string. Then the frontend will handle it appropriately. Ideally the tips should only appear once you are in edit mode, instead of viewing mode.
So you are suggesting empty every WikiSection if they are not edited by users, then let the front-end handle the suggestion?
Yes, that's correct
Okay, will write a migration script to do that.
We should not hardcode the "Contribute, get credited and help other students!" message as the wiki content; instead it should be an empty value in the database, and the frontend handles the empty case.
As for the templates with the "Some Tips to write this wiki:" part, those things might change as we go along, so I don't think we should leave in the database as well. If we wanted to, we can have a local JSON which the frontend reads from to suggest such templates.