Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/cmd/godoc: results page jumps during rendering #21685
Example page: https://tip.golang.org/search?q=testing
The results initially render with the (IMO) most useful package links,¹ then replace them a short time later with a long list of cross-references.² If you try to click on one of the package links, you're fairly likely to end up on an arbitrarily different page than you intended.
Ideally, the whole page should load instantly. However, if that is not possible, we should structure the page so that it does not jump around as it loads.
referenced this issue
Aug 29, 2017
Ideally, we should make all these decisions server side and send a properly structured data to the client.
I will take a look at it for 1.12.
For the layout itself, there's https://caniuse.com/#feat=multicolumn Despite having good support on paper, it's still kinda buggy. Even when everything's working right it never quite seems to work as well as advertised. It's always hard to say if it will work in a given situation, but, when it does, it works well and is simpler than the alternatives. So, even if it ultimately doesn't work, it's usually worth trying it first.
Nearly got it working. Only slight issue is that there is no notion of minimum column-height. So all elements will fill to all the columns. Therefore, it looks odd if the no. of elements is low.
In this case, it looks good if they are split into 2 columns. To fix this, I can add some heuristics and send an appropriate css class attached to the div from server side. But then, it would require 4 classes in the css file, each for a separate
@jimmyfrasche - Any way to tackle this ?
paging other css wizards too @andybons