Closed andrius1 closed 8 years ago
and from app_messages, how we will know, it is App Messages, App messages or app messages? And what exact problems can be caused in git or other environments? Because from how coded is api, I can see none.
Name of category should be stored as a string inside the .txt file, for example:
[ { "categoryName": "App Messages", }, .... there goes snippets ]
but naming is still a "first in a queue" file and naming is related with category name, so this is just a duplication :) Do you have existing issues with current implementation?
Yep, we had problems when doing git merge. One person changed the snippets, other person changed the name of category (App messages -> App Messages), and git created two separate files.
Also, we have a problem, that somehow we have file "Layout elements.txt" and on the categories list it is stored as "Layout Elements". And that works perfectly on localhost, but it doesn't work when you run styleguide on other environment.
First behavior is quite normal and this solution would not resolve issue. About second - lets investigate, how these incorrect entries appeared and maybe this is already fixed. @miezis - maybe you are familiar with this or maybe it is already fixed?
This was not altered a long time. Maybe @andrius1 remembers how did he produce that?
I guess is a matter of file naming good practices. I would vote for no spaces and lower case scenario. In regards of @VaclovasV example, all three names "App Messages", "App messages", "app messages" should be treated as duplicates.
Closing this, reopen if needed.
For example, when I create category and name it "App Messages", styleguide saves database file as "App Messages.txt". Uppercase letters or spaces can cause problems with URL paths on some environments or git.
I think file name should be converted to something like "app_messages.txt".