Skip to content

Modals

Modals are pop-up windows, primarily used for collecting data from users.

This module is kept only for backwards compatibility, modals have been largely subsumed as a subtype of view.

See: https://api.slack.com/surfaces/modals

Modal

Bases: ModalView

Kept for backwards compatibility - see ModalView

Source code in slackblocks/modals.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Modal(ModalView):
    """
    Kept for backwards compatibility - see
        [`ModalView`](/slackblocks/latest/reference/views/#views.ModalView)
    """

    def __repr__(self) -> str:
        return dumps(self._resolve(), indent=4)

    def to_dict(self) -> Dict[str, Any]:
        return self._resolve()

    def json(self) -> str:
        return dumps(self._resolve(), indent=4)

options: show_bases: false