Skip to content

[MasterDetailLayout] Verify proper usage of Master / Detail wrapper components #317

Description

@sissbruecker

Master and detail content should be wrapped into the respective wrapper components to ensure view transitions work properly with React:

<MasterDetailLayout>
  <MasterDetailLayout.Master>...</MasterDetailLayout.Master>
  <MasterDetailLayout.Detail>...</MasterDetailLayout.Detail>
</MasterDetailLayout>

However, that usage is somewhat unusual compared to other components and not discoverable when just writing code in the IDE.

To improve the situation we should:

  • Throw an error if any other type of child component is used in MasterDetailLayout
  • Improve JS docs for the outer MasterDetailLayout to provide an example of how to provide content to the component

Activity

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions