Closed solazio closed 2 years ago
Extends on existing "back to top"
WG:
@danielmutis Provide examples where it works where it doesn't
Snapcraft list of users by distro for a single snap:
Builds table:
Extends on existing "back to top"
I don’t know how much the similarity with “Back to top” is intentional. But things that act different should look different, and the behaviour of “Show more” is completely different from “Back to top”. So I think it’s misleading for them to look as similar as they do.
Interaction-wise, this is bog-standard progressive disclosure. Vanilla has an existing element for progressive disclosure, though it’s not currently described: <details>
.
And Vanilla sites currently use a variety of icons for progressive disclosure, for example “+” and “–” in MAAS:
Now, we don’t have to use the same icon or style for this everywhere. For example, GitHub uses three different icons for progressive disclosure in different layout situations. What I do think we need, if we’re going to have more than one, is an explanation of when to use each one.
That probably isn’t a good example to base a pattern on, for two reasons. First, it’s usually hiding ten lines or fewer, so it’s probably consuming more time in clicking than it saves in scrolling. And second, the purpose of that block is to show off how short and simple the Yaml is, so hiding part of it by default is defeating the point.
Example where it looks odd
Builds table:
I don’t understand the purpose of this one either, since there’s nothing below that table except the footer, so you won’t be trying to scroll past it. That aside, can you elaborate on why it looks odd? Some possibilities:
In short, I think this needs:
<details>
, vs. something else.We could use the new 'Show more' styling used in modular table, with an addition of faded background.
We should propose a new container component that uses the ones mentioned above.
This have been through WG before, but because it needs UX work we should pass it though our new process.
@elioqoshi to investigate this and look at the modular table spec for existing solutions.
@SirSamTumless ready for planning
WG: keeping it simple, this should just be a command blue link (related to the command link discussion) without lines, icons or any other elements.
WG: on the link area in Vanilla include this "show-more" option recommending using the command-link: https://vanillaframework.io/docs/patterns/links
This would be used to wrap any tall
<tag>
and "truncate" it to a specific height. Once clicking the "Show more" button the full size of the<tag>
.Currently this pattern is used on snapcraft in 3 locations:
Link to codepen: https://codepen.io/solazio/pen/gOpYVqQ