jbms / sphinx-immaterial

Adaptation of the popular mkdocs-material material design theme to the sphinx documentation system
https://jbms.github.io/sphinx-immaterial/
Other
191 stars 29 forks source link

Merge upstream v8.5.6 #171

Closed 2bndy5 closed 1 year ago

2bndy5 commented 1 year ago

patch_info.zip

This wasn't as painful as I had expected (due to the long time since last update from upstream), or maybe I'm just getting better at it (wishful thinking 🤣 )

Aside from the usual JS tweaks after the merge script did it's thing, I also

I had to tweak the merge script for files that are explicitly excluded (in MKDOCS_EXCLUDE_PATTERNS) and are no longer in the upstream base/target git indexes. There's still room for improvement because I had to manually add the new files from upstream since they weren't in this repo's index. The additions were mostly language translations and a couple features implemented on upstream only (like builtin site feedback and comments). Maybe there's a way to port the new functionality to sphinx builds, but I'm not overly enthusiastic about them (currently content with directing to other sites like github for a more dynamic user interactive experience).

I did discover 1 regression about mermaid graphs and filed an issue upstream (https://github.com/squidfunk/mkdocs-material/issues/4517). We can merge in the simple fix for that later though.

jbms commented 1 year ago

Thanks for doing this upgrade!

2bndy5 commented 1 year ago

If you don't mind I'd like to keep this open for testing and further needed documentation about newer features. I'm about to push changes to docs about customizing the admonition icons. I also intend to patch the hide-feedback and hide-footer meta tags.

jbms commented 1 year ago

If you don't mind I'd like to keep this open for testing and further needed documentation about newer features. I'm about to push changes to docs about customizing the admonition icons. I also intend to patch the hide-feedback and hide-footer meta tags.

Sure, that's why I didn't merge it myself.

2bndy5 commented 1 year ago

I'm now ready to merge this. I'll let it stew for a day so you have another chance to review the documentation changes (namely in customization.rst and admonitions.rst).

2bndy5 commented 1 year ago

The consent feature does work, but it's designed to not trigger on local files viewed in the browser.

I'm not sure how to document the cookies portion of the feature. The JS side seems obvious to me for custom cookies, but I'm not sure the upstream default cookies are enacted.

Here's the config I used to test it:

html_theme_options = {
    "consent": {
        "title": "Welcome!",
        "description": "We don't use cookies, so your privacy is safe here.",
        "actions": ["accept"],
    }
 }

and then manually remove the hidden attr in html because I was viewing it from a file.

I think I'll just add the necessary src code to use it and leave the documentation for another time.

jbms commented 1 year ago

Thanks, looks good to me.

2bndy5 commented 1 year ago

Great, I'll merge this and start/continue squashing open issues. I suppose we could tag this merger, but I'm unreasonably excited about code annotations (despite the implementation's current limits), and want to solve #169 before the next PyPI release.