Skip to content

Bynder integration #2581

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
merged 59 commits into from
Apr 5, 2024
Merged

Bynder integration #2581

merged 59 commits into from
Apr 5, 2024

Conversation

finnar-bin
Copy link
Contributor

@finnar-bin finnar-bin commented Mar 11, 2024

Requires zesty-io/material#91

bynder-integration.webm

Closes #2157

@finnar-bin finnar-bin added ready PR is complete and ready for deployment feature Additional functionality that should be added to Zesty labels Mar 11, 2024
@finnar-bin finnar-bin requested a review from agalin920 March 11, 2024 01:58
@finnar-bin finnar-bin self-assigned this Mar 11, 2024
@finnar-bin
Copy link
Contributor Author

Redeployed to stage with Andres' suggestion regarding storing the token in the settings

@finnar-bin finnar-bin requested a review from agalin920 March 25, 2024 09:08
@shrunyan shrunyan changed the base branch from master to dev March 25, 2024 18:59
});
}

localStorage.setItem("cvad", url);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theofficialnar why do we still need to leverage localStorage if we are now saving it on instance settings?

Copy link
Contributor Author

@finnar-bin finnar-bin Mar 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to ensure that whatever changes saved to the instance for this value is also synced with the localstorage all the time. I could move this out of the function and just place it after updateBynderPortalUrl is ran to achieve the same effect.

Copy link
Contributor

@agalin920 agalin920 Mar 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theofficialnar But why do we need to use localstorage if we are saving values in the db? Can't we fetch it from api and handle everything in memory?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agalin920 Bynder's UCV component checks the values from localStorage. I tried passing in the token stored on the db to the component directly but it fails to authenticate since based on my understanding of their docs this would only work if we give it a token the came from their token endpoint which we need to do ourselves. I'm guessing the token that the UCV generates when you log in to it is different from that token that can be directly passed into the component to bypass the whole login thing. The UCV component only works when the token from the db is stored to local storage as "cvrt" and the portal address as "cvad".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theofficialnar Gotcha so it is directly required by the Bynder component internals. Thanks

}}
onKeyPress={(event) => event.key === "Enter" && handleUpdate()}
onKeyPress={(event: React.KeyboardEvent<HTMLDivElement>) =>
event.key === "Enter" && handleUpdate()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you prefer this pattern over the <form> pattern?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually not sure why this is being tagged as a change on this PR since this is not part on my changes. Must be something that's on master (since this branch is synced to latest master) that isn't on the dev branch since @shrunyan changed the target branch to dev.

@agalin920 agalin920 self-requested a review March 26, 2024 07:13
agalin920
agalin920 previously approved these changes Mar 26, 2024
Copy link

@zcolah zcolah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @theofficialnar,
Here are the VQA changes needed:
https://www.figma.com/file/XPjxuxpmkvnMHhzAFXLZBW/Bynder-Integration?type=design&node-id=155%3A8806&mode=dev&t=x9CP4kUFLm61va9P-1

Once you complete the fixes, please deploy it to stage.

@shrunyan shrunyan enabled auto-merge April 1, 2024 22:59
@zcolah
Copy link

zcolah commented Apr 2, 2024

Do not deploy this PR to Production until the following is done:

  • Announcement written + video written and published

auto-merge was automatically disabled April 4, 2024 19:19

Base branch was modified

@shrunyan shrunyan enabled auto-merge April 4, 2024 19:19
@shrunyan shrunyan disabled auto-merge April 4, 2024 19:44
@shrunyan shrunyan enabled auto-merge (squash) April 4, 2024 19:44
@shrunyan shrunyan merged commit 8c6e959 into dev Apr 5, 2024
@shrunyan shrunyan deleted the feat/bynder-integration branch April 5, 2024 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Additional functionality that should be added to Zesty ready PR is complete and ready for deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content: Bynder Integration
4 participants