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

Split up TextSection into separate components #14875

Closed
ickshonpe opened this issue Aug 22, 2024 · 2 comments · Fixed by #15857
Closed

Split up TextSection into separate components #14875

ickshonpe opened this issue Aug 22, 2024 · 2 comments · Fixed by #15857
Labels
A-Text Rendering and layout for characters C-Feature A new feature, making something new possible C-Performance A change motivated by improving speed, memory usage or compile times D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@ickshonpe
Copy link
Contributor

What problem does this solve or what need does it fill?

  • More granular change detection. At the moment changing the colour of a text section triggers an unnecessary relayout.
  • Text2d and UI Text have different requirements. UI text needs responsive size support and that might not make sense for Text2d.

What solution would you like?

Following #14572, replace the TextSection and TextStyle types with new components Text, TextFont, TextSize and TextColor.

@ickshonpe ickshonpe added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled A-Text Rendering and layout for characters C-Performance A change motivated by improving speed, memory usage or compile times and removed S-Needs-Triage This issue needs to be labelled labels Aug 22, 2024
@alice-i-cecile
Copy link
Member

This should also slightly increase performance with large amounts of text (more components will fit into each cache line), and makes building theming / style inheritance solutions much easier.

@ickshonpe ickshonpe self-assigned this Aug 22, 2024
@BenjaminBrienen BenjaminBrienen added S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels Jan 7, 2025
@rparrett
Copy link
Contributor

This fixed good enough by #15857?

@ickshonpe ickshonpe removed their assignment Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Text Rendering and layout for characters C-Feature A new feature, making something new possible C-Performance A change motivated by improving speed, memory usage or compile times D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants