-
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(snackbar): iss 783 viv 402 snackbar #808
Conversation
🚀 Latest successful build of the PR deployed here. 🚀 |
stories are evil |
actualElement.show(); | ||
await waitNextTask(); | ||
|
||
await expect(actualElement).shadowDom.accessible(); |
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.
What does accessible
do?
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.
a11y plugin installs this check and the method that is running within, to the best of my knowledge, performs set of accessibility checks (aria labels, contrast color etc).
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.
So it is magic? I like...
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.
Not really magic, but something quite similar to equalSnapshot
.
export enum Position { | ||
Top = 'TOP', | ||
Bottom = 'BOTTOM', | ||
Start = 'START', | ||
Center = 'CENTER', | ||
End = 'END' | ||
} |
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.
no horizontal position?
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.
start / center / end - this is horizontal.
private renderFlavor(legacy: boolean): TemplateResult { | ||
const partValue = legacy ? undefined : 'vvd-scheme-alternate'; | ||
return html`<div class="vivid-snackbar" part="${ifDefined(partValue)}"> | ||
<vwc-note | ||
icon="${ifDefined(this.icon)}" | ||
connotation="${ifDefined(this.connotation)}" | ||
header="${ifDefined(this.header)}" | ||
> | ||
<div class="snackbar-content"> | ||
<div> | ||
${this.message} | ||
<div class="action-container"> | ||
<slot name="action" @click="${this.handleActionClick}"></slot> | ||
</div> | ||
</div> | ||
<div class="dismiss-container"> | ||
${this.renderDismissAction()} | ||
</div> | ||
</div> | ||
</vwc-note> | ||
</div>`; | ||
} |
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.
why such a large indentation? by eslint approval?
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.
it is just github presentation - in the IDE it looks okay :)
@@ -2831,6 +2831,17 @@ | |||
lit-html "^1.1.2" |
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.
OMG - seeing yarn.lock changing scares me now... ;)
const [snackbar] = addElement( | ||
textToDomToParent(`<${COMPONENT_NAME} message="Message"></${COMPONENT_NAME}>`) | ||
); | ||
await openSnackbar(snackbar); |
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.
Move to beforeEach?
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.
Done.
const [snackbar] = addElement( | ||
textToDomToParent(`<${COMPONENT_NAME}></${COMPONENT_NAME}>`) | ||
); | ||
await snackbar.updateComplete; | ||
await openSnackbar(snackbar); |
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.
Can move to beforeEach
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.
Done.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
closes #783