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

[Proposal] Support module components #540

Closed
aroyer opened this issue Jul 3, 2024 · 2 comments · Fixed by #565
Closed

[Proposal] Support module components #540

aroyer opened this issue Jul 3, 2024 · 2 comments · Fixed by #565
Labels
area:component Phoenix components and Page Builder components area:content Related to Content API and Content Management enhancement New feature or improvement help wanted Looking for contributors roadmap Priority issues that will be released in the short term ux Requires UX or UXD
Milestone

Comments

@aroyer
Copy link
Contributor

aroyer commented Jul 3, 2024

Would be nice to support all the core components that come with Phoenix.

For example

<.icon name="hero-x-mark-solid" />
@leandrocp
Copy link
Contributor

That's the objective :)

Any component added in blueprint list, for example the table gets loaded automatically so in this example a <.table> component will be made available to use on template and also on the visual page builder.

But there are 2 issues to solve before we can add all possible components:

  1. Overwrite tailwind classes at runtime. In a regular Phoenix app you can edit the file to change classes and style components as you wish, for eg in this input checkbox https://github.com/phoenixframework/phoenix/blob/4c10bab46c4cd530240129aff682d54d2950b80b/priv/templates/phx.gen.live/core_components.ex#L313 - but that's not very practical so we need to use a project like https://hex.pm/packages/tails or https://hex.pm/packages/twix to allow users overwrite the default style, for eg: <.input type="checkbox" class="text-red-500">

  2. icon in particular requires tailwind plugins which is not yet supported but we working on it.

With that said contributions are welcome even without tailwind class merging. Getting more components like forms and inputs is on the roadmap.

@leandrocp leandrocp added enhancement New feature or improvement help wanted Looking for contributors ux Requires UX or UXD area:content Related to Content API and Content Management area:component Phoenix components and Page Builder components roadmap Priority issues that will be released in the short term labels Jul 4, 2024
@leandrocp leandrocp added this to Beacon Jul 4, 2024
@leandrocp leandrocp added this to the v0.1.0 milestone Jul 4, 2024
leandrocp added a commit that referenced this issue Jul 26, 2024
leandrocp added a commit that referenced this issue Jul 26, 2024
@leandrocp
Copy link
Contributor

@aroyer now we're supporting almost all of them but the problem is that core components from phoenix is not meant to be used in a project like Beacon where you're supposed to override classes and behavior without changing the component itself. We already have the foundation to create components, even from other libraries like Flowbite, but we still need a plugin system to allow us loading such components instead of bundling them into the core beacon. In short, we're moving towards having way more components into beacon as plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:component Phoenix components and Page Builder components area:content Related to Content API and Content Management enhancement New feature or improvement help wanted Looking for contributors roadmap Priority issues that will be released in the short term ux Requires UX or UXD
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants