skyra-project / discord-components

Discord Webcomponents for real looking messages on the web
https://discord-components.js.org
MIT License
260 stars 41 forks source link

bug: 3 inline then 1 out of line formats differently than Discord #509

Open Chew opened 2 days ago

Chew commented 2 days ago

Is there an existing issue for this?

Description of the bug

I seem to ran into a problem with inline rendering, at least on React.

Here's the code for what I have, for reference. https://github.com/Chew/ChewHelp/blob/master/src/components/mlb/PlanGameCommand.tsx

It renders mostly fine, see my docs.

CleanShot 2024-11-23 at 18 05 38@2x

But, it should look like this:

example

The bottom should span across the three, but only goes up to the first one and stops, causing some rendering issues.

It's very possible I broke something, I followed every guide I could to a tee!

Steps To Reproduce

  1. Make a new embed field wrapper with 3 inline fields and then 1 non-inline field
  2. Observe behavior

Expected behavior

I expected it to look like Discord, with the bottom field spanning all three.

Screenshots

No response

Additional context

No response

favna commented 9 hours ago

Start by removing inline={true} inlineIndex={1} from <DiscordEmbedField fieldTitle="📻 Listen" inline={true} inlineIndex={1}>. The field from your discord bot is also not inline.

I used devtools inspector to make that change on your docs and that fixes the whole embed: -1732623870