Open jrosdahl opened 2 years ago
Hey @jrosdahl this is very intentional, and I'm not interested in reverting this behavior :) The point is for all anchor links to appear at the top of the page when clicked on, as well as for the ToC on the right-hand side to be able to have all its entries highlighted. I'll be happy to remove the white space if you can provide an alternative solution that satisfies that requirement of course.
Ah! I agree that having an anchor appear at the top of the page when clicked is nice, but I don't think that it's worth the cost of getting a (to me) strangely formatted page, so I guess I'll have to settle for agreeing to disagree about the tradeoffs here. :slightly_smiling_face:
The only solution I can think of is to dynamically insert space at the end when an anchor is specified in the URL, but if I understand your requirements correctly that would only address the first one.
The only solution I can think of is to dynamically insert space at the end when an anchor is specified in the URL, but if I understand your requirements correctly that would only address the first one.
Yes, I'd also rather avoid special casing if possible. To be honest I don't think this solution is particularly unique to hotdoc, but in any case I would also be OK with a patch to address your actual gripe, which is that the End key leads to the end of the page instead of the end of the content, if you can come up with one :)
To be honest I don't think this solution is particularly unique to hotdoc
I might be living in a bubble where all web pages behave the same in this regard. :slightly_smiling_face: If you have any examples of other web sites that use a similar solution I would be happy to check them out.
I would also be OK with a patch to address your actual gripe, which is that the End key leads to the end of the page instead of the end of the content
Right, that's the main gripe, but scrolling down into empty space by other means also feels like a bug to me.
I might be living in a bubble where all web pages behave the same in this regard. slightly_smiling_face If you have any examples of other web sites that use a similar solution I would be happy to check them out.
Not off the top of my head
Right, that's the main gripe, but scrolling down into empty space by other means also feels like a bug to me.
understood
Anyway, thanks for listening to a random passer-by; maybe you can make use of this discussion as a data point in some way. Feel free to close the issue if you feel that there is nothing actionable.
Hi again! Terribly sorry, but I'm back. :slightly_smiling_face:
I just wanted to mention that I've thought some more about the requirement "ToC on the right-hand side to be able to have all its entries highlighted" and I think that the best way to solve it would be to highlight all visible sections in the ToC when scrolled down to the end of the page. See for instance how Asciidoctor does it: https://docs.asciidoctor.org/asciidoc/latest/text/monospace/. That looks really nice to my eyes.
Regarding "all anchor links to appear at the top of the page when clicked on", an alternative to inserting space dynamically could perhaps be to highlight the anchor target in some nice way? I'm not sure what a nice way would be, but here's a crude example of what the bottom part of https://mesonbuild.com/Quick-guide.html#using-meson-as-a-distro-packager could look like with the section header highlighted:
Hey, no problem, I'm not allergic to discussion :) The ToC solution I am not opposed to, the highlighting neither :)
I reckon if the highlighting is subtle enough (ie your example illustration looks a bit too drastic to me, I think some indent + perhaps some extra left-hand side visual aid), we could also make the empty space at the bottom an option, while using the extra CSS rules in either case.
One question, do you think the highlighting should also occur while scrolling down?
I reckon if the highlighting is subtle enough (ie your example illustration looks a bit too drastic to me, I think some indent + perhaps some extra left-hand side visual aid), we could also make the empty space at the bottom an option, while using the extra CSS rules in either case.
OK, sounds good!
One question, do you think the highlighting should also occur while scrolling down?
Do you mean highlighting the "current target" while scrolling? I would spontaneously say no, if I understand you correctly.
Do you mean highlighting the "current target" while scrolling? I would spontaneously say no, if I understand you correctly.
Yes, that's what I meant, I think I agree this shouldn't happen.
In any case, patches welcome :)
:+1:
I would be happy to attempt to come up with a patch. Not sure when or if I will have enough time and motivation to do so, though; I just wanted to say that I haven't forgotten about this.
Hi there!
I was reading the Meson documentation and noticed a systematic bug: when I press the End key to scroll to the last text part of each page I'm left with a screen of empty space instead of the expected text.
However, after some digging I found out that (if I understand correctly) it seems to be intentional: 8db088345ed54a1ae4e7e4443dfac87975b6b653. :slightly_smiling_face: I've never before encountered a site that behaves this way. Would you be interested in considering reverting this to not add empty space at the page end? If yes, I would be happy to submit a PR if you like.