Skip to content

Extend customizability of Default Content #46

Open

Description

@jsnwesson

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.

Activity

  1. arbrandes commented on Apr 8, 2024

    @arbrandes
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions