Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added SemanticAccordion components #12

Closed
wants to merge 1 commit into from

Conversation

thuey
Copy link

@thuey thuey commented Apr 12, 2016

I know I would still need to create a demo entry for this, but I noticed you were also working on the accordion, and I wanted you to be able to take a look at my accordion implementation. My team and I are really interested in adding angular2 support for semantic. Your repo seemed further along than anything else out there, so if you're interested, we could work on this together to get it feature complete.

@vladotesanovic
Copy link
Owner

That would be great.
I see that you use semantic.d.ts typings ( i removed that ), and i will remove typings folder from repo too.

What is benefit of having AccordinationTitle and AccordinationContent in separate components?

This @input ('accordionOptions') is good approach for bridging jquery api and semantic components. I will try to implement and use that.

@thuey
Copy link
Author

thuey commented Apr 12, 2016

I debated about whether or not to have AccordionTitle and AccordionContent.
What it boiled down to, is that I wanted to make it easier for the user to
not have to remember to add the classes that Semantic UI requires to be
present every time they want to use one of the components. I also wanted to
encapsulate the implementation, so that if Semantic UI changes the names of
those classes, they just have to be changed on those Components in
ngSemantic, instead of the end user replacing the classes throughout their
entire project. The Ionic Framework takes a similar approach, and it has
worked out well. However, Ionic is a bit too aggressive imo. It adds
classes that are not required, too, that affect the behavior of their
directives. My intent was to allow users to define any optional classes
they want, but to make sure we add the core classes for them.

Why did you decide on the name accordination instead of accordion?

On Tue, Apr 12, 2016 at 8:24 AM Vlado Tesanovic notifications@github.com
wrote:

That would be great.
I see that you use semantic.d.ts typings ( i removed that ), and i will
remove typings folder from repo too.

What is benefit of having AccordinationTitle and AccordinationContent in
separate components?

This @input https://github.com/Input ('accordionOptions') is good
approach for bridging jquery api and semantic components. I will try to
implement and use that.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#12 (comment)

@vladotesanovic
Copy link
Owner

No reason, and you are right, i will change name of this module.

Problem with inner components, like: AccordionTitle, AccordionContent inside AccordionItem inside AccorionElement... is that they add lot of shadow DOM elements.
Semantic UI often use pseudo classes like ':first-element, .clas1 + clas2... ' And things often not work without changing viewEncapsulation in Angular2 or css customization.

@thuey
Copy link
Author

thuey commented Apr 12, 2016

I see your point, but I think it's okay if all of the components have viewEncapsulation set to None. ngSemantic already relies on global stylesheets for Semantic UI's styles. But I just started on this, so I might be misunderstanding the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants