Fix inline macro wrapping - #25000
Conversation
Currently long contents are not properly rendered, but the lookbook is a great place to keep it for reproduction purposes.
|
Warning Flaky specs
🤖 Ask Copilot to investigateCopy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer. |
Generated by 🚫 Danger |
| can appear in the middle of other text. | ||
| A component commonly used inline is the <%= render(OpPrimer::InlineMacroComponent.new) { |c| c.with_leading_visual_icon(icon: :book); "InlineMacroComponent" } %>. | ||
| It can appear in the middle of other text. | ||
| When <%= render(OpPrimer::InlineMacroComponent.new) { |c| c.with_leading_visual_icon(icon: :book); "it contains a longer sentence it can also" } %> wrap multiple lines without issue. |
There was a problem hiding this comment.
ERBLint doesn't like the ; usage here. I'd prefer to keep it so that the component is visibly inline.
I can add some wrapping inside the ERB, but I'd prefer to not ^^
|
Warning Flaky specs
🤖 Ask Copilot to investigateCopy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer. |
The flex layouting caused issues once the macro needed to flow across multiple lines of text. In extreme cases (very long macro on very short lines) this caused the text to be pushed out of the visible background box.
77f37cc to
2cc8834
Compare
We now fixed this together. The best solution we could come up with was to add a static Alignment is hard... |

The flex layouting caused issues once the macro needed to flow across multiple lines of text. In extreme cases (very long macro on very short lines) this caused the text to be pushed out of the visible background box.
Ticket
https://community.openproject.org/wp/XWI-162