Skip to content

feat: support items & add deprecated warning - #312

Merged
zombieJ merged 25 commits into
react-component:masterfrom
Wxh16144-forks:wuxh/perf-items
Apr 14, 2023
Merged

feat: support items & add deprecated warning#312
zombieJ merged 25 commits into
react-component:masterfrom
Wxh16144-forks:wuxh/perf-items

Conversation

@Wxh16144

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercelBot commented Mar 29, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

NameStatusPreviewCommentsUpdated (UTC)
collapse❌ Failed (Inspect)Apr 14, 2023 9:12am

@codecov

codecovBot commented Mar 29, 2023

Copy link
Copy Markdown

Codecov Report

Merging #312 (7aa6b36) into master (ca4067a) will increase coverage by 0.27%.
The diff coverage is 100.00%.

❗ Current head 7aa6b36 differs from pull request most recent head efcd88e. Consider uploading reports for the commit efcd88e to get more accurate results

@@ Coverage Diff @@## master #312 +/- ##
==========================================
+ Coverage 98.85% 99.12% +0.27% 
==========================================
Files 4 5 +1 Lines 87 114 +27 Branches 33 40 +7 ==========================================
+ Hits 86 113 +27 
Misses 1 1 
Impacted FilesCoverage Δ
src/Panel.tsx100.00% <ø> (ø)
src/PanelContent.tsx90.90% <ø> (ø)
src/index.tsx100.00% <ø> (ø)
src/Collapse.tsx100.00% <100.00%> (ø)
src/hooks/useItems.tsx100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@kiner-tang

Copy link
Copy Markdown
Contributor

覆盖率掉了,看看?

Comment threaddocs/examples/basic.tsx Outdated
@Wxh16144

Copy link
Copy Markdown
ContributorAuthor

src/Collapse.tsx

覆盖率掉了,看看?

属性是透传的,所以忽略了,可以考虑补一补

@Wxh16144

Wxh16144 commented Mar 29, 2023

Copy link
Copy Markdown
ContributorAuthor

TODOs:

  • test coverage
  • header => label

Comment threadsrc/Collapse.tsx Outdated

const children = toArray(rawChildren).map(getNewChild);
// eslint-disable-next-line @typescript-eslint/no-shadow
const convertItemsToNodes = (items: ItemType[]) =>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个抽成一个 hooks:

constchildNodes=useItems(items,rawChildren);

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里没 get 到意思呢,求指点

This comment was marked as outdated.

Comment threadsrc/Collapse.tsx Outdated
@zombieJ
zombieJ merged commit fb94b44 into react-component:masterApr 14, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Wxh16144@kiner-tang@zombieJ