-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(vwc-accordion): viv-388 accordion #683
Conversation
🚀 Latest successful build of the PR deployed here. 🚀 |
return opened; | ||
} | ||
|
||
openAll(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a case where openAll is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can only think this may be useful if it's a requirement to open all panels in desktop view but not on mobile.
I've messaged Joella to discuss if it's necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just thinking it might be a property rather then a method. since a method will need to be called and if transitioned, can cause layout shift upon page render
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { LitElement, property } from 'lit-element'; | ||
import { VWCExpansionPanelBase } from './vwc-expansion-panel-base.js'; | ||
|
||
export abstract class VWCExpansionPanelListBase extends LitElement { | ||
@property({ type: Boolean, reflect: true }) | ||
multi = false; | ||
|
||
private expansionPanels: HTMLCollectionOf<VWCExpansionPanelBase> | undefined = undefined; | ||
|
||
constructor() { | ||
super(); | ||
this.addEventListener('opened', this.handleOpened); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using base file for component is probably not a standard we want to carry out from MWC, if it's not being used by other components and is not a common class. I know it's the same with badge, but following the badge case we decided it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any possibility this base class will be useful for navigation? e.g. collapsing list-expansion-panel
when another is opened
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes actually. good point
@JoelGraham93 is this still a draft? |
Resolved conflicts with latest expansion-panel updates.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to observe multi
property? in a use-case where the prop is removed and no longer allows multiple open panels. the ones that are already opened remain open. not sure which ones to close in such case...
Interesting point. @jshenkman does this sound like a potential requirement to remove |
|
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
Currently doesn't support nested expansion panels which will be required for navigation