You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustdoc: copy code button obscures scraped example expand button #129763
Arf indeed. I think code unification will be needed for this feature with the other code blocks to prevent such regressions in the future. Gonna send a fix.
Yes! I'm also planning to only generate them if they don't already exist on hover like the copy button (it is only created after you first hovered the code example), it'll reduce the HTML size quite a lot. I also simplified the HTML a bit (again, smaller). I almost didn't change anything in the scraped example JS code, which is quite nice. I expected more changes to be needed. Well done!
Activity
GuillaumeGomez commentedon Aug 30, 2024
Arf indeed. I think code unification will be needed for this feature with the other code blocks to prevent such regressions in the future. Gonna send a fix.
GuillaumeGomez commentedon Aug 30, 2024
I decided to integrate the buttons with the existing code examples. For now it looks like this:
willcrichton commentedon Aug 30, 2024
That looks great! Do the buttons have the same behavior where they only appear when you hover over the snippet?
GuillaumeGomez commentedon Aug 30, 2024
Yes! I'm also planning to only generate them if they don't already exist on hover like the copy button (it is only created after you first hovered the code example), it'll reduce the HTML size quite a lot. I also simplified the HTML a bit (again, smaller). I almost didn't change anything in the scraped example JS code, which is quite nice. I expected more changes to be needed. Well done!
Rollup merge of rust-lang#129796 - GuillaumeGomez:unify-code-examples…
Rollup merge of rust-lang#129796 - GuillaumeGomez:unify-code-examples…
Rollup merge of rust-lang#129796 - GuillaumeGomez:unify-code-examples…
Rollup merge of rust-lang#129796 - GuillaumeGomez:unify-code-examples…
Rollup merge of rust-lang#129796 - GuillaumeGomez:unify-code-examples…
Unrolled build for rust-lang#129796