Skip to content

Commit

Permalink
feat: 适配微信 Skyline 组件 (#15549)
Browse files Browse the repository at this point in the history
* fix(weapp): support skyline components

#14698

* test: update snapshot

* fix: 修复 Skyline 模式下 CustomWrapper 样式丢失问题 #14699

* chore(runner): 补充 runner 的 skyline 测试用例

* fix(mini-runner): 更新测试用例快照

* fix(types): 更新 GridView types

* feat(component): 新增 grid-builder 和 list-builder

* feat(skyline): 适配 open-container 组件

* feat(skyline): 补齐缺失的 skyline 组件

* test: 补全 skyline 组件测试用例

* test(mini-runner): update snapshots

* test(webpack5-runner): update snapshots

* test(webpack5-runner): update snapshots

* test(webpack5-runner): update snapshots

* chore: update ci workflow

* Revert "chore: update ci workflow"

This reverts commit 6d3fc8b.

* test(webpack5-runner): update snapshots

---------

Co-authored-by: konka <1094918@gmail.com>
Co-authored-by: hemingjin <hemingjin@jd.com>
Co-authored-by: ZEJIA LIU <53506531+ZEJIA-LIU@users.noreply.github.com>
Co-authored-by: Zakary <zakarycode@gmail.com>
  • Loading branch information
5 people committed Apr 29, 2024
1 parent 598c369 commit d99ed0c
Show file tree
Hide file tree
Showing 93 changed files with 10,563 additions and 1,918 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
camelcase: 0,
'eol-last': 0,
'comma-dangle': 0,
'no-mixed-operators': 1,
'no-mixed-operators': 0,
'no-multiple-empty-lines': 0,
'import/first': 2,
'import/newline-after-import': 2,
Expand Down
25 changes: 25 additions & 0 deletions packages/taro-components/__tests__/draggable-sheet.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { h } from '@stencil/core'
import { newSpecPage, SpecPage } from '@stencil/core/testing'

import { DraggableSheet } from '../src/components/draggable-sheet/draggable-sheet'
import { printUnimplementedWarning } from './utils'

const logError = jest.fn()
console.error = logError

describe('DraggableSheet', () => {
let page: SpecPage

it('unimplemented', async () => {
page = await newSpecPage({
components: [DraggableSheet],
template: () => (<taro-draggable-sheet-core />),
})
await page.waitForChanges()

expect(page.root).toEqualHtml(`
<taro-draggable-sheet-core></taro-draggable-sheet-core>
`)
expect(logError).toHaveBeenCalledWith(printUnimplementedWarning(page.root))
})
})
25 changes: 25 additions & 0 deletions packages/taro-components/__tests__/grid-builder.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { h } from '@stencil/core'
import { newSpecPage, SpecPage } from '@stencil/core/testing'

import { GridBuilder } from '../src/components/grid-builder/grid-builder'
import { printUnimplementedWarning } from './utils'

const logError = jest.fn()
console.error = logError

describe('GridBuilder', () => {
let page: SpecPage

it('unimplemented', async () => {
page = await newSpecPage({
components: [GridBuilder],
template: () => (<taro-grid-builder-core />),
})
await page.waitForChanges()

expect(page.root).toEqualHtml(`
<taro-grid-builder-core></taro-grid-builder-core>
`)
expect(logError).toHaveBeenCalledWith(printUnimplementedWarning(page.root))
})
})
25 changes: 25 additions & 0 deletions packages/taro-components/__tests__/list-builder.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { h } from '@stencil/core'
import { newSpecPage, SpecPage } from '@stencil/core/testing'

import { ListBuilder } from '../src/components/list-builder/list-builder'
import { printUnimplementedWarning } from './utils'

const logError = jest.fn()
console.error = logError

describe('ListBuilder', () => {
let page: SpecPage

it('unimplemented', async () => {
page = await newSpecPage({
components: [ListBuilder],
template: () => (<taro-list-builder-core />),
})
await page.waitForChanges()

expect(page.root).toEqualHtml(`
<taro-list-builder-core></taro-list-builder-core>
`)
expect(logError).toHaveBeenCalledWith(printUnimplementedWarning(page.root))
})
})
25 changes: 25 additions & 0 deletions packages/taro-components/__tests__/nested-scroll-body.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { h } from '@stencil/core'
import { newSpecPage, SpecPage } from '@stencil/core/testing'

import { NestedScrollBody } from '../src/components/nested-scroll-body/nested-scroll-body'
import { printUnimplementedWarning } from './utils'

const logError = jest.fn()
console.error = logError

describe('NestedScrollBody', () => {
let page: SpecPage

it('unimplemented', async () => {
page = await newSpecPage({
components: [NestedScrollBody],
template: () => (<taro-nested-scroll-body-core />),
})
await page.waitForChanges()

expect(page.root).toEqualHtml(`
<taro-nested-scroll-body-core></taro-nested-scroll-body-core>
`)
expect(logError).toHaveBeenCalledWith(printUnimplementedWarning(page.root))
})
})
25 changes: 25 additions & 0 deletions packages/taro-components/__tests__/nested-scroll-header.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { h } from '@stencil/core'
import { newSpecPage, SpecPage } from '@stencil/core/testing'

import { NestedScrollHeader } from '../src/components/nested-scroll-header/nested-scroll-header'
import { printUnimplementedWarning } from './utils'

const logError = jest.fn()
console.error = logError

describe('NestedScrollHeader', () => {
let page: SpecPage

it('unimplemented', async () => {
page = await newSpecPage({
components: [NestedScrollHeader],
template: () => (<taro-nested-scroll-header-core />),
})
await page.waitForChanges()

expect(page.root).toEqualHtml(`
<taro-nested-scroll-header-core></taro-nested-scroll-header-core>
`)
expect(logError).toHaveBeenCalledWith(printUnimplementedWarning(page.root))
})
})
25 changes: 25 additions & 0 deletions packages/taro-components/__tests__/open-container.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { h } from '@stencil/core'
import { newSpecPage, SpecPage } from '@stencil/core/testing'

import { OpenContainer } from '../src/components/open-container/open-container'
import { printUnimplementedWarning } from './utils'

const logError = jest.fn()
console.error = logError

describe('OpenContainer', () => {
let page: SpecPage

it('unimplemented', async () => {
page = await newSpecPage({
components: [OpenContainer],
template: () => (<taro-open-container-core />),
})
await page.waitForChanges()

expect(page.root).toEqualHtml(`
<taro-open-container-core></taro-open-container-core>
`)
expect(logError).toHaveBeenCalledWith(printUnimplementedWarning(page.root))
})
})
25 changes: 25 additions & 0 deletions packages/taro-components/__tests__/span.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { h } from '@stencil/core'
import { newSpecPage, SpecPage } from '@stencil/core/testing'

import { Span } from '../src/components/span/span'
import { printUnimplementedWarning } from './utils'

const logError = jest.fn()
console.error = logError

describe('Span', () => {
let page: SpecPage

it('unimplemented', async () => {
page = await newSpecPage({
components: [Span],
template: () => <taro-span-core />,
})
await page.waitForChanges()

expect(page.root).toEqualHtml(`
<taro-span-core></taro-span-core>
`)
expect(logError).toHaveBeenCalledWith(printUnimplementedWarning(page.root))
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Component, ComponentInterface, h, Host } from '@stencil/core'

import { notSupport } from '../../utils'

@Component({
tag: 'taro-draggable-sheet-core'
})
export class DraggableSheet implements ComponentInterface {
componentDidLoad () {
notSupport('DraggableSheet', this)
}

render () {
return (
<Host />
)
}
}
10 changes: 10 additions & 0 deletions packages/taro-components/src/components/draggable-sheet/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# taro-draggable-sheet-core



<!-- Auto Generated Below -->


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Component, ComponentInterface, h, Host } from '@stencil/core'

import { notSupport } from '../../utils'

@Component({
tag: 'taro-grid-builder-core'
})
export class GridBuilder implements ComponentInterface {
componentDidLoad () {
notSupport('GridBuilder', this)
}

render () {
return (
<Host />
)
}
}
10 changes: 10 additions & 0 deletions packages/taro-components/src/components/grid-builder/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# taro-grid-builder-core



<!-- Auto Generated Below -->


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Component, ComponentInterface, h, Host } from '@stencil/core'

import { notSupport } from '../../utils'

@Component({
tag: 'taro-list-builder-core'
})
export class ListBuilder implements ComponentInterface {
componentDidLoad () {
notSupport('ListBuilder', this)
}

render () {
return (
<Host />
)
}
}
10 changes: 10 additions & 0 deletions packages/taro-components/src/components/list-builder/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# taro-list-builder-core



<!-- Auto Generated Below -->


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Component, ComponentInterface, h, Host } from '@stencil/core'

import { notSupport } from '../../utils'

@Component({
tag: 'taro-nested-scroll-body-core'
})
export class NestedScrollBody implements ComponentInterface {
componentDidLoad () {
notSupport('NestedScrollBody', this)
}

render () {
return (
<Host />
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# taro-nested-scroll-body-core



<!-- Auto Generated Below -->


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Component, ComponentInterface, h, Host } from '@stencil/core'

import { notSupport } from '../../utils'

@Component({
tag: 'taro-nested-scroll-header-core'
})
export class NestedScrollHeader implements ComponentInterface {
componentDidLoad () {
notSupport('NestedScrollHeader', this)
}

render () {
return (
<Host />
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# taro-nested-scroll-header-core



<!-- Auto Generated Below -->


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Component, ComponentInterface, h, Host } from '@stencil/core'

import { notSupport } from '../../utils'

@Component({
tag: 'taro-open-container-core'
})
export class OpenContainer implements ComponentInterface {
componentDidLoad () {
notSupport('OpenContainer', this)
}

render () {
return (
<Host />
)
}
}
10 changes: 10 additions & 0 deletions packages/taro-components/src/components/open-container/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# taro-open-container-core



<!-- Auto Generated Below -->


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
8 changes: 8 additions & 0 deletions packages/taro-components/src/components/span/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# taro-span-core

<!-- Auto Generated Below -->


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
16 changes: 16 additions & 0 deletions packages/taro-components/src/components/span/span.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component, ComponentInterface, h, Host } from '@stencil/core'

import { notSupport } from '../../utils'

@Component({
tag: 'taro-span-core',
})
export class Span implements ComponentInterface {
componentDidLoad() {
notSupport('Span', this)
}

render() {
return <Host />
}
}

0 comments on commit d99ed0c

Please sign in to comment.