-
Notifications
You must be signed in to change notification settings - Fork 153
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
Braze app [INTEG-2348] #9590
Braze app [INTEG-2348] #9590
Conversation
* adding main structure to configscreen * refactor: generic splitter * updating labels * adding configuration parameters on app instalation * adding tests fot the configuration screen * adding test to check if the link manage api key renders * adding test to check if the api key is set correctly * Fixing tests * removing comments * running prettier * adding placeholder --------- Co-authored-by: francobanfi <franco.banfi@external.contentful.com>
* Assemble graphql query * Fix type for contentful-resolve-response * Refactor graphql query assembly * test for simple liquid tag generation * multiple liquid tag generation * test for asset liquid tag generation * new test for location and list of texts + refactor on basic field liquid tag generation test * removing test for list text * refactor to use a utils constant to generate location lat and long liquid tag * initial structure for polimorfic fields * Adding simple references and asset * Braze integ 2403 (#9545) * Display example response * Fix linter * Adding arrays of entries * refactor on the field type to generate the array liquid tags * new test and implementation for text array liquid tag generation * extracting methods refactor * skiping generation of rich text liquid tag * liquid tags for basic fields --------- Revert "addressing array types" This reverts commit d57c5e9. addressing array types Co-Authored-By: francobanfi <franco.banfi@external.contentful.com> Co-Authored-By: Juli Rossi <juliana.rossi@10pines.com>
* addressing array types removing todo Revert "addressing array types" This reverts commit d57c5e9. addressing array types * test for nested entry references * array for basic fields * asset array liquid tag modification * Addressing tests errors * Fixing prettier * correcting pr comments --------- Co-authored-by: francobanfi <franco.banfi@external.contentful.com>
* Setup dialog steps * Create components for each step
* wip code block component creation * Adding styles * Adding styles * styling code block * Updating styles * adding formating to the graphql response to ident the example json code block * Fixing indentation * Test * omiting richtext in the connected content call query and json * correcting an import * adding tests * changing the import of the react-syntax-highlighter * format import with prettier --------- Co-authored-by: Juli Rossi <juliana.rossi@10pines.com>
* Add classes for each field type * Replace usage of field types with classes * Add and reorganize tests * Set max depth for nested fields * Separate Location and RichText from BasicField * Refactor: create Entry class * Add clarifying comments
* Save content type id instead of name * Set first letter of content type to lowercase * Update apps/braze/src/utils.ts Co-authored-by: JuliRossi <juliana.rossi@10pines.com> --------- Co-authored-by: JuliRossi <juliana.rossi@10pines.com>
* config screen validation when api key is null * first version of the config screen validations * adding validation message to textinput * fixing test to work with validations * adding test for invalid api key * changes in the validations for the config screen * test to install the app when api key is invalid * using sdk to get the contentful base url * changing method name in config screen location
* changing the extensions for the style files * changing the extensions for the style files * correction of PR comments
* adding type password to the contentful api key input * removing braces
* WIP * Refactor * refactor * making better tests * Fix indentation * Fix initialization * Refactor
* Allow to select entry fields * Rename styles file * Apply margin to nested fields * Address PR comments * Display field name in checkbox * Address PR comments - Replace field.select and field.deselect with field.toggle - Extracted repeated logic into entry.selectedFields - Updated fields ids in tests
✅ Deploy Preview for ecommerce-app-base-components canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
export const BRAZE_DOCUMENTATION = | ||
'https://braze.com/docs/user_guide/personalization_and_dynamic_content/connected_content'; | ||
|
||
export async function callToContentful(url: string, newApiKey: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this pattern and will probably use it for other apps we maintain 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really cannot find anything meaningful to be concerned with here. This is a really well-organized and written app. Great work 🎉
Two procedural points:
- We'll need to remove the two deploy commands for now. I left a suggestion to do so. Happy to approve once that's done!
- Looks like the rebase can't be automatic, which is totally fine. Assuming no one on the marketplace team has any concerns, I'll go ahead and squash the history and merge this in on Monday.
Co-authored-by: Mitch Goudy <mgoudy91@gmail.com>
Purpose
This is the first version of the Braze app.
Approach
The main logic of the app is in the Dialog location, which consists of a three-step wizard: field selection, locale selection and code blocks. There's one component for each of the steps of the wizard to separate their logic.
Under the
fields
folder there are typescript classes that represent the different types of contentful fields. The idea is to separate the logic of generating the graphql query and the liquid tags for each field, since each field has different information.The
FieldsFactory
class retrieves the necessary information from the entry fields and content type and creates one instance of the correspoding class for each field of the entry.Reference fields can contain other nested fields or references up to 5 levels.
Testing steps
npm test
.App configuration
andEntry sidebar
. Then add the app to the sidebar for the content type that will be used for testing. Then start the app withnpm start
and go to an entry of that content type, a button should appear in the sidebar, which will trigger the dialog to appear. The second step of the wizard only appears if there are localized fields in the entry, otherwise it's skipped.Breaking Changes
N/A
Dependencies and/or References
N/A
Deployment
N/A