-
Notifications
You must be signed in to change notification settings - Fork 0
feat: dynamic directory title and address converted to slots #1036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e21f0cb
updated files
rkeerthient 86286b8
Merge remote-tracking branch 'origin/main' into OPAQF-60
rkeerthient 942ce24
updated title id
rkeerthient 7bb240d
updated test case
rkeerthient 88a1d73
docs: auto-generate component documentation
github-actions[bot] 50dffcb
Update component screenshots for visual-editor
github-actions[bot] 04e4335
guarded migration
rkeerthient b836e8e
removed hideCountry prop and updated migraton code
rkeerthient 8e6ea1c
Merge remote-tracking branch 'origin/main' into OPAQF-60 and updated …
rkeerthient 24ded16
docs: auto-generate component documentation
github-actions[bot] 71fedb6
Update component screenshots for visual-editor
github-actions[bot] 75d69ce
Update component screenshots for visual-editor
github-actions[bot] 277f677
Update component screenshots for visual-editor
github-actions[bot] 8ab6e98
updated version in default layout
rkeerthient 5448f27
updated layout data
rkeerthient File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
85 changes: 85 additions & 0 deletions
85
...tor/src/components/migrations/0058_dynamic_directory_title_binding_and_slotify_address.ts
This file contains hidden or 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,85 @@ | ||
| import { Migration } from "../../utils/migrate.ts"; | ||
|
|
||
| export const fixDirectoryTitleBindingAndSlotifyAddress: Migration = { | ||
| DirectoryCard: { | ||
| action: "updated", | ||
| propTransformation: (props) => { | ||
| if (props.slots?.AddressSlot?.length) { | ||
| return props; | ||
| } | ||
| return { | ||
| ...props, | ||
| slots: { | ||
| ...props.slots, | ||
| AddressSlot: [ | ||
| { | ||
| type: "AddressSlot", | ||
| props: { | ||
| data: { | ||
| address: { | ||
| constantValue: { | ||
| line1: "", | ||
| city: "", | ||
| postalCode: "", | ||
| countryCode: "", | ||
| }, | ||
| field: "", | ||
| }, | ||
| }, | ||
| styles: { | ||
| showGetDirectionsLink: false, | ||
| ctaVariant: "link", | ||
| }, | ||
| parentData: { | ||
| field: "profile.address", | ||
| address: props.parentData?.profile?.address, | ||
| }, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }; | ||
| }, | ||
| }, | ||
| Directory: { | ||
| action: "updated", | ||
| propTransformation: (props) => { | ||
| const existingTitle = props.slots?.TitleSlot?.[0]; | ||
| if ( | ||
| existingTitle?.type === "HeadingTextSlot" && | ||
| existingTitle.props?.data?.text?.field !== "name" | ||
| ) { | ||
| return props; | ||
| } | ||
| if (props.slots?.TitleSlot?.length) { | ||
| return props; | ||
| } | ||
|
|
||
| return { | ||
| ...props, | ||
| slots: { | ||
| ...props.slots, | ||
| TitleSlot: [ | ||
| { | ||
| type: "HeadingTextSlot", | ||
| props: { | ||
| id: `${props.id}-TitleSlot`, | ||
| data: { | ||
| text: { | ||
| constantValue: { | ||
| en: "", | ||
| hasLocalizedValue: "true", | ||
| }, | ||
| constantValueEnabled: false, | ||
| field: "name", | ||
| }, | ||
| }, | ||
| styles: { level: 2, align: "center" }, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }; | ||
| }, | ||
| }, | ||
| }; | ||
This file contains hidden or 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
Binary file modified
BIN
+1.71 KB
(100%)
...g/screenshots/Directory/[desktop] default props - city list - document data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.86 KB
(100%)
...enshots/Directory/[desktop] version 18 with cityDocument and siteName field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.7 KB
(100%)
...hots/Directory/[desktop] version 40 with cityDocument and non-default props.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+80.2 KB
...rectory/[desktop] version 58 - Slotified Address with showGetDirectionsLink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.81 KB
(100%)
...ts/testing/screenshots/Directory/[desktop] version 8 - city - default props.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.8 KB
(100%)
...eenshots/Directory/[desktop] version 8 - directory card - non-default props.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.35 KB
(100%)
...ng/screenshots/Directory/[mobile] default props - city list - document data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.89 KB
(100%)
...eenshots/Directory/[mobile] version 18 with cityDocument and siteName field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.41 KB
(100%)
...shots/Directory/[mobile] version 40 with cityDocument and non-default props.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+94.9 KB
...irectory/[mobile] version 58 - Slotified Address with showGetDirectionsLink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.61 KB
(100%)
...nts/testing/screenshots/Directory/[mobile] version 8 - city - default props.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.64 KB
(100%)
...reenshots/Directory/[mobile] version 8 - directory card - non-default props.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+845 Bytes
(100%)
...ng/screenshots/Directory/[tablet] default props - city list - document data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+901 Bytes
(100%)
...eenshots/Directory/[tablet] version 18 with cityDocument and siteName field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+850 Bytes
(100%)
...shots/Directory/[tablet] version 40 with cityDocument and non-default props.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47.9 KB
...irectory/[tablet] version 58 - Slotified Address with showGetDirectionsLink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+984 Bytes
(100%)
...nts/testing/screenshots/Directory/[tablet] version 8 - city - default props.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+982 Bytes
(100%)
...reenshots/Directory/[tablet] version 8 - directory card - non-default props.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4 Bytes
(100%)
.../screenshots/Locator/[desktop] version 24 with filters (after interactions).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.