Add a way to force an inline field onto a new row #3233
Replies: 17 comments 10 replies
-
After messing around with this a bit, this is annoying 😁 Appreciate the note |
Beta Was this translation helpful? Give feedback.
-
Side question, out of interest: has any consideration been given to adopting an open standard to give devs more flexibility over the appearance of embeds? Adaptive Cards looks pretty interesting, especially the latest version which supports templates and, since it's supported by Skype and WebEx Teams, making a multi-platform chat bot would be much easier. |
Beta Was this translation helpful? Give feedback.
-
Why not just implement a 3-wide grid like bootstrap/skeleton.css does, but with less columns? You can then add optional new fields to embeds that let you specify column span. That way you can just stack a list of fields like you would cols in the bootstrap/skeleton system, and it will still arrange itself. All you'd need to supply is a new optional |
Beta Was this translation helpful? Give feedback.
-
I'm not sure span would solve the problem if the maximum number of columns is 3, because you'd have to support non-integer values to have 2 columns with equal width. At which point, you may as well just have a field for specifying the proportion of space the field takes up horizontally (e.g. |
Beta Was this translation helpful? Give feedback.
-
That concept would also work, and was somewhat what I was trying to get at (albeit with poor CSS knowledge) |
Beta Was this translation helpful? Give feedback.
-
I would really prefer the Adaptive Cards solution if they are going to rework the embeds. Developers have been wanting new ways to interactive for a while, like buttons that slack has for example. If I remember correctly, reaction buttons are not a intended use case, so these cards would be a way better solution. |
Beta Was this translation helpful? Give feedback.
-
good time to make use of that |
Beta Was this translation helpful? Give feedback.
-
With the latest blog referring to new interaction features that maybe coming to bots, I would really like to drive home that Adaptive Cards would be an excellent solution. Their formatting options are bountiful with support of way more complex designs with fairly straight forward JSON, even collapsible cards. They not only allow for more customisation in formatting, but allows for more interaction with actions. These actions would really bring Discord's bot support way up there and avoid having to use reactions for everything. |
Beta Was this translation helpful? Give feedback.
-
You can do a hacky fix to do this by applying an "empty field" after the second and (optionally) the fourth entry (to align the four fields vertically). {
name: '\u200B',
value: '\u200B',
inline: true
} Unfortunately the empty spaces might shrink stuff, but if you have small titles/values it shouldn't be much of an issue. |
Beta Was this translation helpful? Give feedback.
-
So has this feature been implemented yet? its been a year |
Beta Was this translation helpful? Give feedback.
-
No news for this feature? |
Beta Was this translation helpful? Give feedback.
-
Couldn't we change the way inline works by making it a line break instead. We could have all the fields default to inline, and then manually specify when the fields should be going to the next line. |
Beta Was this translation helpful? Give feedback.
-
instead of an array full of fields, maybe an array full of rows with fields within it. Old: [
{
name: "field1",
value: "value1",
inline: true
}
] New: [
// Row #1
[
{
name: "field1",
value: "value1",
},
{
name: "field2",
value: "value2",
}
],
// Row #2
[
{
name: "field3",
value: "value3",
},
{
name: "field4",
value: "value4",
}
]
] It may be messier but it gives a whole lot of flexibility on deciding which row gets which field. |
Beta Was this translation helpful? Give feedback.
-
I believe a more elegant solution to the above suggestion, would instead be an optional content object that contains the field's data with no content being essentially a "linebreak"
This allows the discord client to remain responsive and fit things on a single row if able to, while not massively complicating the structure of the json into |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I would also like to contribute that It is difficult to format when I want three rows with two columns each since forcing inline to false means that the field is left by itself. A simple solution would be that inline false means that a particular field becomes column 1 on a new row. Then the following fields can still be columns on that row unless inline is set to false again in which case it will jump to a new row. |
Beta Was this translation helpful? Give feedback.
-
Same issue here, first time doing embeds with bots :D I guess I will have to settle with { name: ' ', value: ' ' }, Which creates a much smaller gap than { name: '\u200B', value: '\u200B' }, Would be nice to have some proper way of doing this with less space wasted. This "feels" like something is incomplete here. EDIT: actually I rather found something I can put for the third field |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Quite a few times I've wanted to have my inline fields be in 2 rows of 2 columns, or a row of 2 columns and a row of 3 columns, but there's no way to specify this in the API. For example (using discord.js):
Discord will render Solo Points, Solo Rank and Team Points on one line, with Team Rank on the next line. I generally try to find creative ways around this, for instance reordering fields or adding a blank 3rd column for each (though this squashes the content up a bit). However, there are times where I can't get such a workaround in.
Can we get some kind of implementation that allows us to specify where inline fields should break? Could be either a new property:
or a different kind of field:
Beta Was this translation helpful? Give feedback.
All reactions