Skip to content

Support linking to a specific line #203

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

Merged
merged 2 commits into from
Sep 27, 2019
Merged

Support linking to a specific line #203

merged 2 commits into from
Sep 27, 2019

Conversation

La0
Copy link
Contributor

@La0 La0 commented Sep 27, 2019

It was a bit more complicated than I initially thought, as we cannot use the hash mechanism (we are already using it for navigation !).
So i intercept click on a.scroll links, and directly update the display, without triggering a data reload that would reset the full display.

I also cleaned up the display method a bit, by using dedicated views for the directory & file views (which makes more sense). It's in the first commit, and could be in a separate PR if needed.

Demo on the current build

@La0 La0 added enhancement New feature or request frontend Javascript Frontend labels Sep 27, 2019
@La0 La0 requested review from marco-c and calixteman September 27, 2019 12:22
@La0 La0 self-assigned this Sep 27, 2019
Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty complex for such a little thing, but it works pretty well.
Thanks

@La0
Copy link
Contributor Author

La0 commented Sep 27, 2019

That's the joy of playing with Vanilla.Js 😈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Javascript Frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants