Skip to content

Commit

Permalink
Add initial Adaptive Card Table support
Browse files Browse the repository at this point in the history
OVERVIEW

Add early implementation of Adaptive Card Table support.

CHANGES

- Expand base/shared Element type with fields specific to the
  Table type
- Refresh documentation for Column type to note that it serves a
  dual role
  - member of a ColumnSet
  - member of a Table (TableColumnDefinition)
- Add new types specific to tables
- Examples
  - add example of manually creating a table
  - add example of creating a table with headers
  - add example of creating a table of unordered "grid" values
- README
  - Add references to new examples
  - Add Table element documentation reference

LIMITATIONS

Support for Adaptive Card Table elements is new. There are likely
sharp edges and missing support. Feedback is welcome.

REFERENCES

- refs GH-205
- https://adaptivecards.io/explorer/Table.html
  • Loading branch information
atc0005 committed Jun 9, 2023
1 parent b820005 commit 800fc1f
Show file tree
Hide file tree
Showing 6 changed files with 1,297 additions and 60 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ A package to send messages to a Microsoft Teams channel.
- [Examples](#examples)
- [Basic](#basic)
- [User Mention](#user-mention)
- [Tables](#tables)
- [Set custom user agent](#set-custom-user-agent)
- [Add an Action](#add-an-action)
- [Disable webhook URL prefix validation](#disable-webhook-url-prefix-validation)
Expand Down Expand Up @@ -201,6 +202,15 @@ is not available in the legacy `MessageCard` card format.
- File: [user-mention-verbose](./examples/adaptivecard/user-mention-verbose/main.go)
- this example does not necessarily reflect an optimal implementation

#### Tables

These examples illustrates the use of a [`Table`][adaptivecard-table]. This
feature is not available in the legacy `MessageCard` card format.

- File: [table-manually-created](./examples/adaptivecard/table-manually-created/main.go)
- File: [table-unordered-grid](./examples/adaptivecard/table-unordered-grid/main.go)
- File: [table-with-headers](./examples/adaptivecard/table-with-headers/main.go)

#### Set custom user agent

This example illustrates setting a custom user agent.
Expand Down Expand Up @@ -280,3 +290,4 @@ using either this library or the original project.
[adaptivecard-ref]: <https://adaptivecards.io/explorer>
[adaptivecard-ref-actions]: <https://docs.microsoft.com/en-us/adaptive-cards/authoring-cards/getting-started>
[adaptivecard-user-mentions]: <https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format#mention-support-within-adaptive-cards>
[adaptivecard-table]: <https://adaptivecards.io/explorer/Table.html>
Loading

0 comments on commit 800fc1f

Please sign in to comment.