Commit ac332c6
refactor!: significant refactor of message and modal components (#310)
* feat: created general asset for img uses
* feat: export Asset
* feat: rework this func
* feat: renamed to MediaItem (like discord API)
* feat: add MessageComponent and ModalComponent interfaces
* refactor!: replace MessageRowBuilder with ActionRow
* refactor!: replace MessageButton with Button
* refactor: move ComponentType enum inside component.dart file
* feat: add isEmpty getter to ServerVoiceChannel
* refactor!: replace ModalTextInput with TextInput
* refactor!: replace MessageSection with Section
* refactor: update TextDisplay to implement MessageComponent and ModalComponent
* refactor!: replace MessageSeparator with Separator component
* refactor!: replace MessageContainer with Container in MessageBuilder
* refactor!: replace ModalLabel with Label component
* refactor!: move MessageBuilder and ModalBuilder to builder directory
* refactor!: rename MessageGallery to MediaGallery
* refactor!: rename MessageThumbnail to Thumbnail
* refactor!: rename MessageFile to AttachedFile
* refactor: update SelectMenu to implement MessageComponent and ModalComponent
* refactor: update MessageBuilder and ModalBuilder to use specific component types
* refactor: rename methods in MessageBuilder for consistency and clarity
* refactor: rename methods in ModalBuilder for clarity and consistency
* refactor: add factory constructor for MessageBuilder to simplify text initialization
* style: reorganize methods in MessageBuilder for improved clarity and structure
* fix: remove wrong button limit check in MessageBuilder
* fix: enforce button limit in addButtons method of MessageBuilder
* refactor: rename factory method in MediaItem for clarity
* refactor!: improve factory constructor for MediaItem
* feat: improve AttachedFile API
* chore: enforce item count constraints in MediaGallery constructor
* fix: enforce accessory constraints in Section constructor
* feat!: simplify MessageBuilder API and add comprehensive method documentation
- Change addGallery to accept List<MediaItem> directly
- Update addSection to use named parameters like addContainer
- Add detailed documentation for all public methods
- Include practical examples for each method
* refactor: reorder methods in ModalBuilder for improved readability
* fix: correct type for component parameter in addLabel method
* refactor: improve ModalBuilder API
* docs: add documentation and examples in ModalBuilder
* style: reorganize exports in api and events files
* refactor: remove isEmpty getter from ServerVoiceChannel
---------
Co-authored-by: pandaguerrier <[email protected]>1 parent ef22e82 commit ac332c6
File tree
27 files changed
+1183
-284
lines changed- lib
- src
- api/common/components
- builder
- message
- modal
- domains
- common/utils
- components/interactives/components
- infrastructure/internals/datastore/parts
27 files changed
+1183
-284
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
30 | 36 | | |
31 | | - | |
| 37 | + | |
32 | 38 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | | - | |
17 | | - | |
18 | 15 | | |
19 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
0 commit comments