Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve keys formatting in "About this track" #1148
I can't fit all the metadata I have into facets, so I pick the important ones, and want the user to access the rest in "About this track". Unfortunately some of the data there comes out mangled. I found that it happens in this code here, and changed it. I am aware of
BTW I had doubts about trying to improve camel case keys with
after I realised it's not backwards compatible - it might break somebody's fmtDetailField_* if they named a keys in camel case, and also set a fmtDetailField_$key.
Less ambitious behaviour of "ucfirst if the word appears to be all lowercase" instead of "ucfirst everything" is unlikely to break keys that are not in lowercase, and has almost all of the benefit: the code doesn't destroy information any more, and any camel case properties can be renamed in the trackSelector.renameFacets.
Actually I only made my keys camel_case because documentation about faceted track selector insisted on the keys being in lowercase and I didn't know why. Maybe they have to be lowercase, but spaces are okay? What format is actually suggested for them?
referenced this pull request
Aug 1, 2018
@cmdcolin I have tried removing the width property on a large grid. It did something reasonable: the elements were
This looks pretty good IMO.
It does look like your trackList.json is very large though, almost 9 MB. Might be all that metadata? Or just many many tracks...in any case you might want gzip enabled on your servers :)
I guess it might be interesting if the trackMetadata didn't mangle the keys (presumably, mostly by lower casing them) but I think this PR is good to go