-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Rename "Downloads" to "Install" and redesign #2096
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
base: gh-pages
Are you sure you want to change the base?
Conversation
- Add a new style where we display the install instructions as tabs, with a shortcode and CSS - Update aliases - Move existing Windows/Linux/Mac pages to the new style, keeping the content the same Signed-off-by: Julia Evans <[email protected]>
Signed-off-by: Julia Evans <[email protected]>
Signed-off-by: Julia Evans <[email protected]>
Add a script that will update the homepage / sidebar links to the appropriate OS-specific link. This falls back gracefully: if the script doesn't run, you can just go to /install/ and click on the appropriate page. Signed-off-by: Julia Evans <[email protected]>
We already have a "Build from source" page
layouts/partials/sidebar.html
Outdated
<a href="{{ relURL "downloads/logos" }}"{{ if (eq .Params.Subsection "logos") }} class="active"{{ end }}>Logos</a> | ||
</li> | ||
</ul> | ||
<a href="{{ relURL "install" }}"{{ if (eq $section "install") }} class="active"{{ end }}>Install</a> |
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.
I think this is the reason why the Playwright tests fail now...
Error: expect.not.toHaveClass: Error: strict mode violation: getByRole('link', { name: 'All' }) resolved to 2 elements:
1) <a class="install-link" href="http://localhost:5000/install/win">Install</a> aka getByRole('link', { name: 'Install' })
2) <a href="#" data-os="" class="subtle-button gui-os-filter">All</a> aka getByRole('link', { name: 'All', exact: true })
Call log:
- Expect "not toHaveClass" with timeout 5000ms
- waiting for getByRole('link', { name: 'All' })
66 |
67 | const allButton = page.getByRole('link', { name: 'All' })
> 68 | await expect(allButton).not.toHaveClass(/selected/)
| ^
69 |
70 | const thumbnails = page.locator('.gui-thumbnails li:visible')
71 | const count = await thumbnails.count()
at /home/runner/work/git-scm.com/git-scm.com/tests/git-scm.spec.js:68:33
We probably need to change this line:
const allButton = page.getByRole('link', { name: 'All' })
const allButton = page.getByRole('link', { name: 'All', exact: true })
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.
thank you for looking into that, will try that fix!
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.
This looks really good!
This renames "Downloads" to "Install" and redesigns the page to simplify it a lot. You can see it in action here: https://jvns.github.io/git-scm.com/install/win
I'm still not sure where the Logos page should be linked. Maybe in About?
I've designed it as "tabs", where each tab is a separate page. I did it that way for accessibility (though I'm very far from an accessibility expert): the idea is that it would be easier for someone using a screenreader if they don't have to navigate through a bunch of irrelevant content. The
install-header
shortcode is rendered in an awkward way (you have to close someThe Install links on the sidebar and homepage get automatically updated with Javascript to point to the appropriate page.
The Build from Source page is pretty sparse right now, maybe it would be good in the future to point users to instructions for how to build Git from source.
Todos: