Skip to content

Commit 9ae1223

Browse files
authored
Merge branch 'main' into patch-4
2 parents 8016879 + a987e22 commit 9ae1223

File tree

13 files changed

+565
-14
lines changed

13 files changed

+565
-14
lines changed

content/common/navigation/monetize/experiences.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ navigation:
1616
path: /production/monetization/game-passes
1717
- title: Developer products
1818
path: /production/monetization/developer-products
19+
- title: Commerce products
20+
path: /production/monetization/commerce-products
1921
- title: Paid access in Robux
2022
path: /production/monetization/paid-access-robux
2123
- title: Paid access in local currency
@@ -37,4 +39,4 @@ navigation:
3739
- title: Search ads
3840
path: /production/promotion/search-ads
3941
- title: Advertising standards
40-
path: /production/promotion/comply-with-advertising-standards
42+
path: /production/promotion/comply-with-advertising-standards
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

content/en-us/production/monetization/commerce-products.md

Lines changed: 309 additions & 0 deletions
Large diffs are not rendered by default.

content/en-us/production/promotion/experience-events.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ All published events also appear in a dedicated **Events** section on the experi
7676

7777
<img src="../../assets/promotion/experience-events/Experience-Page-Promotion.png" width="840" alt="Event promoted on experience's detail page" />
7878

79+
### Roblox charts
80+
81+
The **Trending Events in Experiences** sort in Roblox's [charts](https://www.roblox.com/charts), available globally and across all platforms, can help increase player discovery and participation in your events. This sort shows active events based on the experience's daily active users (DAU), filterable by location and platform.
82+
83+
To be featured in **Trending Events in Experiences**, your event must meet the following criteria:
84+
85+
- An active event that started within the last 7 days.
86+
- Minimum of 1,000 RSVPs.
87+
- Visible to all players (not private).
88+
7989
### Group page
8090

8191
If you create events as an admin for a [group](../../projects/groups.md), the group's events will appear under the **Events** tab on the group page.

content/en-us/reference/engine/classes/CommerceService.yaml

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: CommerceService
22
type: class
33
memory_category: Instances
4-
summary: ''
5-
description: ''
4+
summary: 'Supports real-world purchases that you can bundle with digital benefits.'
5+
description: '`Class.CommerceService` is a service that supports real-world purchases that you can bundle with virtual items. For information on eligibility and implementation, see [Commerce products](../../../production/monetization/commerce-products.md).'
66
code_samples: []
77
inherits:
88
- Instance
@@ -13,8 +13,8 @@ deprecation_message: ''
1313
properties: []
1414
methods:
1515
- name: CommerceService:PromptCommerceProductPurchase
16-
summary: ''
17-
description: ''
16+
summary: 'Prompts a user to purchase a commerce product using the provided `commerceProductId`. Opens a webview that guides the user through the purchasing flow.'
17+
description: 'Prompts a user to purchase a commerce product using the provided `commerceProductId`. Opens a webview that guides the user through the purchasing flow.'
1818
code_samples: []
1919
parameters:
2020
- name: user
@@ -36,7 +36,7 @@ methods:
3636
writeCapabilities: []
3737
- name: CommerceService:PromptRealWorldCommerceBrowser
3838
summary: ''
39-
description: ''
39+
description: 'This is a legacy endpoint that is not meant for use. To open the webview to the purchasing flow for real world commerce, see `Class.CommerceService:PromptCommerceProductPurchase`. For more information, see [Commerce products](../../../production/monetization/commerce-products.md)'
4040
code_samples: []
4141
parameters:
4242
- name: player
@@ -57,8 +57,40 @@ methods:
5757
capabilities: []
5858
writeCapabilities: []
5959
- name: CommerceService:GetCommerceProductInfoAsync
60-
summary: ''
61-
description: ''
60+
summary: 'Retrieves information about the commerce products you are selling in experience.'
61+
description: |
62+
Retrieves information about the products that you are selling and surface them within your experience. How you surface products to your users is entirely up to you.
63+
64+
<table><thead>
65+
<tr>
66+
<th>Name</th>
67+
<th>string</th>
68+
<th>Localized name of of the physical item</th>
69+
</tr></thead>
70+
<tbody>
71+
<tr>
72+
<td>Description</td>
73+
<td>string</td>
74+
<td>Localized description of the physical item</td>
75+
</tr>
76+
<tr>
77+
<td>IconImageAssetId</td>
78+
<td>number</td>
79+
<td>The image asset id of main default image of the physical item</td>
80+
</tr>
81+
<tr>
82+
<td>DisplayPrice</td>
83+
<td>string</td>
84+
<td>Localized price string with currency symbol of the physical item. e.g. “$4.99“</td>
85+
</tr>
86+
<tr>
87+
<td>IsPurchasable</td>
88+
<td>bool</td>
89+
<td>If the item can be added to a merchant checkout session, i.e. item is in stock, or can be backordered</td>
90+
</tr>
91+
</tbody>
92+
</table>
93+
6294
code_samples: []
6395
parameters:
6496
- name: commerceProductId
@@ -77,7 +109,7 @@ methods:
77109
writeCapabilities: []
78110
- name: CommerceService:UserEligibleForRealWorldCommerceAsync
79111
summary: ''
80-
description: ''
112+
description: 'This is a legacy endpoint that is not meant for use. To check if a user is eligible for real world commerce, see `Class.PolicyService.IsEligibleToPurchaseCommerceProduct`. For more information, see [Commerce products](../../../production/monetization/commerce-products.md)'
81113
code_samples: []
82114
parameters: []
83115
returns:
@@ -92,8 +124,12 @@ methods:
92124
writeCapabilities: []
93125
events:
94126
- name: CommerceService.PromptCommerceProductPurchaseFinished
95-
summary: ''
96-
description: ''
127+
summary: 'Fires when commerce purchase webview has closed - not an indicator that a purchase was successful.'
128+
description: |
129+
Use this signal to detect when a user has completed the purchasing flow and the webview has closed to resume gameplay within the experience. **This signal does not indicate a successful purchase**, so do not grant virtual items solely from this signal.
130+
131+
While optional, it is recommended to use this signal to reorient your users on Android, as the commerce purchasing flow will have forced them into portrait mode.
132+
97133
code_samples: []
98134
parameters:
99135
- name: user

content/en-us/reference/engine/classes/PolicyService.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ methods:
101101
<td>When <code>true</code>, the player is allowed to share content using APIs which open external sharing flows such as <code>Class.CaptureService:PromptShareCapture()|PromptShareCapture()</code>.</td>
102102
</tr>
103103
<tr>
104+
<td><code>IsEligibleToPurchaseCommerceProduct</code></td>
105+
<td>Boolean</td>
106+
<td>Any experience that wants to sell <a href="../../../production/monetization/commerce-products.md">commerce products</a>.</td>
107+
<td>When <code>true</code>, the player is eligible to purchase commerce products within an experience.</td>
108+
</tr>
109+
<tr>
104110
<td><code>IsEligibleToPurchaseSubscription</code></td>
105111
<td>Boolean</td>
106112
<td>Any experience that wants to sell subscriptions.</td>
@@ -159,6 +165,7 @@ methods:
159165
client IP geolocation.
160166
code_samples:
161167
- getting-policy-information-for-a-player
168+
- getting-policy-for-a-player-for-commerce-products
162169
parameters:
163170
- name: player
164171
type: Instance

tools/checks/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import {
4444
checkMdxEquality,
4545
isLocaleFile,
4646
outdatedTranslationFiles,
47+
checkVoidTagsHaveNoChildren,
4748
} from './utils/localization.js';
4849
import { Emoji } from './utils/utils.js';
4950
import { deduplicate } from './utils/utils.js';
@@ -267,6 +268,7 @@ try {
267268
config.checkLocalizedContent &&
268269
!isLocaleFile(filePathFromRepoRoot, Locale.EN_US) // skip for English
269270
) {
271+
checkVoidTagsHaveNoChildren(filePathFromRepoRoot);
270272
checkEnglishVersionExists(filePathFromRepoRoot);
271273
await checkMdxEquality(filePathFromRepoRoot, fileContent);
272274
checkFileImportEquality(filePathFromRepoRoot, fileContent);

tools/checks/utils/localization.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import * as fs from 'fs';
2-
import { addToSummaryOfRequirements } from './console.js';
2+
import {
3+
addToSummaryOfRequirements,
4+
addToSummaryOfSuggestions,
5+
} from './console.js';
36
import { Emoji } from './utils.js';
47
import {
58
areEqualComponentDetails,
69
getMdxComponents,
710
isIComponentDetails,
811
isVFileMessage,
12+
validateVoidTagsAreEmpty,
913
} from './unified.js';
1014
import { getNonEditableFilesList } from './files.js';
1115
import { areEqualFileImports, FileImports, getFileImports } from './imports.js';
@@ -85,6 +89,22 @@ export const checkEnglishVersionExists = (filePath: string) => {
8589
}
8690
};
8791

92+
/**
93+
* Check that all void tags have no children
94+
* Avoids React runtime errors like "Error: img is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
95+
* @param filePath - The path to the file to check
96+
*/
97+
export const checkVoidTagsHaveNoChildren = (filePath: string) => {
98+
const fileContent = getCachedContentForFilePath(filePath);
99+
const result = validateVoidTagsAreEmpty(fileContent);
100+
if (result) {
101+
console.log(result);
102+
const message = `${Emoji.NoEntry} Requirement: In ${filePath}, ${result.message}`;
103+
console.log(message);
104+
addToSummaryOfRequirements(message);
105+
}
106+
};
107+
88108
const getCachedContentForFilePath = (filePath: string): string => {
89109
if (!filePathToRawContentMap.has(filePath)) {
90110
filePathToRawContentMap.set(filePath, fs.readFileSync(filePath, 'utf8'));
@@ -173,10 +193,10 @@ export const checkMdxEquality = async (
173193
`${Emoji.WhiteCheckMark} MDX components match ${comparisonMessage}`
174194
);
175195
} else {
176-
const errorMessage = `${Emoji.NoEntry} MDX components do not match ${comparisonMessage}`;
196+
const errorMessage = `${Emoji.Warning} Warning: MDX components do not match ${comparisonMessage}`;
177197
console.log(errorMessage);
178198
outdatedTranslationFiles.push(filePath);
179-
addToSummaryOfRequirements(errorMessage);
199+
addToSummaryOfSuggestions(errorMessage);
180200
}
181201
}
182202
};

0 commit comments

Comments
 (0)