-
-
Notifications
You must be signed in to change notification settings - Fork 477
feat: Modal Selects #2858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: Modal Selects #2858
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor typo
@@ -215,6 +215,7 @@ def __init__(self, *, data: InteractionPayload, state: ConnectionState): | |||
self._from_data(data) | |||
|
|||
def _from_data(self, data: InteractionPayload): | |||
self._raw_data: InteractionPayload = data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbf we might want to pr that to keep it not just for testing lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls
Now fully functional:
Only works in alpha server. Pending docs updates. This should not be merged. |
class Label(Component): | ||
"""Represents a Label used in modals as the top-level component. | ||
|
||
This is a component that holda another component alongside additional text in modals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a component that holda another component alongside additional text in modals. | |
This is a component that allows you to add additional text to another component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No plsplspls keep that one lol
This is what got us into the mess with Action Row though. I think we should implement ui.Label. We can add a helper feature that will wrap it in an empty label if the user does not provide one (if that is even required) |
No, this is an intentional choice to be consistent with my non-breaking approach to CV2. Label will be present in v3 instead. |
Co-authored-by: DA344 <[email protected]> Signed-off-by: Lala Sabathil <[email protected]>
Co-authored-by: Lala Sabathil <[email protected]> Signed-off-by: UK <[email protected]>
@@ -428,6 +437,9 @@ def __init__(self, data: SelectMenuPayload): | |||
self.channel_types: list[ChannelType] = [ | |||
try_enum(ChannelType, ct) for ct in data.get("channel_types", []) | |||
] | |||
self.required: bool | None = data.get( | |||
"required" | |||
) # Currently defaults to False, pending change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending change?
Also why Optional[bool]
defaulting to None
instead of bool
defaulting to False
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because required is only for string selects in modals. it doesn't work in message components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and pending cause advaith is still working on stuff
Co-authored-by: Dorukyum <[email protected]> Signed-off-by: Lala Sabathil <[email protected]>
Summary
Upcoming, only works in alpha server; do not merge.


Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.