-
Notifications
You must be signed in to change notification settings - Fork 758
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
Scopes Window is not working #3777
Comments
They seem to work for me on http://demo.opengrok.org/ and locally with a full reindex from scratch. I've tried using Safari and Chrome. Is the problem persistent across all projects and files or only in a particular file? What browser are you using? Can you try with the newest Chrome? Can you check if you have any warnings/errors in the browser console? |
The Scopes Window works pretty well for me on http://demo.opengrok.org too. In my server, it doesn't work in any project, in Chrome (96.0.4664.45) or Firefox (94.0.2). There're no errors in the browser console: Is there something more I can verify? |
Since the xref contains the I'd suggest to debug the javascript execution by appending |
Thanks for the ideas, I finally could find the root cause. The "scope_on_scroll" function is correctly called, the problem happens in the following highlighted line: It seems that it never finds the scope head and body due to the "header_include" file. If I remove the "header_include" file the "Scopes Window" works correctly. Our "header_include" file is pretty simple:
I don't know what I need to change to fix the problem. |
The problem seems to be the I'll investigate if we can remove the height setting altogether or if it's needed. Thanks for debugging! :) |
The height needs to be there because of the fixed position of the header. You should be able to fix the problem by creating <style>
html.xref #whole_header,
html.history #whole_header,
html.more #whole_header,
html.diff #whole_header {
height: 85px;
}
html.xref #content,
html.diff #content,
html.more #content,
html.history #content {
margin-top: 85px;
}
</style> The We should add a note to https://github.com/oracle/opengrok/wiki/Webapp-configuration#include-files I was also thinking of creating a css var for this which would then make the above override a bit simpler, e.g.: <style>
:root {
--header-height: 85px;
}
</style> |
You are welcome. I'm debating if we should not get rid of the fixed header approach and make just the content scrollable. That way it should be far more flexible. |
Closing as there is a workaround and the proper fix should come with UI overhaul. |
Describe the bug
I'm using OpenGrok 1.7.21 and I just indexed it from scratch (I removed all data directories). The Scopes Window is not working, it's always empty.
To Reproduce
Scroll up and down in some file, the Scope Window is always empty.
Expected behavior
The Scope information should be shown in the Scope Window.
Screenshots
The empty Scope Window:
The scope is correctly shown in the search page:
Additional context
A generated xref file:
The ctags used:
The ctags command executed:
The text was updated successfully, but these errors were encountered: