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

Load more source lines #205

Closed
staabm opened this issue May 18, 2014 · 6 comments
Closed

Load more source lines #205

staabm opened this issue May 18, 2014 · 6 comments

Comments

@staabm
Copy link
Contributor

staabm commented May 18, 2014

Like in github diff views, it would be great if one could load more source lines into the pretty error page

@GrahamCampbell
Copy link
Contributor

We can't do that with ajax. What we'd have to do is send the whole file the first time round, then get js to only show part of it. This could be an issue if the file is very large because we'd be loading a lot into memory.

@staabm
Copy link
Contributor Author

staabm commented May 18, 2014

Right, using ajax would require some machinery (similar to #42).

Maybe we could send some more lines (not all) so a dev could expand 2-3 (or configurable?) times into both directions

@GrahamCampbell
Copy link
Contributor

I like that idea. Maybe if we could expand 50 lines either way or something?

@staabm
Copy link
Contributor Author

staabm commented May 18, 2014

Will give it a try... Maybe I get something prepared on monday

@staabm
Copy link
Contributor Author

staabm commented Jun 5, 2015

I played with this feature a bit, but it is not that easy to implement. I tried reading more lines then initially visible and toggle them using Zeptos' toggle() method, but was mixing up the line numbers.

It felt like prettify always starts the line-no at 1 when the underlying html changes.

Atm I have no further idea how to implement it, without a roundtrip to the server and re-rendering (like github does). But therefore we would need to establish a connection/socket to the client which isn't that easy either.

@denis-sokolov
Copy link
Collaborator

Closing due to inactivity. If anyone wants to work on this, feel free to speak up.

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

3 participants