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

refactor(appkit): migrate PageUnauthorized component to AppKit #1595

Merged
merged 7 commits into from
Jun 23, 2020

Conversation

Rombelirk
Copy link
Contributor

Summary

This PR migrates the PageUnauthorized component from Merchant Center to Application Kit. It can be used for informing user they don't have permissions for certain resources in Merchant Center applications

@Rombelirk Rombelirk added the 🙏 Status: Dev Review Waiting for technical reviews label Jun 22, 2020
@Rombelirk Rombelirk self-assigned this Jun 22, 2020
@changeset-bot
Copy link

changeset-bot bot commented Jun 22, 2020

🦋 Changeset is good to go

Latest commit: 30c4514

We got this.

This PR includes changesets to release 6 packages
Name Type
@commercetools-frontend/application-components Minor
@commercetools-local/visual-testing-app Minor
merchant-center-application-template-starter Patch
@commercetools-frontend/application-shell Minor
playground Patch
@commercetools-website/components-playground Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jun 22, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/commercetools/merchant-center-application-kit/pzjzsmqfk
✅ Preview: https://merchant-center-git-ckt-254-migrate-page-unauthorized-co-3ecd92.commercetools.vercel.app

@vercel vercel bot temporarily deployed to Preview June 22, 2020 09:28 Inactive
Copy link
Contributor

@tdeekens tdeekens left a comment

Choose a reason for hiding this comment

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

Super nice. Thank you!


## Description

The PageUnauthorized component can be used for informing user they don't have permissions for certain resources in Merchant Center applications.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The PageUnauthorized component can be used for informing user they don't have permissions for certain resources in Merchant Center applications.
The PageUnauthorized component can be used to inform a user that certain permissions are lacking for views of a respective Merchant Center application.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

it('should render help desk link', () => {
const rendered = renderComponent(<PageUnauthorized />);
expect(rendered.getByText('Help Desk')).toBeInTheDocument();
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a test to see that we at least render the title? Otherwise I might get away with changing a bit too much without the test failing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, sounds like a good idea

export const PageUnauthorized = () => (
<MaintenancePageLayout
imageSrc={FailedAuthorizationSVG}
title={<FormattedMessage {...messages.title} />}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a label as recently added to other pages. It's just the title.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I don't quite get it, what label? This component doesn't seem to have such prop...

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, my bad :(

@vercel vercel bot temporarily deployed to Preview June 22, 2020 13:28 Inactive
@Rombelirk Rombelirk requested a review from tdeekens June 22, 2020 13:30
"@commercetools-frontend/application-components": patch
"@commercetools-local/visual-testing-app": patch
'@commercetools-frontend/application-components': patch
'@commercetools-local/visual-testing-app': patch
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I'd make this minor. As it's a feature.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Rombelirk than this would be the only missing piece to have this minor :)

Copy link
Contributor

@YahiaElTai YahiaElTai left a comment

Choose a reason for hiding this comment

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

Awesome bro!

@tdeekens tdeekens requested review from tdeekens and removed request for emmenko June 22, 2020 13:39
@Rombelirk
Copy link
Contributor Author

Awesome bro!

Thanks comrade 😂

@vercel vercel bot temporarily deployed to Preview June 22, 2020 13:47 Inactive
@Rombelirk Rombelirk added the 🚀 Status: ship it Triggers an merge if rules match via bot label Jun 23, 2020
@kodiakhq kodiakhq bot merged commit f70fed0 into master Jun 23, 2020
@kodiakhq kodiakhq bot deleted the CKT-254-migrate-page-unauthorized-component branch June 23, 2020 06:45
@github-actions github-actions bot mentioned this pull request Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 Status: Dev Review Waiting for technical reviews 🚀 Status: ship it Triggers an merge if rules match via bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants