Skip to content

Commit

Permalink
Changes from self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
xander-marjoram committed Jul 25, 2024
1 parent 3b0bec2 commit 031a487
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 22 deletions.
29 changes: 20 additions & 9 deletions .changeset/heavy-phones-talk.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
---
"@justeattakeaway/pie-assistive-text": patch
"@justeattakeaway/pie-checkbox-group": patch
"@justeattakeaway/generator-pie-component": patch
"@justeattakeaway/pie-notification": patch
"@justeattakeaway/pie-form-label": patch
"@justeattakeaway/pie-webc-core": patch
"@justeattakeaway/pie-assistive-text": patch
"@justeattakeaway/pie-button": patch
"@justeattakeaway/pie-card": patch
"@justeattakeaway/pie-checkbox": patch
"@justeattakeaway/pie-checkbox-group": patch
"@justeattakeaway/pie-chip": patch
"@justeattakeaway/pie-cookie-banner": patch
"@justeattakeaway/pie-css": patch
"@justeattakeaway/pie-divider": patch
"@justeattakeaway/pie-form-label": patch
"@justeattakeaway/pie-icon-button": patch
"@justeattakeaway/pie-icons-react": patch
"@justeattakeaway/pie-icons-vue": patch
"@justeattakeaway/pie-link": patch
"@justeattakeaway/pie-modal": patch
"@justeattakeaway/pie-notification": patch
"@justeattakeaway/pie-spinner": patch
"@justeattakeaway/pie-button": patch
"@justeattakeaway/pie-switch": patch
"@justeattakeaway/pie-modal": patch
"@justeattakeaway/pie-card": patch
"@justeattakeaway/pie-chip": patch
"@justeattakeaway/pie-tag": patch
"@justeattakeaway/pie-text-input": patch
"@justeattakeaway/pie-textarea": patch
"@justeattakeaway/pie-toast": patch
"@justeattakeaway/pie-webc-core": patch
"@justeattakeaway/pie-webc-testing": patch
"@justeattakeaway/pie-wrapper-react": patch
"pie-storybook": patch
---

Expand Down
5 changes: 1 addition & 4 deletions packages/components/pie-cookie-banner/src/defs.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { type TemplateResult } from 'lit';
import { type ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';

import {
type TemplateResult,
} from 'lit';

export interface CookieBannerLocale {
banner: {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
type TemplateResult,
} from 'lit';
import { type TemplateResult } from 'lit';

import {
type CookieBannerLocale,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LitElement, html, unsafeCSS } from 'lit';
<% if (needsRTL) { %>import { RtlMixin, defineCustomElement } from '@justeattakeaway/pie-webc-core';<% } %>
<% if (!needsRTL) { %>import { defineCustomElement } from '@justeattakeaway/pie-webc-core';<% } %>
import styles from './<%= fileName %>.scss?inline';
import { <%= componentName %>Props } from './defs';
import { type <%= componentName %>Props } from './defs';

// Valid values available to consumers
export * from './defs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/webc-fixtures.ts';
import { Pie<%= componentName %>, <%= componentName %>Props } from '../../src/index.ts';
import { Pie<%= componentName %>, type <%= componentName %>Props } from '../../src/index.ts';

test.describe('Pie<%= componentName %> - Accessibility tests', () => {
test('a11y - should test the Pie<%= componentName %> component WCAG compliance', async ({ makeAxeBuilder, mount }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { test, expect } from '@sand4rt/experimental-ct-web';
import { Pie<%= componentName %>, <%= componentName %>Props } from '../../src/index.ts';
import { Pie<%= componentName %>, type <%= componentName %>Props } from '../../src/index.ts';

const componentSelector = '[data-test-id="pie-<%= fileName %>"]';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import { test } from '@sand4rt/experimental-ct-web';
import percySnapshot from '@percy/playwright';
import { Pie<%= componentName %>, <%= componentName %>Props } from '../../src/index.ts';
import { Pie<%= componentName %>, type <%= componentName %>Props } from '../../src/index.ts';

test.describe('Pie<%= componentName %> - Visual tests`', () => {
test('should display the Pie<%= componentName %> component successfully', async ({ page, mount }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/pie-wrapper-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ With this package, the below code (example of `pie-button`) is automatically gen
import * as React from 'react';
import { createComponent } from '@lit/react';
import { PieButton as PieButtonLit } from './index';
import { ButtonProps } from './defs';
import { type ButtonProps } from './defs';

const PieButtonReact = createComponent({
displayName: 'PieButton',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export function addReactWrapper (customElementsObject) {
componentSrc = `import * as React from 'react';
import { createComponent${component.class.events?.length > 0 ? ', type EventName' : ''} } from '@lit/react';
import { ${component.class.name} as ${component.class.name}Lit } from './index';
import { ${componentPropsExportName} } from './defs';
import { type ${componentPropsExportName} } from './defs';
export * from './defs';
Expand Down

0 comments on commit 031a487

Please sign in to comment.