Update resolution note message shortcut instruction (#4482)
# What this PR does
Updates the instruction that pops up when clicking the `Add Resolution
notes` button in Slack with an up-to-date GIF.
## Checklist
- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
show up in the autogenerated release notes.
This commit is contained in:
parent
6008963a04
commit
f47f9c29fd
4 changed files with 9 additions and 36 deletions
|
|
@ -324,6 +324,7 @@ class ResolutionNoteModalStep(AlertGroupActionsMixin, scenario_step.ScenarioStep
|
|||
REQUIRED_PERMISSIONS = [RBACPermission.Permissions.CHATOPS_WRITE]
|
||||
RESOLUTION_NOTE_TEXT_BLOCK_ID = "resolution_note_text"
|
||||
RESOLUTION_NOTE_MESSAGES_MAX_COUNT = 25
|
||||
MESSAGE_SHORTCUT_INSTRUCTION = "You can add thread messages as resolution notes using the message shortcut"
|
||||
|
||||
class ScenarioData(typing.TypedDict):
|
||||
resolution_note_window_action: str
|
||||
|
|
@ -576,29 +577,17 @@ class ResolutionNoteModalStep(AlertGroupActionsMixin, scenario_step.ScenarioStep
|
|||
|
||||
if not blocks:
|
||||
# there aren't any resolution notes yet, display a hint instead
|
||||
link_to_instruction = create_engine_url("static/images/postmortem.gif")
|
||||
blocks = [
|
||||
DIVIDER,
|
||||
typing.cast(
|
||||
Block.Section,
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": ":bulb: You can add a message to the resolution notes via context menu:",
|
||||
},
|
||||
},
|
||||
),
|
||||
typing.cast(
|
||||
Block.Image,
|
||||
{
|
||||
"type": "image",
|
||||
"title": {
|
||||
"type": "plain_text",
|
||||
"text": "Add a resolution note",
|
||||
"text": self.MESSAGE_SHORTCUT_INSTRUCTION,
|
||||
},
|
||||
"image_url": link_to_instruction,
|
||||
"alt_text": "Add to postmortem context menu",
|
||||
"image_url": create_engine_url("static/images/resolution_note.gif"),
|
||||
"alt_text": self.MESSAGE_SHORTCUT_INSTRUCTION,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
@ -606,9 +595,7 @@ class ResolutionNoteModalStep(AlertGroupActionsMixin, scenario_step.ScenarioStep
|
|||
return blocks
|
||||
|
||||
def get_invite_bot_tip_blocks(self, channel: str) -> Block.AnyBlocks:
|
||||
link_to_instruction = create_engine_url("static/images/postmortem.gif")
|
||||
blocks: Block.AnyBlocks = [
|
||||
DIVIDER,
|
||||
return [
|
||||
typing.cast(
|
||||
Block.Context,
|
||||
{
|
||||
|
|
@ -616,15 +603,12 @@ class ResolutionNoteModalStep(AlertGroupActionsMixin, scenario_step.ScenarioStep
|
|||
"elements": [
|
||||
{
|
||||
"type": "mrkdwn",
|
||||
"text": f":bulb: To include messages from thread to resolution note `/invite` Grafana OnCall to "
|
||||
f"<#{channel}>. Or you can add a message via "
|
||||
f"<{link_to_instruction}|context menu>.",
|
||||
"text": f"To enable this feature, `/invite` Grafana OnCall to <#{channel}>.",
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
]
|
||||
return blocks
|
||||
|
||||
|
||||
class ReadEditPostmortemStep(ResolutionNoteModalStep):
|
||||
|
|
|
|||
|
|
@ -27,26 +27,15 @@ def test_get_resolution_notes_blocks_default_if_empty(
|
|||
|
||||
blocks = step.get_resolution_notes_blocks(alert_group, "", False)
|
||||
|
||||
link_to_instruction = create_engine_url("static/images/postmortem.gif")
|
||||
expected_blocks = [
|
||||
{
|
||||
"type": "divider",
|
||||
},
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": ":bulb: You can add a message to the resolution notes via context menu:",
|
||||
},
|
||||
},
|
||||
{
|
||||
"type": "image",
|
||||
"title": {
|
||||
"type": "plain_text",
|
||||
"text": "Add a resolution note",
|
||||
"text": SlackResolutionNoteModalStep.MESSAGE_SHORTCUT_INSTRUCTION,
|
||||
},
|
||||
"image_url": link_to_instruction,
|
||||
"alt_text": "Add to postmortem context menu",
|
||||
"image_url": create_engine_url("static/images/resolution_note.gif"),
|
||||
"alt_text": SlackResolutionNoteModalStep.MESSAGE_SHORTCUT_INSTRUCTION,
|
||||
},
|
||||
]
|
||||
assert blocks == expected_blocks
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 168 KiB |
BIN
engine/static/images/resolution_note.gif
Normal file
BIN
engine/static/images/resolution_note.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 617 KiB |
Loading…
Add table
Reference in a new issue