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(
|
||||
required_keys=[
|
||||
("type", str),
|
||||
("name", str),
|
||||
("title", str),
|
||||
("description", str),
|
||||
|
|
|
@ -19,6 +19,7 @@ class Hotspot:
|
|||
|
||||
def to_dict(self, delay: float = 0) -> Dict[str, Union[str, float, bool]]:
|
||||
return {
|
||||
"type": "hotspot",
|
||||
"name": self.name,
|
||||
"title": str(self.title),
|
||||
"description": str(self.description),
|
||||
|
|
|
@ -2298,6 +2298,7 @@ paths:
|
|||
"hotspots":
|
||||
[
|
||||
{
|
||||
"type": "hotspot",
|
||||
"name": "intro_streams",
|
||||
"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.",
|
||||
|
@ -18557,10 +18558,11 @@ components:
|
|||
description: |
|
||||
Dictionary containing details of a single hotspot.
|
||||
properties:
|
||||
delay:
|
||||
type: number
|
||||
type:
|
||||
type: string
|
||||
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:
|
||||
type: string
|
||||
description: |
|
||||
|
@ -18574,6 +18576,10 @@ components:
|
|||
description: |
|
||||
The description of the hotspot, as will be displayed to the
|
||||
user.
|
||||
delay:
|
||||
type: number
|
||||
description: |
|
||||
The delay after which the user should be shown the hotspot.
|
||||
has_trigger:
|
||||
type: boolean
|
||||
description: |
|
||||
|
|
Loading…
Reference in New Issue