Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Improve filter button #308

Merged
merged 15 commits into from
Jul 14, 2015

Conversation

msecret
Copy link
Contributor

@msecret msecret commented Jun 30, 2015

This moves the filter button to the right side of the filter bar. This
was done so the filter button UI was attached to the actual filter
UI, so the button affords closing and opening the side bar.

This iteration doesn't include any animation. Animation would require
some extra work.

Fixes #293

This moves the filter button to the right side of the filter bar. This
was done so the filter button UI was attached to the actual filter
UI, so the button affords closing and opening the side bar.

This iteration doesn't include any animation. Animation would require
some extra work.
Marco Segreto added 2 commits June 30, 2015 11:45
This was done to ensure this new show/hide filter button looks nice
at all breakpoints an devices.
@msecret
Copy link
Contributor Author

msecret commented Jul 1, 2015

This is how it's looking at various breakpoints. @jenniferthibault @noahmanger, the position of the filter buttons breaks at the smallest breakpoint when its minified. It's running into the header below it.

screen shot 2015-07-01 at 4 53 03 pm
screen shot 2015-07-01 at 4 53 20 pm
screen shot 2015-07-01 at 4 53 37 pm
screen shot 2015-07-01 at 4 53 52 pm
screen shot 2015-07-01 at 4 54 01 pm
screen shot 2015-07-01 at 4 54 11 pm
screen shot 2015-07-01 at 4 54 16 pm

@jenniferthibault
Copy link
Contributor

@msecret I'm working through some other tweaks to different elements on other screen sizes you've shown, but:
A) Is this set of changes to the mobile view possible?;
B) Is this kind of markup helpful?

artboard 20

@noahmanger
Copy link
Contributor

This looks way better. A couple other ideas:

  1. Would love for this to default to closed on mobile so you see the data first.
  2. If that's the case, we may need an indicator that filters are applied.

@jenniferthibault
Copy link
Contributor

Next up: Show filters on mobile screens. Same philosophy for the changes you see here as in "hide filter" above.
artboard 20 copy

@jenniferthibault
Copy link
Contributor

Medium and XL screens:

artboard 23

artboard 22

Glad to talk through anything that throws a monkey wrench into something that I haven't noticed!

@jenniferthibault
Copy link
Contributor

I was confusing myself with all the descriptions of how the menu worked. I hope this helps to clarify!
artboard 24

@noahmanger
Copy link
Contributor

On small screens I'm worried that the icon switching sides with the text might be kind of a weird jump. Is there a reason you had it like that?

@jenniferthibault
Copy link
Contributor

THANK YOU @noahmanger ! It made sense in my head when I was making it, but I didn't pause to review it when finished. For small screens, the icon is now on the left so that people read it (and hopefully get the signal) before they have to read the text. For large screens, since the text is moving left-right, the icon is on the right so that the words disappear & reveal in-sync with the animation. Does that make sense, or should they all be on the same side? cc @msecret — sorry for the confusion here.

artboard 24 copy

@noahmanger
Copy link
Contributor

Nice. Yeah I think it makes sense to be on the right on large screens. I like it!

@msecret
Copy link
Contributor Author

msecret commented Jul 7, 2015

@noahmanger @jenniferthibault , I just updated this, here are some new screens.

screen shot 2015-07-07 at 3 27 11 pm
screen shot 2015-07-07 at 3 27 17 pm
screen shot 2015-07-07 at 3 27 29 pm
screen shot 2015-07-07 at 3 27 42 pm

Marco Segreto added 7 commits July 7, 2015 15:28
This incorporated fixes such as positioning the button on various
breakpoints, centering the paging content at the mobile breakpoints,
ensuring the arrows on the hide/show filters button is always there
and ensuring consistent borders and positioning.
Before the filter code had to be duplicated in two separate templates
for candidates and committees. This moves it into a shared files that
uses variables set by both parent templates to display the filters.
This only incorperates the design feedback on teh actual filter button
not the other things about positioning.

- Lining up filter button and result info box so they're aligned
  visually.
- Keep the filter button the same color on hover so it fits nicely
  with the box it's part of.
- Ensure result table's width is always a percentage so it's width
  lines up with the result info box above when the filter toggles.
- Move apply filter button to the center at sm and md breakpoints.
We are adding animation to the side bar when it opens and closes to
make the tranistion more seamless to the user.
Jen recommended adding more padding to the filter box and table for
the mobile view so it matches up with the padding for the header
above it.
After discussion with Jen, we decided that the sorting icon would make
more sense if right next to the text for the header rather the off to
the right so they have a spacial connection to eachother.
@msecret
Copy link
Contributor Author

msecret commented Jul 13, 2015

Still left to do:

  • Mobile animation for filter slide up. I'm having trouble with this, not 100% we should do it right now.
  • Fix staggering fields problem on tablet. I think I might want to put this in a different PR has it's pretty separate from this issue.

@@ -23,24 +23,144 @@
}

.side-panel {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my fault for the way this was originally implemented, but the glossary also has the .side-panel class, so all of these style changes break it. We could either move them to .side-panel--left or remove the .side-panel class from the glossary. (They started out as similarly functioning things, so made sense for them to share some styles, but they're no pretty different so maybe it makes more sense to break them out).

margin-top: 1em;
}

&.side-panel--open {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be nested or can it be moved up a level?

Marco Segreto added 2 commits July 13, 2015 16:20
The styles for the side bar were breaking the style for the glossary
side bar. This change moves the style rules so it only applies to
the new side bar.
…ove_filter_button

Conflicts:
	static/js/modules/tables.js
@@ -165,6 +165,7 @@ function initTable($table, $form, baseUrl, columns) {
var $paging = $(api.table().container()).find('.results-info--top');
$paging.prepend($('#filter-toggle'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line needs to be removed. It's moving the button.

noahmanger pushed a commit that referenced this pull request Jul 14, 2015
@noahmanger noahmanger merged commit a658f80 into fecgov:develop Jul 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants