-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
PR: Add support for docs versions #185
Conversation
f35ef87
to
ec9773e
Compare
@dalthviz, please don't forget to update the way our docs are installed in Netlify to check how your work looks there. |
@dalthviz I'm not sure what specifically @ccordoba12 is referring to, but Netlify needs to be set to clone all branches like you did for Travis or only the current branch will show up in the dropdown on Netlify, as you can see in the preview. Not sure how best to do this with Netlify, but I'm sure you do. |
To use
I don't know if that's possible because Netlify is in charge of cloning the repo (users don't control part). |
For that we merged #186 and rebased this (since other PRs like #181 need to use
@CAM-Gerlach I was thinking about that too although, as @ccordoba12 says, I'm unsure if it's possible. I will need to check |
Seems like Netlify builds a detached HEAD of the PRs without remotes: Also thinking a little bit more, maybe having all the versions on the preview isn't actually needed right @CAM-Gerlach @ccordoba12 ? At the end when you are doing a modification you target that to only one version (depending on the base branch the PR sets) and I think Netlify puts your changes and builds that specific branch/version |
13c58e7
to
d23bcf6
Compare
Sure, we can go without that for now. |
I have some comments about the style though:
My proposal (this also changes the border of "Search" a bit): #versions-header {
color: rgba(0,0,0,.65);
font-size: 0.8rem;
text-transform: uppercase;
margin-top: 1.1rem;
} #select-versions {
margin-bottom: 7px;
border: 1px solid rgba(0, 0, 0, 0.15)
font-size: 90%;
color: rgba(0,0,0,.65);
padding: 2px;
} #select-versions, #select-versions option {
width: 98%;
} .form-control {
box-shadow: none;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.15);
height: 54px;
font-size: 18px;
font-weight: 300;
} |
e7f633b
to
1fc9a40
Compare
@ccordoba12 As I've mentioned previously (somewhere... :) ) I've been working on that for a while and will push my changes shortly. It ended up being way more complicated to both do that and also build the current feature/PR branch, because I was having to set the release in conf.py dynamically (in order to also rename the output directories accordingly) and couldn't figure out any way to propagate the right state or env variables all the way through to the sub-build to get it to work reliably cross-platform but I think I've got it solved now. |
0b96354
to
442e8af
Compare
574a08b
to
d6f6470
Compare
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.
Just a few smaller style things, and one code issue. Otherwise, this should be good to go on my end. Thanks!
ci/install.sh
Outdated
pip3 install git+https://github.com/spyder-ide/spyder-docs-sphinx-theme.git@develop_spyder | ||
pip3 install sphinx doctr sphinx-panels sphinx-multiversion | ||
# You can change the command above to use a different version of the theme (but return it to the correct one before merging) | ||
pip3 install git+https://github.com/dalthviz/spyder-docs-sphinx-theme.git@sidebar_widgets |
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.
@dalthviz , @juanis2112 noticed that in Safari, the selector functions, but displays the wrong branch (always the current one) once the page is loaded. In Chrome, we can both confirm that it starts off on the default selection on page load, but within a couple hundred ms is set to the correct one, and in FF it is always correct from when the page first starts to render, but in Safari it says set to the current branch permanently. |
46953a7
to
f2af123
Compare
Co-authored-by: CAM Gerlach <[email protected]>
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.
Apart from the small blink that CAM commented, everything works fine for me. Thanks @dalthviz and @CAM-Gerlach!
@juanis2112 I fixed the "blink" issue with the version selector, and made a few related behind the scenes improvements @dalthviz A few last changes:
|
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.
LGTM @dalthviz , I think this one is ready and everyone has approved. Thanks so much for your work! Can you and @juanis2112 recheck my last changes to fix the "<blink>
" issue, and if everything looks good to both of you, go ahead and merge after merging spyder-ide/spyder-docs-sphinx-theme#33 and unsetting the custom theme branch.
@juanis2112 rechecked and it looks good, so @dalthviz you're free to go ahead with the above, thanks. |
Pull Request Checklist
Description of Changes
Currently only builds local branches that follow the regex in the config (branches with
<number>.<anything>
names andmaster
).NOTE: The theme being installed needs to be changed for the proper repo/branch after spyder-ide/spyder-docs-sphinx-theme#33 is merged
A preview:
Depends on spyder-ide/spyder-docs-sphinx-theme#33
Issue(s) Resolved
Fixes #179