Skip to content

Commit

Permalink
Revert "Make format_annotation row based instead of column based"
Browse files Browse the repository at this point in the history
This reverts commit 43844b5.
  • Loading branch information
mtomilov committed Dec 9, 2024
1 parent 266e798 commit 529597d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/slack_annotations/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def _build_annotation_fields(annotation: dict[str, Any]) -> list[dict[str, Any]]
if quote:
fields = [
{"type": "mrkdwn", "text": "*Quote:*"},
{"type": "plain_text", "text": quote or NONE_TEXT},
{
"type": "mrkdwn",
"text": f"*Annotation* (<{incontext_link}|in-context link>):",
},
{"type": "plain_text", "text": quote or NONE_TEXT},
]
else:
fields = [
Expand Down
8 changes: 4 additions & 4 deletions tests/functional/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ def slack_annotations():
},
"fields": [
{"type": "mrkdwn", "text": "*Quote:*"},
{
"type": "plain_text",
"text": "The ability to collaborate effectively is invaluable in today\u2019s interconnected world. Whether in academic or professional settings, tools that streamline communication, enhance content sharing and promote open dialogue are important. Hypothesis is a standout tool in this regard, especially renowned for its capabilities in group annotations and as an online learning tool.",
},
{
"type": "mrkdwn",
"text": "*Annotation* (<https://hyp.is/test_annotation_id_2/web.hypothes.is/blog/step-by-step-guide-to-using-hypothesis-for-collaborative-projects/|in-context link>):",
},
{
"type": "plain_text",
"text": "The ability to collaborate effectively is invaluable in today\u2019s interconnected world. Whether in academic or professional settings, tools that streamline communication, enhance content sharing and promote open dialogue are important. Hypothesis is a standout tool in this regard, especially renowned for its capabilities in group annotations and as an online learning tool.",
},
{"type": "plain_text", "text": "A useful tool!"},
],
},
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/slack_annotations/core_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ def slack_annotations():
},
"fields": [
{"type": "mrkdwn", "text": "*Quote:*"},
{
"type": "plain_text",
"text": "The ability to collaborate effectively is invaluable in today\u2019s interconnected world. Whether in academic or professional settings, tools that streamline communication, enhance content sharing and promote open dialogue are important. Hypothesis is a standout tool in this regard, especially renowned for its capabilities in group annotations and as an online learning tool.",
},
{
"type": "mrkdwn",
"text": "*Annotation* (<https://hyp.is/test_annotation_id_2/web.hypothes.is/blog/step-by-step-guide-to-using-hypothesis-for-collaborative-projects/|in-context link>):",
},
{
"type": "plain_text",
"text": "The ability to collaborate effectively is invaluable in today\u2019s interconnected world. Whether in academic or professional settings, tools that streamline communication, enhance content sharing and promote open dialogue are important. Hypothesis is a standout tool in this regard, especially renowned for its capabilities in group annotations and as an online learning tool.",
},
{"type": "plain_text", "text": "A useful tool!"},
],
},
Expand Down

0 comments on commit 529597d

Please sign in to comment.