Skip to content

Nesting accordions#82

Open
dinkzilla wants to merge 3 commits intoleifoolsen:masterfrom
dinkzilla:NestingAccordions
Open

Nesting accordions#82
dinkzilla wants to merge 3 commits intoleifoolsen:masterfrom
dinkzilla:NestingAccordions

Conversation

@dinkzilla
Copy link
Copy Markdown

@dinkzilla dinkzilla commented Oct 28, 2016

If you nest one accordion within another, multiple even listeners get assigned to the inner accordions, so events end up firing multiple times. As a result, the first nested accordion cannot be opened because a single click fires "toggle" twice (open then immediately close).

In other places, it looks like you used the "is-upgraded" class to prevent similar scenarios, so I used that here.

Also, I was having all sorts of issues getting the project to build. I removed eslint from the build process, since the project as-is was failing all sorts of rules. I also had to remove the build requirement for check-ins to get that to work and make some other tweeks to the build tasks. These were quick fixes tho to get my other stuff to build and check-in and the build process could take some more examination.

@dinkzilla
Copy link
Copy Markdown
Author

By the way, nesting accordions with aria-multiselectable="false" on the outer accordion will still cause issues. Opening inner accordion tabs will cause outer ones to close, since it considers all tabs to be part of the same accordion. I haven't had a chance to fix this yet, so I'll open an issue for it.

@leifoolsen
Copy link
Copy Markdown
Owner

Hello @dinkzilla: Thank you for reporting this - and thank you for wanting to help.

We have not had a need for nested accordion in our applications, so it is no surprise that there are issues here. To implement this I expect that it needs rewriting of code and unit tests. I'm going on from work the next two weeks - but if I get some free time I'll take a look at your pullrequesten.

return;
}else{
tabElement.classList.add('is-upgraded');
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is the important part. :)

@leifoolsen
Copy link
Copy Markdown
Owner

Hello @dinkzilla,
I'll try to take a look at this over the weekend. There is much to do at work, so unfortunately I have not had time to look at your PR.
Can you explain the use case for a nested accordion? As I see it, this has little use on small screens. Maybe it could it be an idea to create a separate component for this, for example. a nested menu (outline), which can be placed inside the accordion?

@dinkzilla
Copy link
Copy Markdown
Author

Our app essentially does rate scheduling, and we have Seasons being the top level accordion, but each Season can potentially have so many possible settings within it that we need to further group the options into smaller sets, to make the app easier to navigate.

Since the accordion doesn't have much padding or margin, it works pretty nicely, even on a fairly small screen. We've been using my branch of your library for the time being in our app, and it's been great. I'll see if I can get you some screenshots to show you how it looks when I have a second.

@dinkzilla
Copy link
Copy Markdown
Author

So the data in these images is dummy data, but here is a look at how the nested accordions look:

accordians

The Channel Groups in many scenarios end up well into the double digits, so being about to group them is important for our UX.

Our app is not targeting mobile, but it still seems to look pretty decent when on a smaller screen:

capture

@leifoolsen
Copy link
Copy Markdown
Owner

Hello,
Still working out of office.
Will start øooling into this during next week.

Regards

Den torsdag 10. november 2016 skrev Matt Dinkel notifications@github.com
følgende:

So the data in these images is dummy data, but here is a look at how the
nested accordions look:

[image: accordians]
https://cloud.githubusercontent.com/assets/5820014/20179576/cf4210fc-a724-11e6-83bd-faeb78975685.PNG

The Channel Groups in many scenarios end up well into the double digits,
so being about to group them is important for our UX.

Our app is not targeting mobile, but it still seems to look pretty decent
when on a smaller screen:

[image: capture]
https://cloud.githubusercontent.com/assets/5820014/20179679/5109033e-a725-11e6-827f-8e2dd2552ab3.PNG


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#82 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJnwJr6hlaiZ3LMUW0xYNcm7unQ9RY0cks5q8yWBgaJpZM4KjgWl
.

/Leif

@dinkzilla
Copy link
Copy Markdown
Author

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants