Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions proto/decentraland/kernel/apis/restricted_actions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,25 @@ message StopEmoteRequest { }
enum OpenExplorerUiResult {
UNSPECIFIED = 0;
OPENED = 1;
WAS_ALREADY_OPEN = 2; // a fullscreen panel is already open
WAS_ALREADY_OPEN = 2; // the requested panel is already open; other panels may be open too
REJECTED_NOT_CURRENT_SCENE = 3; // the standard restricted-actions current-scene gate rejected the call
REJECTED_FEATURE_DISABLED = 4; // the requested section is hidden by feature flags or client doesn't have that feature
REJECTED_NO_USER_GESTURE = 5; // rejected: the call did not originate from a user gesture
}

message OpenExplorerUiRequest {
decentraland.sdk.components.common.ExplorerUi ui = 1;

// Extension point for future per-panel parameters, as a oneof so each panel gets its
// own optional param message without touching existing fields.
// message MapParams { int32 focus_x = 1; int32 focus_y = 2; }
// oneof params { MapParams map = 10; }
// Echoed back in the events this request produces, so they can be matched to their call.
// Unset means no correlation.
optional uint32 request_id = 2;

message PurchaseParams {
string urn = 1;
}

oneof params {
Comment thread
davidejensen marked this conversation as resolved.
PurchaseParams purchase = 10;
}
}

message OpenExplorerUiResponse {
Expand Down
6 changes: 5 additions & 1 deletion proto/decentraland/sdk/components/common/explorer_ui.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package decentraland.sdk.components.common;

// Identifies which fullscreen explorer panel OpenExplorerUi targets.
// Identifies which explorer panel OpenExplorerUi targets. Panels are not all fullscreen.
// EU_SETTINGS holds 0 so an unset `ui` field defaults to the least-intrusive panel.
enum ExplorerUi {
EU_SETTINGS = 0;
Expand All @@ -11,4 +11,8 @@ enum ExplorerUi {
EU_COMMUNITIES = 4;
EU_PLACES = 5;
EU_EVENTS = 6;
// Opens the item-purchase confirmation modal for the urn in PurchaseParams.
// UiOpened/UiClosed are emitted in PBExplorerUiEventsResult like for every other value;
// the purchase outcome is reported via the dedicated result component (1221).
EU_ITEM_PURCHASE = 7;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
syntax = "proto3";
package decentraland.sdk.components;

import "decentraland/sdk/components/common/id.proto";

option (common.ecs_component_id) = 1221;

// Grow-only value set appended to the scene root entity.
// Reports the outcome of an EU_ITEM_PURCHASE flow triggered via OpenExplorerUi.
message PBExplorerItemPurchaseResult {
Comment thread
davidejensen marked this conversation as resolved.
message Purchased {}
message Dismissed {}
message Failed {}

string urn = 1;
uint32 timestamp = 2; // The scene tick when the event occurred
uint32 request_id = 3; // The OpenExplorerUiRequest.request_id that caused this event; 0 if unset

oneof status {
Purchased purchased = 10;
Dismissed dismissed = 11;
Failed failed = 12;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ import "decentraland/sdk/components/common/explorer_ui.proto";

option (common.ecs_component_id) = 1220;

// PBExplorerUiEventsResult transports the lifecycle events of fullscreen explorer panels — a panel was
// PBExplorerUiEventsResult transports the lifecycle events of explorer UI panels — a panel was
// opened, a panel was closed. It is a grow only value set appended to the scene root entity, so every
// event of a tick is delivered and none overwrites another.
message PBExplorerUiEventsResult {
// Emitted when a fullscreen explorer panel is opened.
// Emitted when an explorer panel is opened. The OpenExplorerUi response carries the same fact,
// but it reaches only the caller; this channel is scene wide.
message UiOpened {}

// Emitted when a fullscreen explorer panel is closed.
// Emitted when an explorer panel is closed.
message UiClosed {}

decentraland.sdk.components.common.ExplorerUi ui = 1; // The panel that the event refers to
uint32 timestamp = 2; // The scene tick when the event occurred
uint32 request_id = 3; // The OpenExplorerUiRequest.request_id that caused this event; 0 if unset

// Extension point, deliberately narrow: a variant belongs here only if it is meaningful for every
// value of `ui`, because `ui` and `event` are independent axes and every combination of the two is
Expand Down
1 change: 1 addition & 0 deletions public/sdk-components.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import public "decentraland/sdk/components/billboard.proto";
import public "decentraland/sdk/components/camera_mode_area.proto";
import public "decentraland/sdk/components/camera_mode.proto";
import public "decentraland/sdk/components/engine_info.proto";
import public "decentraland/sdk/components/explorer_item_purchase_result.proto";
import public "decentraland/sdk/components/explorer_ui_events_result.proto";
import public "decentraland/sdk/components/gltf_container.proto";
import public "decentraland/sdk/components/gltf_node_modifiers.proto";
Expand Down
Loading