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
Upgrade readthedocs theme to v1.0.0 #2585
Conversation
This was moved to a package.json in upstream for version 0.5.0rc1, then upgraded to 3.6.0 in 0.5.2
I've added support in 4c66a1a for
|
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 is all great work, thank you very much!
I have checked all the content of this pull request and it all makes sense and corresponds well to the actual changes in sphinx_rtd_theme.
I have only left small comments.
Now I'm just thinking how we can involve more people to try out this theme to make sure it actually works well on the frontend side.
This is being done in favor of using a css setting for `.wy-side-nav-search` Update config_tests.py
I was strongly considering merging this PR with individual commits, but now I think it's slightly less organized for that. And, the main reason is that the commits contain large files which we may as well omit from storing in the repo. So I think I'll squash. Also did you see that CI is failing? |
I had kindof planned on it being squashed. Most of the commits are really unneeded, but it helped me visualize the changes by going release by release. I did see the CI was failing, but I have no idea why. The error it's giving doesn't make any sense to me because the IP it's giving IS an IPv4 address.... It's also unrelated to any changes I made.
|
It's possible that GitHub Actions upgraded their 3.8 version to a later patch that changed how IP addresses are normalized. See the "changed in" notes in https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address |
OK! Yes, that fails on 'master', reproduced it here: https://github.com/mkdocs/mkdocs/runs/3723870272 and will fix it here: #2587 |
I have not decided when to merge it, and whether it's appropriate for a patch release, but this is definitely accepted. |
I agree, I don't think this is a patch release. There were very few structural changes to the HTML, just a few things added. Mainly for the logo and version in the header, which are both optional additions. Actually the largest change was probably dropping Modernizr and replacing it with html5shiv. I guess, technically, that would have the possibility of breaking changes if someone were using the Modernizr CSS classes in their For #2467, my PR only addresses the readthedocs theme. Would you like me to also add a fix for the mkdocs theme, or would you prefer a separate PR? (I could also take a look at updating that theme as well) What are your thoughts on 3 and 4 above? For 3, It doesn't appear that MkDocs supports comments, but that doesn't necessarily mean that someone couldn't use something like disqus with a override on the comments block? Adding this should be trivial. For 4, That would add this stuff |
Uhh I think there's some misunderstanding here. I was thinking whether it's appropriate for 1.2.3 (patch release) or 1.3.0. So which one do you mean?
You're correct. Definitely a separate PR would be best. Thank you if you take up that work. (3) and (4) I have not evaluated, but definitely let's not do those in this PR |
I think it's a minor release, not a patch release. |
@Sparticuz I would agree that the naming is unfortunate, but my use of it was correct as per https://semver.org/ But regardless, could you clarify your opinion, do you think it's appropriate for 1.2.3? |
Talking for the Theme itself, according to semver, it's a major release. Modernizr got removed, which removes a bunch of css classes that get added by the modernizr javascript. If a user was using those css classes, it would be a breaking change. (Also jquery went from v2 to v3, but I'm not sure jquery adheres to semver) As for the version of MkDocs, it's a decision of whether or not a major update of a dependency justifies a major update of MkDocs itself. I'm not familiar with what Semver says for a breaking change in a dependency. (If we consider the readthedocs theme a dependency of MkDocs) If you wanted, I could add in
which would keep modernizr. I'm not familiar with the local dev server, but maybe a deprecation warning could be added if |
Hmm well sorry for bringing up semver, because MkDocs doesn't actually follow it directly. It's more like "anything goes"."no major breaking changes"."no obvious breaking changes" Anyway, from what you described (and I'm still not fully clear on it), seems like something could reasonably break, so then it's more like 1.3.0. And thanks for suggesting a compatibility option, but uhh let's just rule that out entirely due to the big complexity. |
To explain a little further, modernizr adds a bunch of css classes to the (html or body tag, I forget which). This allows a developer to target a specific browser capability. For example: .no-cssgradients .header {
background: url("images/glossybutton.png");
}
.cssgradients .header {
background-image: linear-gradient(cornflowerblue, rebeccapurple);
} Since modernizer was removed, the
Then yes, I agree with 1.3.0. I believe it's a big enough change to justify a minor version rather than a patch version. |
Thank you very much!! |
You could have tagged the people who created the issues this MR fixes (I am one of them). That way I'd have found out and could have helped testing before it was merged. @Sparticuz thank you so much for all the hard work! Looking forward to the next release. |
Well it's not a problem to try it out now, certainly please do :) |
I don't believe this PR has been released yet. Should be in 1.3 |
I see. Thanks for the clarification. I thought this feature was already released. That being said, is there a tentative release schedule? Can't wait for this feature! <3 |
Sorry, there is no tentative release schedule. |
I've gone through each release we've missed on the readthedocs theme, and updated the mkdocs fork. I've mainly kept to just implementing the changes as able and not rewrote functionality, (see Copyright in mkdocs fork vs upstream).
There are a few features that I've not implemented, due to them missing in our original fork, or just for ease of upgrading our fork:
The ability to use a logo in place of site_name in base.html mkdocs fork, upstream PlannedDone in 3cf33d9Upstream has deprecated and removed the 'isogram' version of google analytics, but I wanted comment here before I also removed it.Keepingisogram
for nowFixes #2538
Fixes #2537
Fixes #2467
Fixes #1763
Fixes #2239