Repository navigation
Collapse packages/themes on click - #593
Conversation
|
This will need some specs. |
There was a problem hiding this comment.
Any reason you're using underscore-plus's map function here instead of native Array.map?
There was a problem hiding this comment.
No reason. I'll change that right away
|
Specs added @50Wliu |
|
This looks really good! Maybe we can have one spec that only collapses one sub-section? And perhaps one to verify that expanding collapses sections also work? That could help guard against any future regressions. Besides these minor additions, this looks really to ⛵. |
|
Updated the specs and removed the empty lines as you suggested, @thomasjo |
There was a problem hiding this comment.
I think this selector could be simplified to just .sub-section.collapsed .package-container – I'd also like to avoid referencing Bootstrap classes (like .row) since this package will stop using the Bootstrap grid at some point.
There was a problem hiding this comment.
Using .sub-section.collapsed .package-container makes sections with zero packages to change in size when their headers are clicked. Would that be ok?
There was a problem hiding this comment.
Hmmm what about .sub-section.collapsed .package-container .package-card?
There was a problem hiding this comment.
Sure, no problem! 💃
|
Been trying this out this morning and I like it. I do think the affordance of the click to collapse/expand is missing. There's no hint that clicking will expand or collapse the section. We will have to fix that. The easiest route is to use the fold and unfold icons. I'll experiment with this shortly. /cc @simurai |
|
Thanks @thomasjo Let me know if you need anything! |
|
@acontreras89 Here's what I came up with: 4cc717d You should be able to cherry-pick that commit into your branch (if you like it). I can tweak it further first if you want. And if you don't like, be honest. |
|
By the way, is there any reason you're targeting .sub-section.collapsed .package-container {
display: none;
}There might be a very good reason that I'm completely ignorant to, just figured I'd ask the obvious question. |
|
I also think the waster whitespace between collapsed sections should be altered, but I can fix that later in a separate PR, just mentioning it for posterity. |
|
@thomasjo Looks good to me! 👍
|
|
@mnquintana Thanks for the heads up. We can tweak those little things later. There are some improvements I'd like to make, but I don't want that to stop this PR from moving forward. This is already a huge improvement over the current situation. |
I definitely agree. |
|
Unless anyone has any further comments or suggestions, I think this is ready to 🚢. /cc @atom/feedback |
|
👍 |
Collapse packages/themes on click
|
Thanks @acontreras89! Awesome work ❤️ |
|
No problem at all, @thomasjo |
|
Nice.. 👏 |

Minimal implementation of the enhancement requested in #475.
Closes #475