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

EuiPageTemplate type issues #6351

Closed
flash1293 opened this issue Nov 8, 2022 · 1 comment · Fixed by #6352
Closed

EuiPageTemplate type issues #6351

flash1293 opened this issue Nov 8, 2022 · 1 comment · Fixed by #6352
Assignees
Labels

Comments

@flash1293
Copy link
Contributor

The EuiPageTemplate component has some mistmatched types:

  • component property which is not respected
  • mainProps doesn't have a component property (but it works when specified)
    <EuiPageTemplate
      component="main" // type checks, but not respected
      mainProps={{ component: 'main' }} // type error, but respected
    />
@cee-chen
Copy link
Contributor

cee-chen commented Nov 8, 2022

I'm not 100% sure what Caroline's original intentions were with page template but I would assume she would want component="main" to work as a top level prop, so I'll proceed with the bugfix as such (vs. updating the types)

flash1293 added a commit to elastic/kibana that referenced this issue Nov 10, 2022
Fixes #143547

To make sure the correct semantic elements are used, you can pass the
`component` prop to the page template components. As the eui components
`EuiPageTemplate`, `EuiPageTemplate.Section` and so bring styling with
them there's not much value in trying to put them into the places of
manual `section`s used in Lens today because we would end up overruling
all of these default styles anyway as Lens is pretty special in terms of
page layout to make best use of the existing screen real estate.

Because of this this PR is simply turning the `EuiPageTemplate` into a
div and putting the main role to the top level of the Lens app.

The way how to do this is a bit funky right now, but that's an EUI bug
that will be fixed upstream: elastic/eui#6351

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants