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] Ensure context provides updates to template children #7663

Closed

Conversation

mgadewoll
Copy link
Contributor

@mgadewoll mgadewoll commented Apr 9, 2024

Summary

⚠️ This PR should be rebased with this PR to ensure storybook stories for EuiPageTemplate are available

This PR is a follow-up to an issue noticed here.

EuiPageTemplate did not properly pass down props to the page template subcomponents.
The reason was that changes on the context did not actually trigger updates on the children using that context.

To ensure this, this PR adds a provider wrapper for EuiPageTemplate which ensures that
a) all nested children AND the page template itself correctly consume the context and that
b) there is a state update which triggers context updates inside the consumers.

QA

  • ensure that the staging docs for EuiPageTemplate is the same as production
  • ensure that the staging storybook for EuiPageTemplate is the same as production (⚠️ waiting for previous PR to be merged for this to be available)

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist - N/A
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)

- adds context provider with state to ensure context updates trigger updates

- removes sidebar custom solution to ensure applied props
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

@mgadewoll
Copy link
Contributor Author

We addressed the updates in another PR and changed the approach to prevent having to use stateful wrapper. (link)

@mgadewoll mgadewoll closed this Apr 11, 2024
@mgadewoll mgadewoll deleted the pagetemplate/refactor-context branch April 11, 2024 15:53
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