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

Latest (RC) build breaks links in articles #505

Closed
philipp-spiess opened this issue Aug 9, 2018 · 5 comments
Closed

Latest (RC) build breaks links in articles #505

philipp-spiess opened this issue Aug 9, 2018 · 5 comments

Comments

@philipp-spiess
Copy link

I just stumbled over a dead link in one of the RN guides, specifically the link to the Animations guide in: https://facebook.github.io/react-native/docs/animated

After looking into the markdown source the link is correct. It seems like the build process generate version-specific links: https://facebook.github.io/react-native/docs/0.57-RC/animations#animated-api this seems like a good idea however for the current 0.57-RC build, which is served as the default version, the version-specific link results in a 404. Using a previous version works as expected: https://facebook.github.io/react-native/docs/0.56/animations#animated-api

Maybe the current version should not include the version identifier but links to the default guide instead?

@philipp-spiess philipp-spiess changed the title RC build breaks links in articles Latest (RC) build breaks links in articles Aug 9, 2018
@charpeni
Copy link
Contributor

charpeni commented Aug 9, 2018

Thanks for catching this!

@hramos @endiliey It looks like defaultVersionShown is not used once we're on a doc 🤔 .

@endiliey
Copy link
Contributor

endiliey commented Aug 9, 2018

Hi @charpeni, can I clarify the wanted behavior ?

Bug

If the current defaultVersionShown is 0.56.

Wanted Behavior
https://facebook.github.io/react-native/docs/animations#animated-api is v0.56 docs
https://facebook.github.io/react-native/docs/0.57-RC/animations#animated-api is v0.57-RC docs
https://facebook.github.io/react-native/docs/next/animations#animated-api is master docs

Current Behavior
https://facebook.github.io/react-native/docs/animations#animated-api is v0.57-RC docs
https://facebook.github.io/react-native/docs/0.56/animations#animated-api is v0.56 docs
https://facebook.github.io/react-native/docs/next/animations#animated-api is master docs

Edit: Extra notes

It might be possible as well that current behavior is intended.
@JoelMarcey @yangshun which one is the intended behavior ?

@JoelMarcey
Copy link

@charpeni Interesting catch here. Thanks.

@endiliey I believe it was always the intention to have the latest version not have an explicit version in the link. If you choose a defaultVersionShown that is not the latest version, while it is shown by default, it still shows the version number in the link. So I think the current behavior is the one we always wanted. next is always shown for stuff that hasn't been versioned yet.

That said, we have now run into this buggy case. There are two options, I think:

  1. Change the current behavior to the wanted behavior. Does that break anything?
  2. For the latest version, build links to other docs without the version number so that the current behavior can continue to work.

I am open to discussing which one is better.

@endiliey
Copy link
Contributor

endiliey commented Aug 9, 2018

Changing the behavior to no 1 might potentially break someone's else website since it has been the current behavior for quite a while. Since it is intended, fix no 2 shouldn't be too hard. Just a matter on how we build the link.

Edit: See facebook/docusaurus#894

@charpeni
Copy link
Contributor

charpeni commented Aug 9, 2018

Thanks all, I've removed defaultVersionShown for now, let's close this issue.

@charpeni charpeni closed this as completed Aug 9, 2018
risenforward pushed a commit to risenforward/proactive-web that referenced this issue Jan 4, 2019
JackWillie added a commit to JackWillie/react-native-website that referenced this issue Nov 27, 2022
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

No branches or pull requests

4 participants