prior-art-archive / priorartarchive.org

Prior Art Archive Site
https://priorartarchive.org
GNU General Public License v2.0
3 stars 1 forks source link

Display a consistent placeholder document title #5

Closed reefdog closed 5 years ago

reefdog commented 5 years ago

Documents without titles display some a placeholder title in various views. Before, this wasn’t centrally stored or generated, so each view (search results, organization profile, document page) generated their own slightly different placeholder title.

Now we generate them centrally with a utility function. However, this needs to be improved and formalized and maybe not even defined as a utility function.

Affects #24

reefdog commented 5 years ago

I'm curious where you think it should live if not the utilities

Theoretically, It'd make more sense to me as an instance method. Like I should be able to do doc.titleOrFallback() or something. But of course we're often dealing with dumb JS objects, not actual model instances.

reefdog commented 5 years ago

@isTravis ah that's a good idea. For now I'll leave it as a utility function since, as you say, it's an established pattern. Thanks all!