-
Notifications
You must be signed in to change notification settings - Fork 71
Expandable sections #143
Comments
Hey @iuloshi - Took a look at the page. I was imagining the live example in the 'Style' section and static images in the 'States' section (just the bars). |
Since we show the different Links, Buttons, and Forms states as coded examples (as they also exist in Capital Framework), I'm inclined to say that we shouldn't use images to illustrate the examples in the UI toolkit. The coded examples on the other pages set the expectation that all of the UI elements are interactive and I think it would be frustrating/confusing to the user if some were arbitrarily images. I was going to try to hack the code so that the Hover state example was the correct hover color for the expandable. |
Add the class "open" to <div class="expandable">
<header class="expandable-header open"> Although I'm noticing that there is a hover for both the expandable header bar and a different one for the show/hide link. |
Hey thanks @himedlooff!!
|
Hey @iuloshi - I just reviewed the page and it looks good. Closing! |
Re-opening this guy because of the awesome work that Owning a Home and Flapjack teams have done with expandable sections in the past year. Here's a screenshot from the about site of a two-column list section that becomes expandable on the smallest breakpoint: @stephanieosan I think y'alls we also working on spacing rules? |
Linking off to this gray issue: #295 |
@benguhin I will assess what we've been doing about spacing. |
@stephanieosan We call those "expandable groups". Groups that only allow one to be open at a time are given the additional descriptor of "accordion-style". Code-wise, they are a part of cf-expandables, as they merely style combinations of multiple single expandables. |
I will say I prefer the grey lines on all expandables as we do not use full black lines in other areas of FJ (tables, rules, section dividers, etc.) not really sure how the black lines got in there. As for the type, I know we modified ours a bit for a FAQ section and bumped it up to h4 to create better hierarchy with the answers, but had been using the link style for most. The example @benguhin on the about the bureau page (http://beta.consumerfinance.gov/the-bureau/) with the blue text is also a bit of a fluke as we are moving towards using black title text as the default I believe. The History section (http://beta.consumerfinance.gov/the-bureau/history/) also makes use of the grey background style expandable (this one would need to updated to the 5% grey as @stephanieosan mentioned). |
@stephanieosan I think we should definitely consider the "black-lined expandable table pattern" and "background gray expandable" styles at the same time – it can make sense for them to be styled differently because they're used for different purposes, but we should (a) try to make them as similar as possible (b) update the guidelines based on the more advanced amounts of content that you guys have been expandifying and (c) provide more guidelines about how the patterns should adjust for responsiveness and accessibility As @Scotchester mentioned, we already have versions of both in cf-expandables: http://cfpb.github.io/cf-expandables/docs/#recommended-expandable-pattern @duelj I am also torn about those options. The button is so much cleaner. |
Things we could leave open?Two tweaks that I would propose we maintain as "designer discretion" would be: • ability to remove the stroke between header and content in the expanded version. I think sometimes it makes sense to include but other times it doesn't help the hierarchy and adds visual clutter (on both grey and white versions). • Ability to use grey lines on the white background version (also in example above). I think this helps to reduce complexity in a long list of expandables. We also haven't used many full black lines in Flapjack (most are 50% grey) and it would be nice to be able to do this to maintain consistency. Questions• Do we think there is a case where it would be ok to have the plus/minus minicon in the expandable format without the "show" or "hide" text? I know it is preferred for accessibility but we have found instances on mobile where having it makes headings break into multiple line prematurely, and looks very cluttered.
• Are there other instances people have like the example of the button expand that differ from that standard styles but seem like they have valid user cases? |
Trying to bring this to the finish line and it seems really close, this is my understanding of where things stand:
If there are any other outstanding design questions that aren't listed above please add by the morning of Friday 2/19/16 as I plan to move on to addressing questions and prepping page on Friday |
@duelj 1. Do we need title text options other than Avenir Next paragraph or H4? I gathered up some use cases and they seem to all be using either H4 or Paragraph Medium. Are there use cases for Paragraph Regular? I don't know of a need for any other title text options.
2. Do we need a white and grey version? Here's one possible way to define these (what do you think @duelj?):
3. Will there actually be 15px of space under the label text? Is this because of how space is measured? 4. Do we need the option to have a rule line under title in the expanded state? Additional edit
|
I was looking at updating the documentation for this today and came across a couple of things that felt like they needed to be sorted before updating the page. 1. Do we need title text options other than Avenir Next paragraph or H4? 2. Do we need a white and grey version? 3. Will there actually be 15px of space under the label text? Is this because of how space is measured? @nataliafitzgerald - You mentioned the 10px was due to updated spacing, but I am not sure i understand that reference, could you elaborate? If you are referring to the header spacing, my understanding was that the header spacing would only impact flowing passages of text not spacing in or between components. So the space between the expandable header and description copy should follow these guidelines but I didn't think they would influence space between the header and stokes or other elements. Maybe this isn't the spacing updates you were referring to though. 4. Do we need the option to have a rule line under title in the expanded state? @nataliafitzgerald - curious on your answer about this one, in the content doc you said lets get rid of them but on your last comment it sounded like you wanted to keep them. Just wanted to double-check where you landed on this. |
Here is an updated DM expandable page mock up reflecting some of the adjustments mentioned above |
Re: item 2: Do we have a clear use case for when a single expandable should have a white background? If so, can we specify that in the DM page? Re: item 3: The spacing issue is about the top/bottom padding in the collapsed state. The spacing update that Natalia is referring to is the shift from discussing vertical padding with respect to the cap height and baseline of a line of text, to discussing it with respect to the CSS From your latest page mockup, it looks like the design intent is 15px from top to cap height, and from baseline to bottom. In which case, we'd need to code it in the CSS as about 10px. If that's the case, we should update the spec here to be 10px, and adjust your bracket diagram accordingly. |
It could have a white background if it was on a grey well to stand out as a highlight. I felt the choice of when to use a contrasting background could be left to designer discretion. If the the 10px is the best way to represent our current spacing that works for me. The spacing thing confuses me, is it that in code 10px is used to mimic what 15px looks like in illustrator? Wouldn't the increment we choose cater to either devs or designers if that's the case? |
Ah, expandable in a well. That makes sense. Yes, 10px in CSS approximates what 15px from baseline to cap height (between two lines of text) would be in Illustrator. It's true that it will cater to one or the other, in a sense. But we did, in the course of the big spacing overhaul, determine that it was best for our design specs to match how they are implemented in code. To remember why we made this decision, think of a large running text field scenario. If you have two paragraphs of text in the same frame in Illustrator, and you use Space After on the first to give them some separation, that value in Illustrator will match what you want the value in CSS to be, because each line of text will also have a little built-in line height. It's only in scenarios like this one, where you're lining text up against a border or some other kind of structural boundary, that it's more natural for you to manually line it up x pixels from that boundary. |
@duelj |
This is all looking great to me, and since it is only the UI approval label on it, I suspect I have been a blocker. Apologies. The interaction and UX look good to me. My main edit to the way you're presenting the information is that I suggest calling the "Types" section "Interactions" to differentiate from the "Styles" section above and more clear identify the information about default vs. accordion behaviors. (I would also be up for "Behavior" as the label). With that change, I approve! @caheberer Etiquette question: do I wait to see the change before removing the UI approval tag? |
@schaferjh I'll leave that decision to the approvers. Whatever you feel comfortable with works for me. |
Below are adjustments made after feedback from the design meeting (green text shows content updates and is not part of design)1. Updated text for when to use background color on individual expandables 2. Update spacing for top and bottom of expandable section |
Looks great. Tag removed! |
@Scotchester from what I remember about our discussions, we were going to just match what designers spec'd, even if it didn't match exactly visually. So if it looks more like 10px in CSS, we'd ignore that and still code it to the spec'd 15px, because trying to make things match perfectly is nearly impossible in Ai (other apps like Sketch handle text more like CSS) |
Following up:@nataliafitzgerald is the design end of the this good to go? @Scotchester and @jimmynotjim - where do you think we should land on the spacing thing? I will admit I understood the spacing discussion differently after the header spacing adjustments, but am happy to include what ever spacings the rest of the DM is using in their specifications. Just want to make sure I have the right measurement. |
@jimmynotjim Yep, that's essentially what I was saying. @duelj Looks good to me, now! |
notes from DM meeting 3/21/16
|
@duelj Just a few final tweaks to the Design Manual page mock-up and we should be all set.
|
@nataliafitzgerald - I have made the updates you suggested and have noted the changes below. You can see an example of the full page here. For the "Expanded" examples, can you check the padding on the left and make sure it's set to 15px? In the "Group H4 with title stroke expanded state" what is the padding under the rule line? In the "Individual" section the expandable headings are Avenir paragraph. Should they be Avenir paragraph (medium) instead or is there a use case for Avenir paragraph (regular)? In the "Specifications" section, change Avenir medium to Avenir paragraph (medium). |
@duelj |
Ready to build Expandables page with updates to jump links as mentioned by @nataliafitzgerald |
This is soooooo done! |
Design and content for the Expandables page, edited from the DPG content. Sending source file to @iuloshi. Design or content critique welcome!
The text was updated successfully, but these errors were encountered: