Skip to content

Add consistency between AlignmentToolbar and BlockAlignmentToolbar? #3859

Closed

Description

@BE-Webdesign

Issue Overview

While applying a new alignment, the alignment functionality differs between blocks/AlignmentToolbar and blocks/BlockAlignmentToolbar.

Current Behavior

Main differences:

blocks/AlignmentToolbar does this:

onClick: () => onChange( isActive ? null : align ),

blocks/BlockAlignmentToolbar does this:

function applyOrUnset( align ) {
  return () => onChange( value === align ? undefined : align );
}

onClick: applyOrUnset( control )

It is not clear to me why these are different. Is there any possibility of consolidating the two, or do they serve widely separate use cases?

Activity

  1. added
    [Type] Question
    on Dec 8, 2017
  2. youknowriad commented on Dec 8, 2017

    @youknowriad
    Contributor

    Agreed, we should probably do the same for both :)

  3. BE-Webdesign commented on Dec 9, 2017

    @BE-Webdesign
    ContributorAuthor

    ColorPalette also shares similarities.

  4. added
    Good First Issue
    on Dec 26, 2017
  5. added a commit that references this issue on Jan 16, 2018
  6. added a commit that references this issue on Jan 23, 2018
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

    Good First Issue[Type] Question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions