Web-stories-wp: Link Panel not considering multi-selection

Created on 14 Jul 2020  路  5Comments  路  Source: google/web-stories-wp

Bug Description

The link panel is currently always using the first selected element, even if multi-selection is present.

Expected Behaviour

  • If a selected element doesn't support links (e.g., background) then hide.
  • If all support link, and have different values, show (multiple) placeholder text
  • If all support link and have the same value, even if empty, show that value.
  • Whether (multiple) or a value is shown, the user can click in and type to update the link, which would update for all selected elements

Steps to Reproduce

  1. Add two elements
  2. Add different links to both
  3. Select both elements
  4. See the link field: it displays the link of the first element only.

Screenshots

Additional Context

  • Plugin Version:
  • Operating System:
  • Browser:

_Do not alter or remove anything below. The following sections will be managed by moderators only._

Acceptance Criteria

Implementation Brief

Design Panel Links P2 Prometheus Bug Passed

All 5 comments

@o-fernandez / @samitron7

Currently, the link panel is always using the value of the first element only in case of multi-selection, should it support multi-selection as well? Or should it be hidden when multi-selection is present?

My first thought would be to treat as every other element where it is possible to set a value for the selected elements:

  • If a selected element doesn't support links (e.g., background) then hide.
  • If all support link, and have different values, show (multiple) placeholder text
  • If all support link and have the same value, even if empty, show that value.
  • Whether (multiple) or a value is shown, the user can click in and type to update the link, which would update for all selected elements

That would be logically consistent with other things in the panel.

Yes, everything Omar outlined is the current pattern for other shared attributes when you multiple select elements. Please use "Mixed" instead of "Multiple" as is too long and won't fit in certain input fields.

Testing Instructions from 4164:
Testing Instructions
I

  1. Add 2 elements
  2. Add link to one of these
  3. Now select both elements
  4. Verify that the link's shows now "multiple" in the fields.
  5. Change that to some link.
  6. Verify that the new value was applied to both elements.

II

  1. Add two elements
  2. Add link to one of them
  3. Now move the element without link to the bottom of the page
  4. Add Page Attachment
  5. Select both elements and focus on the link input
  6. Verify that warning appears saying that link can't be below the dashed line.

Verified in QA

Was this page helpful?
0 / 5 - 0 ratings

Related issues

csossi picture csossi  路  3Comments

jauyong picture jauyong  路  4Comments

wassgha picture wassgha  路  3Comments

3pgarro picture 3pgarro  路  4Comments

o-fernandez picture o-fernandez  路  4Comments