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

Page Builder Elements #1931

Merged
merged 24 commits into from
Sep 27, 2021
Merged

Page Builder Elements #1931

merged 24 commits into from
Sep 27, 2021

Conversation

adrians5j
Copy link
Member

@adrians5j adrians5j commented Sep 27, 2021

Changes

This PR introduces a new @webiny/app-page-builder-elements package, which provides an easier system for dealing with rendering page elements. The following are some of its features:

  • no plugins, developers just mount the PageElementsProvider, to which they pass page element renderers, modifier functions that deal with page elements' properties (e.g. width, height, shadow, other custom properties), theme, and so on
  • everything is managed using Emotion CSS-in-JS solution, no SCSS is needed
  • only a single dependency (Emotion), potentially we could also allow a custom CSS-in-JS solution one day
  • using built-in hooks, developers can easily apply the built-in styles to their custom elements (styles that were set through the PB Editor like padding, margin, background color, ...)
  • a central theme object is also passed to the provider, enabling developers to define breakpoints and styles for any component that they might have
  • CSS can be written for multiple breakpoints

How Has This Been Tested?

Manual testing.

Documentation

For now, this is a preview / PoC level implementation, so no documentation yet.

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.

None yet

1 participant