Skip to content

[experimental]: Create default toolbar nodes #428

Open

Description

@ahuseyn

In order to provide a basic toolbar experience, we should create default toolbar nodes.

Acceptance Criteria

  • Have "Edit current post/page link" node (edit-post, uses post.php?post=<id>&action=edit, so it works for CPTs; multisite works when each site's adminUrl is set)
  • Have "Current post/page status and type" node (post.status and post.type are already in toolbar state)
  • Have "Shortcut to WP Admin" node (wp-admin)
  • Have "Authenticated user (viewer) profile basics (name, avatar, link)" node (user.name, user.avatar, etc. are already in toolbar state)
  • Nodes must be registered in the toolbar examples (packages/toolbar/examples/next and packages/toolbar/examples/vanilla)

Default nodes live in registerDefaultNodes() in packages/toolbar/src/core/Toolbar.js. It also registers a preview toggle node that wasn't in the original scope.

Notes

  • Existing toolbar can be used as a reference
  • For "Edit current post/page link" consider multisite, CPT cases
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

    [Area] Toolbar[Type] Feature

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions