elements icon indicating copy to clipboard operation
elements copied to clipboard

Don't auto-capitalize nav divider text

Open steve-nay-sage opened this issue 3 years ago • 2 comments

Describe the bug

Elements converts TOC divider titles to all upper case. As an API owner and/or technical writer, I would like to control what is capitalized or not in my API documentation. Specifically, don't capitalize my nav divider titles.

To Reproduce

  1. Create a toc.json file for an API project
  2. Include some dividers in the TOC, and use divider titles that are either all lower case or mixed case.
  3. Publish the API. Look at the divider titles.

Expected behavior

The divider titles would appear in the nav exactly the way that I typed them.

Additional context

To anyone with more than a passing familiarity with English, "APIS" looks pretty bad. To create the plural of a word (or acronym), you just add an s (or es) to the end of the word; you don't capitalize the s.

Screenshots image

Those should appear as "Quick Start" and "APIs"

steve-nay-sage avatar Aug 11 '21 23:08 steve-nay-sage

Thanks for mentioning that. Capital headers were indeed intentional to make it stand out, though that's something that could surely be changed or redesigned if needed. @mnaumanali94 what do you think?

mallachari avatar Aug 12 '21 08:08 mallachari

I appreciate you considering this @mallachari, and I understand trying to build the nav UI to represent the hierarchy of information. This is a bit of a stretch, but perhaps Stoplight could consider those users who create a toc.json file as a separate use case from those who don't. Anyone who creates a toc.json file is obviously interested in controlling what gets shown to users of their API, so my suggestion would be that you don't "help" them with that by applying capitalization rules or anything similar. Whatever that category of Stoplight user puts in the toc.json file was done intentionally, so it should appear in the UI just like it was entered.

And "APIS" with a capital S never looks good, so you should fix that for all users.

steve-nay-sage avatar Aug 12 '21 16:08 steve-nay-sage