Skip to content
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

Add secondary button config to store #342

Merged
merged 2 commits into from Jan 26, 2023

Conversation

obany
Copy link
Contributor

@obany obany commented Jan 26, 2023

No description provided.

@obany obany requested a review from johnman January 26, 2023 10:03

function addButtons(options: StorefrontProviderOptions, apps: PlatformApp[]): PlatformApp[] {
if (options.primaryButton || Array.isArray(options.secondaryButtons)) {
return apps.map((app) => ({
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be the other way around?

If an app specifies a primary or secondary button then we don't override it with the default buttons.

If a common primary button is defined don't we need the same logic (i.e. pass the app to whatever action id is specified)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the first if just checks if there are any options set before processing, I have update to maintain existing primary or secondary if an app has them

@obany obany merged commit 3de0c39 into workspace/vnext Jan 26, 2023
@obany obany deleted the dev/martyn/store-secondary-buttons branch January 26, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants