Skip to content

Nav sidebar: the sidebar icon should transition to the site icon #43971

Closed

Description

@p-jackson

The (W) icon in the top-left of the editor opens the nav sidebar. It also animates (shrinks) to make space for the site name to appear in the sidebar. But is (W) even the right icon to use here? Maybe since the sidebar is showing site-level information, the icon should relate to the site.

This mockup shows the (W) transitioning into the site icon:
recent pages sidebar

This mockup shows that if the site doesn't have an icon we could give it a placeholder using the first character of the site name:
fse-starting-point

Not clear how this would work if the site name doesn't use the latin alphabet, so maybe this doesn't work cc: @olaolusoga


Implementation notes:

  • Maybe the get_site_icon_url() function could be used for this.
  • We could use wp_localize_script() to send the site icon to the client. I'm not aware of any Gutenberg data store that would already contain.

Part of #41298

Activity

  1. p-jackson commented on Jul 12, 2020

    @p-jackson
    MemberAuthor

    There's a core PR working on this too WordPress/gutenberg#22952

  2. p-jackson commented on Jul 12, 2020

    @p-jackson
    MemberAuthor

    Latest mockup doesn't use the site icon.
    #41298 (comment)

    So closing this task for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions