mirror of https://github.com/zulip/zulip.git
hotspots: Add 'type' field to objects in 'hotspots' array.
This commit adds a 'type' field to the objects in 'hotspots' array sent in 'hotspots' events. We have explicitly added this field as we eventually plan to have two type of onboarding steps, 'hotspots' and 'one_time_notice'. This will help clients to easily identify them.
This commit is contained in:
parent
ac8af3d6de
commit
df379b5e86
|
@ -334,6 +334,7 @@ def check_heartbeat(
|
||||||
|
|
||||||
_hotspot = DictType(
|
_hotspot = DictType(
|
||||||
required_keys=[
|
required_keys=[
|
||||||
|
("type", str),
|
||||||
("name", str),
|
("name", str),
|
||||||
("title", str),
|
("title", str),
|
||||||
("description", str),
|
("description", str),
|
||||||
|
|
|
@ -19,6 +19,7 @@ class Hotspot:
|
||||||
|
|
||||||
def to_dict(self, delay: float = 0) -> Dict[str, Union[str, float, bool]]:
|
def to_dict(self, delay: float = 0) -> Dict[str, Union[str, float, bool]]:
|
||||||
return {
|
return {
|
||||||
|
"type": "hotspot",
|
||||||
"name": self.name,
|
"name": self.name,
|
||||||
"title": str(self.title),
|
"title": str(self.title),
|
||||||
"description": str(self.description),
|
"description": str(self.description),
|
||||||
|
|
|
@ -2298,6 +2298,7 @@ paths:
|
||||||
"hotspots":
|
"hotspots":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
"type": "hotspot",
|
||||||
"name": "intro_streams",
|
"name": "intro_streams",
|
||||||
"title": "Catch up on a stream",
|
"title": "Catch up on a stream",
|
||||||
"description": "Messages sent to a stream are seen by everyone subscribed to that stream. Try clicking on one of the stream links below.",
|
"description": "Messages sent to a stream are seen by everyone subscribed to that stream. Try clicking on one of the stream links below.",
|
||||||
|
@ -18557,10 +18558,11 @@ components:
|
||||||
description: |
|
description: |
|
||||||
Dictionary containing details of a single hotspot.
|
Dictionary containing details of a single hotspot.
|
||||||
properties:
|
properties:
|
||||||
delay:
|
type:
|
||||||
type: number
|
type: string
|
||||||
description: |
|
description: |
|
||||||
The delay after which the user should be shown the hotspot.
|
The type of the onboarding step. Valid values are either
|
||||||
|
'hotspot' or 'one_time_notice'.
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -18574,6 +18576,10 @@ components:
|
||||||
description: |
|
description: |
|
||||||
The description of the hotspot, as will be displayed to the
|
The description of the hotspot, as will be displayed to the
|
||||||
user.
|
user.
|
||||||
|
delay:
|
||||||
|
type: number
|
||||||
|
description: |
|
||||||
|
The delay after which the user should be shown the hotspot.
|
||||||
has_trigger:
|
has_trigger:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
|
Loading…
Reference in New Issue