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

Extend customizability of Default Content #46

Open
jsnwesson opened this issue Mar 15, 2024 · 1 comment
Open

Extend customizability of Default Content #46

jsnwesson opened this issue Mar 15, 2024 · 1 comment

Comments

@jsnwesson
Copy link
Contributor

Context:
The content that is wrapped by a PluginSlot is referred to as the defaultContents. In the current implementation, the defaultContents is rendered by default (and can be hidden by assigning keepDefault to false in the JS config) with the properties:

{
  id: 'default_contents',
  priority: 50,
  renderWidget: children // this is the actual children object inside Plugin Slot, whose contents are read-only
} 

Problem:
This implementation works best when there's only one component as the default content, but lacks customizability in the case where multiples of the same component might need to be rendered as default content (ie. several links in a side bar) and there's a desire to insert plugins in between the default content (Insert) or to Modify/Wrap/Hide individual parts of the default contents.

Solution:
Use something like Braden MacDonald's implementation in his UI Plugin Slot framework where a DefaultPluginSlot exists for instances when we don't need to modify the default content and convert the PluginSlot to handle instances where default contents are customizable.

@arbrandes
Copy link
Contributor

@jsnwesson, were you able to make progress here in the meantime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants