Skip to content
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

Search Index anchors point a line too low #112

Closed
zoffixznet opened this issue May 13, 2017 · 10 comments
Closed

Search Index anchors point a line too low #112

zoffixznet opened this issue May 13, 2017 · 10 comments
Assignees

Comments

@zoffixznet
Copy link

For example, if you search for is-approx, the link will lead here; hiding the title of the section.

The same problem exists with glossary, when searching for, say, reify leads to this page, again, with the title of the section hidden.

I believe this is due to the X<> bits being below the title.

@AlexDaniel
Copy link
Member

I believe this is due to the X<> bits being below the title.
Correct, but how can we possible resolve this? I hope there is a way, does anybody have any idea?

@zoffixznet
Copy link
Author

zoffixznet commented Sep 3, 2017

Some suggestions:

  • Put X<> above title
  • Add JS to scroll up a bit
  • Generate bare anchors in HTML a bit above where they actually are
  • Fix the bug in HTML generator so that X<> can be placed into the titles instead of having to be below them

I think the last one is the most desirable, even if most complicated.

@zoffixznet
Copy link
Author

Put X<> above title

Just tried that and it works well.

@AlexDaniel
Copy link
Member

It feels semantically incorrect, but maybe I'm being too picky?

@zoffixznet
Copy link
Author

It'd be better if it worked in titles, but lacking that, feels OK to me semantically and functionally.

@JJ JJ added the good first issue Good for newcomers label Apr 20, 2018
@JJ
Copy link

JJ commented Apr 20, 2018

Titles are a problem. If you index them, sometimes they are simply not indexed. See Raku/doc#1938

JJ referenced this issue in Raku/doc Nov 30, 2018
Refs #1303, but closes #2314. We have simply improved the position of the anchor, but we are not creating a specific page with that URL, since that would have either be hard-coded in the generation or move this function, which is Rakudo specific, somewhere else.
@MorayJ
Copy link

MorayJ commented Oct 1, 2020

This appears to be fixed...or is it a work in progress?

@Altai-man
Copy link
Member

@MorayJ
1)This is not fixed;
2)There is a complete re-design in progress, where this ticket is addressed, so probably not a lot of sense to spend time on it now.

@Altai-man Altai-man self-assigned this Nov 7, 2020
@coke coke removed the good first issue Good for newcomers label Nov 14, 2022
@coke coke transferred this issue from Raku/doc Feb 18, 2023
@finanalyst
Copy link
Collaborator

I have just tried some of the above. I do not understand the issue being raised yet.

There are several issues:

  • Some, but not all, headings are coded in the source as =head1 X<Some indexed heading>. This means that there is indexation in the glossary and in the table of contents. The combination of index and headings does cause complications.
  • The X<> markup creates an anchor which must have a unique id, the =headx also creates an anchor. It is not clear yet how Pod::To::HTML` does this.
  • Several source authors put empty X<> anchors into the text after the heading. This causes a glossary entry with a name like the heading. Hitting that anchor will put the heading above the window.
  • Search input is generated from several sources, and it is not clear from the issue as stated here which of the search elements is being referenced, and hence which source is generating the anchor.
  • There was a major change in the way Headings are rendered in the OgdenWebb template to resolve the issue of them being clickable when they have a =headx X<header> form.

@coke is it possible to make this issue clearer in order to be able to tackle it?

@Altai-man
Copy link
Member

@finanalyst I'll try to clear it up.

This issue is already fixed. :)

In short, it was about anchors on the pages. For example, when you jump to this URL: https://new-raku.finanalyst.org/language/mop.html#WHERE the browser scrolls down so that the anchor of the WHERE header is at the top of the content of the browser window. HOWEVER. Because we have a fixed top header, in "broken" circumstances this ticket appears, the browser would ignore the header, and as a result after the jump the header would "cover" the header. However, CSS is already fixed so that it is not happening, thus closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants