toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Panel - Back button and navigation structure

Open MrDinsdale opened this issue 7 years ago • 8 comments

Expected Behaviour

The Design library now features back button placement for panels, we should add styling for this to improve consistency.

Current Behaviour

Each implementation is custom on our panels so often placement and size is inconsistent.

Designs

screen shot 2017-11-20 at 13 05 33 screen shot 2017-11-20 at 13 05 58 light

MrDinsdale avatar Nov 20 '17 13:11 MrDinsdale

Wondering if this is better being a generic link class for use outside of panels?

Very much like .c-link-external, we could have .c-link-back

joe-bell avatar Nov 20 '17 13:11 joe-bell

Yeah, the only thing I'd point out with that is the fact we need to consider the positioning of the link as well as it's appearance.

MrDinsdale avatar Nov 20 '17 14:11 MrDinsdale

We can do a cheeky BEM mix 🔥

"c-link-back c-panel__link-back"

joe-bell avatar Nov 21 '17 08:11 joe-bell

Replicating the following designs from Sketch:

screen shot 2017-11-30 at 10 25 25 screen shot 2017-11-30 at 10 25 44


@mikejgregory just checking that it's intentional for the back link to be blue like a standard link when the close button is text-coloured?

joe-bell avatar Nov 30 '17 10:11 joe-bell

@joebell93 Currently yes in this instance the back button is blue, however we should be building these components so the colour as well as the icon plus it's placement (left or right) should be flexible.

mikejgregory avatar Nov 30 '17 17:11 mikejgregory

It's a little complicated to explain, but the answer to that is yes and no due to us using pngs. I'll have a chat later with you

joe-bell avatar Dec 01 '17 09:12 joe-bell

@sky-uk/toolkit-owners I'm thinking we split this into a short-term and long-term option:


Short-term

<article class="c-panel is-open">
  <div class="c-panel__content">
    <a class="c-panel__back c-link-back" href="#1">Back</a>
    <a class="c-panel__toggle" href="#1">Close</a>
    <div class="o-container">
      ...
    </div>
  </div>
</article>

Long-term

The extra c-panel__nav would remove any need to absolutely position navigation, however, it would drastically change the padding of the panel at the top edge (one for 3.0)

<article class="c-panel is-open">
  <div class="c-panel__content">
    <div class="c-panel__nav">
      <a class="c-panel__back c-link-back" href="#1">Back</a>
      <a class="c-panel__toggle" href="#1">Close</a>
    </div>
    <div class="o-container">
      ...
    </div>
  </div>
</article>

joe-bell avatar Dec 01 '17 10:12 joe-bell

@mikejgregory has also confirmed to me that the panel navigation should be sitting within the container; this would be a breaking change to as it would require restructuring of our Panel padding

joe-bell avatar Dec 01 '17 10:12 joe-bell