Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preserve casing in generated docs page slugs #1052

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bcherry
Copy link
Contributor

@bcherry bcherry commented Dec 17, 2024

right now these get lowercased which makes the links less readable

@bcherry bcherry requested review from Ocupe and lukasIO December 17, 2024 00:30
Copy link

changeset-bot bot commented Dec 17, 2024

🦋 Changeset detected

Latest commit: ade62d4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@livekit/api-documenter Patch
@livekit/components-docs-gen Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 17, 2024

size-limit report 📦

Path Size
LiveKitRoom only 6.05 KB (0%)
LiveKitRoom with VideoConference 29.82 KB (0%)
All exports 36.51 KB (0%)

@bcherry bcherry removed request for Ocupe and lukasIO December 17, 2024 01:03
@bcherry bcherry marked this pull request as draft December 17, 2024 01:03
@bcherry bcherry marked this pull request as ready for review December 17, 2024 22:42
@bcherry bcherry requested review from Ocupe and lukasIO December 17, 2024 22:42
Copy link
Contributor

@Ocupe Ocupe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can understand the motivation, but I don't think the gain is worth the cost (on the docs site) of the change.
This is of course a discussion about tased, but I don't particularly like case sensitive urls and would rather change it to kebab-case if we have to change it at all.

@bcherry
Copy link
Contributor Author

bcherry commented Dec 18, 2024

@Ocupe next.js URLs are already case sensitive (see https://docs.livekit.io/reference/components/react/component/audiotrack/ which works, but https://docs.livekit.io/reference/components/react/component/AUDIOTRACK/ is a 404), this just applies a more appropriate casing.

From what I see, most reference docs maintain casing exactly as is in the original language:

React's own docs keep original casing: https://react.dev/reference/react/useDeferredValue
Python generated docs also keep casing, but its more of a mess anyways: https://docs.livekit.io/python/livekit/agents/stt/fallback_adapter.html#livekit.agents.stt.fallback_adapter.AvailabilityChangedEvent
and typedoc keeps casing too https://docs.livekit.io/client-sdk-js/enums/KeyProviderEvent.html

two exceptions I found are swift/apple, which are all lowercase: https://developer.apple.com/documentation/avfoundation/avplayer/init(playeritem:)

and kotlin/android, which are indeed kebab-case https://docs.livekit.io/components-android/livekit-compose-components/io.livekit.android.compose.state.transcriptions/remember-participant-transcriptions.html

I'm fine with going to kebab case here if that's what people prefer, but I don't love the current all lowercase...

@Ocupe
Copy link
Contributor

Ocupe commented Dec 18, 2024

@Ocupe next.js URLs are already case sensitive (see https://docs.livekit.io/reference/components/react/component/audiotrack/ which works, but https://docs.livekit.io/reference/components/react/component/AUDIOTRACK/ is a 404), this just applies a more appropriate casing.

@bcherry I see my mistake now. I meant to say that I don't like the look of urls with non-uppercase characters. But as I said, that is just my taste.

From what I see, most reference docs maintain casing exactly as is in the original language:

React's own docs keep original casing: https://react.dev/reference/react/useDeferredValue Python generated docs also keep casing, but its more of a mess anyways: https://docs.livekit.io/python/livekit/agents/stt/fallback_adapter.html#livekit.agents.stt.fallback_adapter.AvailabilityChangedEvent and typedoc keeps casing too https://docs.livekit.io/client-sdk-js/enums/KeyProviderEvent.html

two exceptions I found are swift/apple, which are all lowercase: https://developer.apple.com/documentation/avfoundation/avplayer/init(playeritem:)

and kotlin/android, which are indeed kebab-case https://docs.livekit.io/components-android/livekit-compose-components/io.livekit.android.compose.state.transcriptions/remember-participant-transcriptions.html

I'm fine with going to kebab case here if that's what people prefer, but I don't love the current all lowercase...

Thanks for listing some examples from other docs, I appreciate the overview!
My feeling is that most people don't really care about this, so why change it when we have the burden of backwards compatibility on the docs site?
That being said, and because I don't have a strong opinion (just a slight dislike :P), I'll leave the decision up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants