Skip to content

Commit

Permalink
Fix/long option is truncated with ellipsis (#68)
Browse files Browse the repository at this point in the history
* fix: long option is truncated with ellipsis, fix #52

---------

Co-authored-by: Yaskur <[email protected]>
  • Loading branch information
dyaskur and Yaskur authored Mar 13, 2024
1 parent d227132 commit 5394261
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cards/PollCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export default class PollCard extends BaseCard {
decoratedText: {
bottomLabel: `${progressBar} ${voteCount}`,
text: text,
wrapText: true,
button: voteButton,
},
};
Expand Down
1 change: 1 addition & 0 deletions src/cards/PollDialogCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default class PollDialogCard extends PollCard {
decoratedText: {
'bottomLabel': `${progressBar} ${voteCount}`,
'text': text,
'wrapText': true,
'switchControl': voteSwitch,
},
};
Expand Down
5 changes: 5 additions & 0 deletions tests/json/vote_card.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"decoratedText": {
"bottomLabel": " 0",
"text": "Feather Duster Worm",
"wrapText": true,
"button": {
"text": "vote",
"onClick": {
Expand All @@ -37,6 +38,7 @@
"decoratedText": {
"bottomLabel": " 0",
"text": "Christmas Tree Worm",
"wrapText": true,
"button": {
"text": "vote",
"onClick": {
Expand All @@ -63,6 +65,7 @@
"decoratedText": {
"bottomLabel": "██████████████████ 2",
"text": "Coco Worm",
"wrapText": true,
"button": {
"text": "vote",
"onClick": {
Expand Down Expand Up @@ -94,6 +97,7 @@
"decoratedText": {
"bottomLabel": "██████████████████ 2",
"text": "Bearded Fireworm",
"wrapText": true,
"button": {
"text": "vote",
"onClick": {
Expand Down Expand Up @@ -123,6 +127,7 @@
"decoratedText": {
"bottomLabel": " 0",
"text": "Giant Tube Worm",
"wrapText": true,
"button": {
"text": "vote",
"onClick": {
Expand Down

0 comments on commit 5394261

Please sign in to comment.