Skip to content

Conversation

doup
Copy link
Contributor

@doup doup commented Apr 10, 2025

Starting in 0.16 the example code documentation will be exposed as markdown content. We need to update the example template to show that content.

Notes:

  • This PR shows the content conditionally to be compatible with 0.15, once 0.16 is released we can remove the conditionals.
  • Eventually this page could use all the space available and have a better layout for desktop. E.g. maybe the explanation could be on a sidebar.
image

Alternatively I can change this PR to put the content above the tabs, like so:

image

@cart
Copy link
Member

cart commented Apr 25, 2025

I think we should show the example code by default / display the explanation above the code, although I think we need to adjust the styling, as the line height feels too big and the alignment feels off in the screenshot above.

@doup
Copy link
Contributor Author

doup commented Apr 27, 2025

I've changed it so the explanation is above the code. There is some horizontal padding so different texts align.

I won't tweak the line-height since the explanation is using the same media-content style as in the docs/news and I think those look good enough. The thing is that in this case these are two paragraphs, and that's why it looks a little bit weird. As we extend/improve the content it will look much better.

image

@janhohenheim
Copy link
Member

janhohenheim commented May 10, 2025

If you want a more extreme case to test these changes, see the physics in fixed timesteps example, that one has a wall of text of explanations :)

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review Ready for a maintainer to consider for merging label May 10, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 10, 2025
Merged via the queue into bevyengine:main with commit 0c567e4 May 10, 2025
10 checks passed
@doup doup deleted the example-explanation branch May 12, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Examples C-Webdev S-Ready-For-Final-Review Ready for a maintainer to consider for merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants