angular.io icon indicating copy to clipboard operation
angular.io copied to clipboard

flash of unstyled content as page loads the code examples

Open naomiblack opened this issue 8 years ago • 6 comments

See for example https://angular.io/docs/ts/latest/quickstart.html

Can we fix this?

@alexwolfe @wardbell

naomiblack avatar Nov 23 '16 01:11 naomiblack

@naomiblack I can do something to make this less jarring

alexwolfe avatar Dec 04 '16 17:12 alexwolfe

@alexwolfe - ETA?

cc @ericjim @kwalrath

chalin avatar Dec 06 '16 18:12 chalin

@juleskremer is this fixed in the new site?

kwalrath avatar Jul 14 '17 18:07 kwalrath

I'm not familiar with the original issue and don't see the issue in the new site.

juleskremer avatar Jul 14 '17 19:07 juleskremer

Ah, it seems that the thrashing has been considerably reduced; e.g., visit and refresh https://angular.io/guide/dependency-injection.

The main problem that existed before was that the newlines in the code excerpts were ignored until pretty printed. This usually resulted in the height of the code excerpt box changing significantly.

Now, under angular.io, code excerpts are initially presented as if formatted as normal <pre> code (respecting newlines) before it is rapidly pretty printed. So there is still a slight change in height, but the UX is much better than before.

I'll have to investigate what the angular.io solution was. Unless Alex or someone else would be willing to give me a summary of the solution :).

chalin avatar Jul 14 '17 19:07 chalin

Ah, I see what you mean now; the system is entirely new and you can check it out under angular/angular/aio -- Alex wasn't involved so you'd need to spend some time with either Igor, PeteB or maybe Filipe.

juleskremer avatar Jul 14 '17 19:07 juleskremer