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

feat: add Lit renderer directives for dialog #3755

Merged
merged 22 commits into from
May 3, 2022
Merged

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Apr 29, 2022

Description

This PR implements a Lit renderer directive for each renderer property of the dialog component in order to provide a better DX for Lit users.

Part of #266

Dialog Content Renderer

import { dialogRenderer } from '@vaadin/dialog/lit.js';

<vaadin-dialog 
- .renderer=${(root, dialog) => render(html`...`, root, { eventContext: this })}
+  ${dialogRenderer((dialog) => html`...`)}
></vaadin-dialog>

Dialog Header Renderer

import { dialogHeaderRenderer } from '@vaadin/dialog/lit.js';

<vaadin-dialog 
- .headerRenderer=${(root, dialog) => render(html`...`, root, { eventContext: this })}
+  ${dialogHeaderRenderer((dialog) => html`...`)}
></vaadin-dialog>

Dialog Footer Renderer

import { dialogFooterRenderer } from '@vaadin/dialog/lit.js';

<vaadin-dialog 
- .footerRenderer=${(root, dialog) => render(html`...`, root, { eventContext: this })}
+  ${dialogFooterRenderer((dialog) => html`...`)}
></vaadin-dialog>

Type of change

  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs-beta/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

@vursen vursen force-pushed the feat/dialog/lit-renderer branch from 2a505c2 to 7496188 Compare April 29, 2022 14:02
@vursen vursen changed the title feat: add Lit renderer directives for dialog (WIP) feat: add Lit renderer directives for dialog Apr 29, 2022
@vursen vursen marked this pull request as ready for review April 29, 2022 19:08
@vursen vursen requested a review from web-padawan April 29, 2022 19:28
@vursen vursen force-pushed the feat/dialog/lit-renderer branch from bce0012 to 12f6a25 Compare May 2, 2022 13:09
@vursen vursen requested a review from tomivirkki May 2, 2022 13:39
@vursen vursen force-pushed the feat/dialog/lit-renderer branch from d6999ed to 28c3d99 Compare May 3, 2022 06:04
@vursen vursen force-pushed the feat/dialog/lit-renderer branch from e5a2c7f to 4db316e Compare May 3, 2022 08:29
@vursen vursen force-pushed the feat/dialog/lit-renderer branch from 77594ef to 0e2c971 Compare May 3, 2022 11:14
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vursen vursen merged commit 9abda02 into master May 3, 2022
@vursen vursen deleted the feat/dialog/lit-renderer branch May 3, 2022 11:26
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.1.0.beta1 and is also targeting the upcoming stable 23.1.0 version.

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.

5 participants