-
Notifications
You must be signed in to change notification settings - Fork 25k
Update Edit on GitHub links to point to master #9149
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
Conversation
|
The goal is to get people to send updates to the docs. Can we change the url to point to master instead? |
|
@vjeux sure, we can do that |
|
If you want some inspiration to update it, I really like the way flow displays it (at the very bottom) https://flowtype.org/docs/getting-started.html#_ |
|
PTAL |
|
@hramos updated the pull request. |
|
@hramos updated the pull request. |
|
Link to master is now at the bottom, with a "edit this page on GitHub" CTA |
website/core/Footer.js
Outdated
| var React = require('React'); | ||
|
|
||
| function getGitHubPath(path) { | ||
| return [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems overkill to use an array and join where you could use +
|
I just realized that we have HeaderWithGithub because a same page is combined from different places. For example the Text page http://facebook.github.io/react-native/docs/text.html has 4 different Edit on Github links. I'm not sure we can only have a single one like flow does without bigger thoughts on this. What do you think? |
…he Components autodocs.
|
@hramos updated the pull request. |
|
@hramos updated the pull request. |
|
@vjeux good catch on the headers. I've settled on using a combination of both, which seems to work well IMHO. |
|
@hramos updated the pull request. |
1 similar comment
|
@hramos updated the pull request. |
|
lgtm :) |
| } | ||
|
|
||
| .edit-page-block { | ||
| padding: 5px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use 2 spaces
|
lgtm :) |
|
@hramos updated the pull request. |
|
@facebook-github-bot shipit |
|
I will not rubber stamp and land your change for you @hramos! I can import it for you and you can get your change reviewed by someone though :) |
|
OK fine @facebook-github-bot :) @vjeux can you rubber stamp? |
|
@facebook-github-bot shipit |
|
Thanks for importing. |
Cherry-pick #9149 into 0.31-stable branch
Summary: We've been getting a lot of documentation PRs opened against `0.29-stable`, `0.30-stable`, and so on, instead of `master`. This is because our doc site is also based on RN release cuts, so clicking on the "Edit on GitHub" links on a document will take you to the markdown source for that release branch instead of the latest doc on `master`. See facebook#9095 for an example of such a PR. In this PR we edit the link to say View on GitHub. Though it may not prevent PRs from being opened against a release branch, removing the "Edit" CTA may help in this regard. Closes facebook#9149 Differential Revision: D3664368 Pulled By: vjeux fbshipit-source-id: 395c0813f736bfbe1be4b4fb1182f9060169365d
Summary: We've been getting a lot of documentation PRs opened against `0.29-stable`, `0.30-stable`, and so on, instead of `master`. This is because our doc site is also based on RN release cuts, so clicking on the "Edit on GitHub" links on a document will take you to the markdown source for that release branch instead of the latest doc on `master`. See facebook#9095 for an example of such a PR. In this PR we edit the link to say View on GitHub. Though it may not prevent PRs from being opened against a release branch, removing the "Edit" CTA may help in this regard. Closes facebook#9149 Differential Revision: D3664368 Pulled By: vjeux fbshipit-source-id: 395c0813f736bfbe1be4b4fb1182f9060169365d

We've been getting a lot of documentation PRs opened against
0.29-stable,0.30-stable, and so on, instead ofmaster. This is because our doc site is also based on RN release cuts, so clicking on the "Edit on GitHub" links on a document will take you to the markdown source for that release branch instead of the latest doc onmaster.See #9095 for an example of such a PR.
In this PR we edit the link to say View on GitHub. Though it may not prevent PRs from being opened against a release branch, removing the "Edit" CTA may help in this regard.