I had to fix some minor things before I was able to work on this, but the bulk of the PR is a workaround for sphinx issue #11021.
The gist of it is that this fixes the javascript domain TypedField and GroupedField to do what the python domain equivalents do--namely set inliner to None before calling Field.make_xref.
@lonnen's work finding the problematic commit in Sphinx was invaluable towards this fix. That made this so much easier than when I looked at it a year ago and bounced off it.
This also pulls in @lonnen's fix from PR #191 because that fixed a couple of tests that weren't working with whatever version of Sphinx I was testing with that was > 4.1.0.
The end result is that sphinx-js tests pass in Python 3.7 through 3.11 with Sphinx 4.10 through 5.3.0.
I thought about different ways to fix the problem. It's tricky because the bit we need to fix isn't very accessible. I tried to make this as minimal, but maintainable, as possible. If the comments are opaque, we should improve them. Future us will want present us to do that.
Pretty sure this fixes #209 and #203. It also replaces #191 and #208.
I had to fix some minor things before I was able to work on this, but the bulk of the PR is a workaround for sphinx issue #11021.
The gist of it is that this fixes the javascript domain
TypedField
andGroupedField
to do what the python domain equivalents do--namely setinliner
toNone
before callingField.make_xref
.@lonnen's work finding the problematic commit in Sphinx was invaluable towards this fix. That made this so much easier than when I looked at it a year ago and bounced off it.
This also pulls in @lonnen's fix from PR #191 because that fixed a couple of tests that weren't working with whatever version of Sphinx I was testing with that was > 4.1.0.
The end result is that sphinx-js tests pass in Python 3.7 through 3.11 with Sphinx 4.10 through 5.3.0.
I thought about different ways to fix the problem. It's tricky because the bit we need to fix isn't very accessible. I tried to make this as minimal, but maintainable, as possible. If the comments are opaque, we should improve them. Future us will want present us to do that.
Pretty sure this fixes #209 and #203. It also replaces #191 and #208.