Comments (13)
What determines the order of the tabs?
Here's the HTML for the tabs: https://github.com/github/docs/blob/5395b9371056e7c8eb9b649e5c1de4de80613155/includes/article.html#L31:L40
Here's the JavaScript file that dynamically updates the tabs and the displayed content on page load: https://github.com/github/docs/blob/main/javascripts/display-platform-specific-content.js
Here's the file where tests should be added for any changes to the existing platform-switching behavior: https://github.com/github/docs/blob/main/tests/browser/browser.js (Note that the platform-switching feature was added before we added this Puppeteer headless browser testing capability, so there are no existing browser tests for the current platform-switching functionality)
I hope that helps, @Simran-B!
from docs.
Thanks @zeke for all the information! I created a PR: #1917
Currently, the default tab is Mac.
This isn't the case (anymore?), the default tab is based on the user's operating system, which falls back to Mac if it's none of the supported platforms.
from docs.
Yup, see the documentation about the defaultPlatform
frontmatter here: https://github.com/github/docs/blob/main/content/README.md#defaultplatform
from docs.
@jenschelkopf, while I don't disagree, I don't think there is any way to set a default tab. @github/content-platform-engineering, I've looked in our internal docs but didn't see much information on the context switcher--can y'all confirm that there is technically no way to do this?
If not, we could change the order of the tabs to where linux is first, if no one minds the switcher OS order won't be consistent in our docs. Adding this to our bug fix board 😄
from docs.
This seems like reasonable request to me. We could consider introduce a new frontmatter value like defaultPlatform
or similar, which would allow content authors to specify this on any articles that need it.
from docs.
I believe this is an engineering issue rather than content (fwiw, it looks like Linux does appear first in the content)
from docs.
this is an engineering issue
agreed 👍🏼
from docs.
it looks like Linux does appear first in the content
What determines the order of the tabs? If it's not the content, and if it's also not sorted alphabetically (it's Mac, Windows, Linux in above screenshot), then how does the current tab order come about?
from docs.
This issue is stale because it has been open 60 days with no activity.
from docs.
IMO, the tab should not default to the user's OS. The user's OS is not related to the user's runner type. Linux is by far the most common runner type, so we should default to Linux always.
from docs.
I agree that it does not make sense for runners, but what about pages like this one?
https://docs.github.com/en/free-pro-team@latest/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop
For the actions docs, Linux can be set as defaultPlatform with my PR on a per page basis.
from docs.
This issue is stale because it has been open 60 days with no activity.
from docs.
It looks like the work for this one was completed in #1917, so I'm going to close this out!
from docs.
Related Issues (20)
- harmonize permissions required for circleci migrator HOT 1
- Outdated documentation about $$ around math expression HOT 13
- Missing information in "Generate Installation Access Token" HOT 3
- "Reporting an issue or pull request", the documented feature does not exist on GitHub HOT 9
- .github/ISSUE_TEMPLATE/config.yml. HOT 2
- The current info on default community health files are not detailed enough to precedence of some of the community files HOT 3
- ডকুমেন্টেশন HOT 2
- docs.github.com HOT 1
- Clarification needed for pushing changes to a feature branch with git push HOT 3
- Formatting Error on Chinese 'Searching for Repositories' Page HOT 4
- Confusing verification step in "Installing Git Large File Storage" HOT 9
- OIDC examples don't pin external actions (& don't declare them) HOT 5
- `Repository limits` - `Commit listings limits` says `Github.com` HOT 2
- جووكر HOT 2
- Jekyll GFM processor claims it "will always match the results you see on GitHub" HOT 2
- Explicitly state that at least one job is required for a workflow HOT 3
- Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the [contributing guidelines](https://docs.github.com/en/contributing). HOT 1
- Mismatching types descriptions HOT 4
- Online Casino Philippines HOT 1
- [maintainer edit for spammy content] HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.