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

[SP-103] Register custom fragments in the admin panel forms #307

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mateus-po
Copy link
Contributor

Purpose

The idea is to allow extensions register custom fields or fragments in Admin Panel forms without using Deface. This PR proposes an implementation for such feature. It is a concept draft, the actual implementation might change in the future.

Registering a partial

For a partial to be rendered via this method:

<%= render_matching pattern: 'products/edit', locals: { f: f }  %>

The partial must be located in app/views/spree/admin/extension/.../products/edit extension directory. The ... means that there can be any directories along the way, preferably there would be a directory with a unique name (e.g. extension name) so that there are no conflicts between partials.

@mateus-po mateus-po closed this Feb 27, 2024
@mateus-po mateus-po reopened this Feb 27, 2024
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.

1 participant