-
Notifications
You must be signed in to change notification settings - Fork 983
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat[react-gen2]: support for variant containers (#3828)
## Description Adds support for Variant Containers on Gen2 React SDK Jira https://builder-io.atlassian.net/browse/ENG-7676 _Screenshot_ If relevant, add a screenshot or two of the changes you made.
- Loading branch information
1 parent
d0e96d6
commit abe5cba
Showing
41 changed files
with
1,730 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'@builder.io/sdk-solid': patch | ||
--- | ||
|
||
Feat: exports `setClientUserAttributes` helper that can be used to set and update Builder's user attributes cookie. This cookie is used by Builder's Personalization Containers to decide which variant to render. | ||
|
||
Usage example: | ||
|
||
```ts | ||
import { setClientUserAttributes } from '@builder.io/sdk-solid'; | ||
|
||
setClientUserAttributes({ | ||
device: 'tablet', | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'@builder.io/sdk-svelte': patch | ||
--- | ||
|
||
Feat: exports `setClientUserAttributes` helper that can be used to set and update Builder's user attributes cookie. This cookie is used by Builder's Personalization Containers to decide which variant to render. | ||
|
||
Usage example: | ||
|
||
```ts | ||
import { setClientUserAttributes } from '@builder.io/sdk-svelte'; | ||
|
||
setClientUserAttributes({ | ||
device: 'tablet', | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'@builder.io/sdk-vue': patch | ||
--- | ||
|
||
Feat: exports `setClientUserAttributes` helper that can be used to set and update Builder's user attributes cookie. This cookie is used by Builder's Personalization Containers to decide which variant to render. | ||
|
||
Usage example: | ||
|
||
```ts | ||
import { setClientUserAttributes } from '@builder.io/sdk-vue'; | ||
|
||
setClientUserAttributes({ | ||
device: 'tablet', | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'@builder.io/sdk-angular': patch | ||
--- | ||
|
||
Feat: exports `setClientUserAttributes` helper that can be used to set and update Builder's user attributes cookie. This cookie is used by Builder's Personalization Containers to decide which variant to render. | ||
|
||
Usage example: | ||
|
||
```ts | ||
import { setClientUserAttributes } from '@builder.io/sdk-angular'; | ||
|
||
setClientUserAttributes({ | ||
device: 'tablet', | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'@builder.io/sdk-react-native': patch | ||
--- | ||
|
||
Feat: exports `setClientUserAttributes` helper that can be used to set and update Builder's user attributes cookie. This cookie is used by Builder's Personalization Containers to decide which variant to render. | ||
|
||
Usage example: | ||
|
||
```ts | ||
import { setClientUserAttributes } from '@builder.io/sdk-react-native'; | ||
|
||
setClientUserAttributes({ | ||
device: 'tablet', | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'@builder.io/sdk-qwik': patch | ||
--- | ||
|
||
Feat: exports `setClientUserAttributes` helper that can be used to set and update Builder's user attributes cookie. This cookie is used by Builder's Personalization Containers to decide which variant to render. | ||
|
||
Usage example: | ||
|
||
```ts | ||
import { setClientUserAttributes } from '@builder.io/sdk-qwik'; | ||
|
||
setClientUserAttributes({ | ||
device: 'tablet', | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'@builder.io/sdk-react': patch | ||
--- | ||
|
||
Feat: exports `setClientUserAttributes` helper that can be used to set and update Builder's user attributes cookie. This cookie is used by Builder's Personalization Containers to decide which variant to render. | ||
|
||
Usage example: | ||
|
||
```ts | ||
import { setClientUserAttributes } from '@builder.io/sdk-react'; | ||
|
||
setClientUserAttributes({ | ||
device: 'tablet', | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'@builder.io/sdk-react-nextjs': patch | ||
--- | ||
|
||
Feat: exports `setClientUserAttributes` helper that can be used to set and update Builder's user attributes cookie. This cookie is used by Builder's Personalization Containers to decide which variant to render. | ||
|
||
Usage example: | ||
|
||
```ts | ||
import { setClientUserAttributes } from '@builder.io/sdk-react-nextjs'; | ||
|
||
setClientUserAttributes({ | ||
device: 'tablet', | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@builder.io/react': patch | ||
--- | ||
|
||
Fix: hydration mismatch error and reactivity of Personalization Containers when `userAttributes` cookie value is updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@builder.io/sdk-react': patch | ||
--- | ||
|
||
Feat: support of Variant Containers or Block level personalization |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const path = require('path'); | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
experimental: { | ||
externalDir: true, | ||
}, | ||
webpack: config => { | ||
config.resolve.alias['react'] = path.resolve(__dirname, './node_modules/react'); | ||
return config; | ||
}, | ||
}; | ||
|
||
module.exports = nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.