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

Error with title on the <Page> component #12591

Open
asacarter opened this issue Sep 1, 2024 · 2 comments
Open

Error with title on the <Page> component #12591

asacarter opened this issue Sep 1, 2024 · 2 comments
Labels
Bug Something is broken and not working as intended in the system. untriaged

Comments

@asacarter
Copy link

asacarter commented Sep 1, 2024

Summary

Spending an hour trying to figure why my app is broken and its just Polaris that is broken.

Adding any title to a page creates an error...

import {Page } from '@shopify/polaris';
import React from 'react';

function PageExample() {
  return (
    <Page
      title="3/4 inch Leather pet collar"
    >
    </Page>
  );
}

Warning: Prop className did not match. Server: "Polaris-Page-Header--isSingleRow Polaris-Page-Header--noBreadcrumbs Polaris-Page-Header--mediumTitle" Client: "Polaris-Page-Header--isSingleRow Polaris-Page-Header--mobileView Polaris-Page-Header--noBreadcrumbs Polaris-Page-Header--mediumTitle"

Expected behavior

No error adding a title

Actual behavior

Warning: Prop className did not match. Server: "Polaris-Page-Header--isSingleRow Polaris-Page-Header--noBreadcrumbs Polaris-Page-Header--mediumTitle" Client: "Polaris-Page-Header--isSingleRow Polaris-Page-Header--mobileView Polaris-Page-Header--noBreadcrumbs Polaris-Page-Header--mediumTitle"

Steps to reproduce

Create a new app from the template and give the page title instead of using titlebar.

Are you using React components?

Yes

Polaris version number

12.27.0

Browser

Chrome

Device

Macbook Pro M3

@asacarter asacarter added Bug Something is broken and not working as intended in the system. untriaged labels Sep 1, 2024
@gavinharriss
Copy link

The styling for the page component is also broken as a result, as you can see from this screenshot snippet:

<Page 
  title="Add connection"
  backAction={{
    content: "Connections",
    url: "/app/connections",
  }}
>
...

Image

As an aside, I also note that the backAction is not working correctly with SaveBar. When the back button is used, the SaveBar shakes but does not stop the navigation occuring.

@gavinharriss
Copy link

gavinharriss commented Sep 5, 2024

This issue appears to be resolved with @shopify/polaris v13.9.0. But the title still prefers to stack itself underneath the back button at most break points e.g.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system. untriaged
Projects
None yet
Development

No branches or pull requests

2 participants