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

Fix Custom Views panel UI #3322

Merged
merged 6 commits into from
Dec 5, 2023
Merged

Fix Custom Views panel UI #3322

merged 6 commits into from
Dec 5, 2023

Conversation

CarlosCortizasCT
Copy link
Contributor

Summary

Fix Custom Views panel UI

Description

We realized we broke the UI of the Custom Views panel container when working in the new Drawer component so, instead of having a clean container with no predefined header:

Screenshot 2023-12-04 at 18 32 55

we were including a non-wanted header:

Screenshot 2023-12-04 at 18 33 42

On top of that, I took the opportunity to update @emotion/react dependency to match the one used in ui-kit.

Copy link

changeset-bot bot commented Dec 4, 2023

🦋 Changeset detected

Latest commit: 4617238

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 38 packages
Name Type
@commercetools-applications/merchant-center-custom-view-template-starter-typescript Patch
@commercetools-applications/merchant-center-template-starter-typescript Patch
@commercetools-frontend/application-shell-connectors Patch
@commercetools-frontend/application-components Patch
@commercetools-applications/merchant-center-custom-view-template-starter Patch
@commercetools-applications/merchant-center-template-starter Patch
@commercetools-frontend/react-notifications Patch
@commercetools-frontend/application-shell Patch
@commercetools-frontend/permissions Patch
@commercetools-frontend/codemod Patch
@commercetools-frontend/sentry Patch
@commercetools-frontend/i18n Patch
@commercetools-frontend/l10n Patch
@commercetools-frontend/sdk Patch
@commercetools-local/playground Patch
@commercetools-local/visual-testing-app Patch
@commercetools-frontend/mc-scripts Patch
@commercetools-website/components-playground Patch
@commercetools-frontend/cypress Patch
@commercetools-frontend/actions-global Patch
@commercetools-backend/eslint-config-node Patch
@commercetools-backend/express Patch
@commercetools-backend/loggers Patch
@commercetools-frontend/application-config Patch
@commercetools-frontend/assets Patch
@commercetools-frontend/babel-preset-mc-app Patch
@commercetools-frontend/browser-history Patch
@commercetools-frontend/constants Patch
@commercetools-frontend/create-mc-app Patch
@commercetools-frontend/eslint-config-mc-app Patch
@commercetools-frontend/jest-preset-mc-app Patch
@commercetools-frontend/jest-stylelint-runner Patch
@commercetools-frontend/mc-dev-authentication Patch
@commercetools-frontend/mc-html-template Patch
@commercetools-frontend/notifications Patch
@commercetools-frontend/url-utils Patch
@commercetools-website/custom-applications Patch
@commercetools-website/custom-views 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

@@ -130,21 +136,24 @@ function CustomViewLoader(props: TCustomViewLoaderProps) {
].join('/');

return (
<Drawer
<ModalPage
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the file with the relevant changes.

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Deploy preview for application-kit-custom-views ready!

✅ Preview
https://application-kit-custom-views-a6qxwrv4o-commercetools.vercel.app
https://appkit-cv-sha-a330ba52f2c84332637a6f52fa36de62ad99a8b2.commercetools.vercel.app
https://appkit-cv-pr-3322.commercetools.vercel.app

Built with commit 4617238.
This pull request is being automatically deployed with vercel-action

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Deploy preview for merchant-center-application-kit ready!

✅ Preview
https://merchant-center-application-1tx54vdpg-commercetools.vercel.app
https://appkit-sha-a330ba52f2c84332637a6f52fa36de62ad99a8b2.commercetools.vercel.app
https://appkit-pr-3322.commercetools.vercel.app

Built with commit 4617238.
This pull request is being automatically deployed with vercel-action

Copy link
Member

@emmenko emmenko left a comment

Choose a reason for hiding this comment

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

Thanks!

onClose={props.onClose}
size={panelSize === 'small' ? 10 : 30}
title=""
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 we provide a title here?

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 issue is that the title is required in the ModalPage component and I didn't want to change that but we don't want to display any title in this use case.

Copy link
Member

Choose a reason for hiding this comment

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

The title of the ModalPage is only used for accessibility if I'm not mistaken, it's not a visible value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So are you suggesting we should make that property optional in the ModalPage component?

Copy link
Member

Choose a reason for hiding this comment

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

No I'm suggesting to use it 😄

@CarlosCortizasCT CarlosCortizasCT merged commit 13aa6ae into main Dec 5, 2023
20 checks passed
@CarlosCortizasCT CarlosCortizasCT deleted the cm-fix-custom-views-panel branch December 5, 2023 09:39
@ct-changesets ct-changesets bot mentioned this pull request Dec 5, 2023
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.

3 participants