Skip to content

Commit

Permalink
mvilanova review: address most comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wssheldon committed Jan 5, 2023
1 parent 6eb01bd commit e52edbb
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 71 deletions.
8 changes: 4 additions & 4 deletions src/dispatch/plugins/dispatch_slack/feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def rating_select(
action_id: str = FeedbackNotificationActionIds.rating_select,
block_id: str = FeedbackNotificationBlockIds.rating_select,
initial_option: dict = None,
label: str = "Feedback Rating",
label: str = "Rate your experience",
**kwargs,
):
return static_select_block(
Expand All @@ -48,7 +48,7 @@ def rating_select(
initial_option=initial_option,
label=label,
options=[{"text": r, "value": r} for r in FeedbackRating],
placeholder="Select Rating",
placeholder="Select a rating",
**kwargs,
)

Expand All @@ -66,7 +66,7 @@ def feedback_input(
action_id=action_id,
initial_value=initial_value,
multiline=True,
placeholder="How would you describe your experiance?",
placeholder="How would you describe your experience?",
),
label=label,
**kwargs,
Expand All @@ -80,7 +80,7 @@ def anonymous_checkbox(
label: str = "Check the box if you wish to provide your feedback anonymously",
**kwargs,
):
options = [{"text": "Anonymize my feedbak", "value": "anonymouse"}]
options = [{"text": "Anonymize my feedback", "value": "anonymous"}]
return Input(
block_id=block_id,
element=Checkboxes(options=options, initial_value=initial_value, action_id=action_id),
Expand Down
8 changes: 4 additions & 4 deletions src/dispatch/plugins/dispatch_slack/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class DefaultActionIds(DispatchEnum):


class TimezoneOptions(DispatchEnum):
local = "Local Time (based on your slack profile)"
local = "Local Time (based on your Slack profile)"
utc = "UTC"


Expand Down Expand Up @@ -106,7 +106,7 @@ def hour_picker_input(
label: str = "Hour",
**kwargs,
):
"""Builds a hour picker input."""
"""Builds an hour picker input."""
hours = [{"text": str(h).zfill(2), "value": str(h).zfill(2)} for h in range(0, 24)]
return static_select_block(
action_id=action_id,
Expand Down Expand Up @@ -291,7 +291,7 @@ def incident_priority_select(
project_id: int = None,
**kwargs,
):
"""Creates a incident priority select."""
"""Creates an incident priority select."""
priorities = [
{"text": p.name, "value": p.id}
for p in incident_priority_service.get_all_enabled(
Expand Down Expand Up @@ -453,7 +453,7 @@ def case_severity_select(
project_id: int = None,
**kwargs,
):
"""Creates an case severity select."""
"""Creates a case severity select."""
severities = [
{"text": s.name, "value": s.id}
for s in case_severity_service.get_all_enabled(db_session=db_session, project_id=project_id)
Expand Down
6 changes: 3 additions & 3 deletions src/dispatch/plugins/dispatch_slack/incident/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@


class AddTimelineEventBlockIds(DispatchEnum):
date = "add-timeline-event-input"
date = "add-timeline-event-date"
hour = "add-timeline-event-hour"
minute = "add-timeline-event-minute"
timezone = "add-timeline-event-timezone"


class AddTimelineEventActionIds(DispatchEnum):
date = "add-timeline-event-input"
date = "add-timeline-event-date"
hour = "add-timeline-event-hour"
minute = "add-timeline-event-minute"
timezone = "add-timeline-event-timezone"
Expand All @@ -24,7 +24,7 @@ class TaskNotificationActions(DispatchEnum):


class TaskNotificationActionIds(DispatchEnum):
update_status = "update-task-event"
update_status = "task-notification-update-status"


class TaskNotificationBlockIds(DispatchEnum):
Expand Down
Loading

0 comments on commit e52edbb

Please sign in to comment.