|
| 1 | +## Contributing |
| 2 | + |
| 3 | +### Test URL params |
| 4 | + |
| 5 | +URL parameters can be used to override the default values of the onboarding flow's configuration. Supported parameters are: |
| 6 | + |
| 7 | +- `locale` - Specifies the language to use for translations. Expects a language code (e.g., `en`, `de`, `fr`). |
| 8 | +- `textLength` - Adjusts the length of translated strings, for testing layout with different text sizes (e.g., `short`, `long`). |
| 9 | +- `display` - Controls which view is rendered. `app` renders the main onboarding flow, `components` renders the component showcase page. |
| 10 | +- `platform` - Overrides the detected platform, for testing platform-specific styling (e.g., `macos`, `windows`). |
| 11 | +- `animation` - Controls animation settings. Can be `none` or `view-transitions` to override the stats widget animation config. Also sets a global `data-animation` attribute on the `<body>` tag. |
| 12 | +- `skip-read` - If present, prevents the mock transport from reading persisted state (like widget configs) from localStorage on initialization. |
| 13 | +- `skip-write` - If present, prevents the mock transport from writing state changes (like widget configs) to localStorage. |
| 14 | +- `pir` - Specifies which Freemium PIR banner mock data to use. Expects a key from `freemiumPIRDataExamples` (e.g., `example1`). |
| 15 | +- `rmf` - Specifies which Remote Messaging Framework (RMF) mock message to display. Expects a key from `rmfDataExamples` (e.g., `example1`, `example2`). |
| 16 | +- `rmf-delay` - If `rmf` is specified, delays sending the RMF message data update by the given number of milliseconds. |
| 17 | +- `update-notification` - Specifies which update notification mock message to display. Expects a key from `updateNotificationExamples`. |
| 18 | +- `update-notification-delay` - If `update-notification` is specified, delays sending the update notification data by the given number of milliseconds. |
| 19 | +- `stats` - Specifies which Privacy Stats mock dataset to use. Expects a key from `privacyStatsMocks` (e.g., `few`, `many`, `willUpdate`, `growing`). |
| 20 | +- `stats-update-count` - When `stats` is set to `willUpdate` or `growing`, limits the number of mock data updates sent via the subscription. |
| 21 | +- `next-steps` - Specifies which "Next Steps" cards to display. Expects one or more IDs from `nextsteps.data.js`. Can be used multiple times (e.g., `?next-steps=card1&next-steps=card2`). |
| 22 | +- `favorites` - Specifies which Favorites mock dataset to use. Expects a key from `favorites.data.js` (e.g., `many`, `none`) or a number to generate that many mock favorites. |
| 23 | +- `favorites.config.expansion` - If set to `expanded`, sets the initial state of the Favorites widget to be expanded. |
| 24 | +- `feed` - Controls which primary feed widget(s) are included in the initial setup. Can be `stats`, `activity`, or `both`. Defaults to `stats`. |
| 25 | +- `customizerDrawer` - If set to `enabled`, enables the Customizer feature flag in the initial setup. |
| 26 | +- `autoOpen` - If `customizerDrawer` is `enabled` and this parameter is `true`, sets the `autoOpen` flag for the customizer drawer in the initial setup. |
| 27 | +- `defaultStyles` - If set to `visual-refresh`, applies specific background color variables (`--default-light-background-color`, `--default-dark-background-color`) to the body. |
| 28 | +- `adBlocking` - If set to `enabled`, configures the Activity and Privacy Stats widgets to indicate that both ads and trackers are blocked. |
0 commit comments