Skip to content

Extend customizability of Default Content #46

@jsnwesson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions