Skip to content

feat(module:collapse): add support of nzSize - #9348

Merged
Laffery merged 2 commits into
NG-ZORRO:masterfrom
Nicoss54:feature/collapse-size
Aug 25, 2025
Merged

Laffery merged 2 commits into
NG-ZORRO:masterfrom
Nicoss54:feature/collapse-size

Conversation

@Nicoss54

Copy link
Copy Markdown
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Collapse component now support nzSize property

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This comment was marked as outdated.

@Nicoss54 Nicoss54 linked an issue Aug 23, 2025 that may be closed by this pull request
@codecov

codecov Bot commented Aug 23, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.13%. Comparing base (ce611e5) to head (a11a367).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9348   +/-   ##
=======================================
  Coverage   92.13%   92.13%           
=======================================
  Files         561      561           
  Lines       19649    19653    +4     
  Branches     3003     3004    +1     
=======================================
+ Hits        18104    18108    +4     
  Misses       1208     1208           
  Partials      337      337           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Nicoss54

Copy link
Copy Markdown
Collaborator Author

@Laffery @HyperLife1119 if one of both of you could just rereun the linter it could be nice :)

Currently it failed cause the npm install step crash ...

@Laffery

Laffery commented Aug 23, 2025

Copy link
Copy Markdown
Collaborator

@Laffery @HyperLife1119 if one of both of you could just rereun the linter it could be nice :)

triggered

@Nicoss54

Copy link
Copy Markdown
Collaborator Author

@Laffery @HyperLife1119 if one of both of you could just rereun the linter it could be nice :)

triggered

@Laffery oh thanks you rock :)

Comment thread components/collapse/collapse.component.ts Outdated
Comment thread components/collapse/demo/size.md Outdated
Comment thread components/collapse/demo/size.md Outdated
Comment thread components/collapse/demo/size.md Outdated
Comment thread components/collapse/demo/size.ts
@Nicoss54
Nicoss54 requested review from Laffery and Copilot August 23, 2025 15:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for the nzSize property to the Collapse component, allowing users to set the size of collapse panels to 'small', 'middle' (default), or 'large'.

  • Adds nzSize input property with type NzSizeLMSType and default value 'middle'
  • Implements CSS styling for small and large size variants with appropriate padding adjustments
  • Updates documentation in both English and Chinese to document the new property

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
components/collapse/collapse.component.ts Adds nzSize input property and host class bindings for size variants
components/collapse/style/index.less Implements CSS styles for small and large collapse sizes with adjusted padding
components/collapse/doc/index.zh-CN.md Documents nzSize property in Chinese documentation
components/collapse/doc/index.en-US.md Documents nzSize property in English documentation
components/collapse/demo/size.ts Creates demo component showcasing different collapse sizes
components/collapse/demo/size.md Adds demo documentation for size feature
components/collapse/collapse.spec.ts Adds comprehensive tests for size functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread components/collapse/style/index.less
@Nicoss54

Copy link
Copy Markdown
Collaborator Author

@Laffery again if you could just re run the lint and test on the pipeline could be very nice

Failed again at the step on npm istall, seems to be a problem with the connection to the npm regsitry

@Laffery

Laffery commented Aug 23, 2025

Copy link
Copy Markdown
Collaborator

LGTM

@HyperLife1119 HyperLife1119 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Laffery
Laffery merged commit b5c256d into NG-ZORRO:master Aug 25, 2025
@Nicoss54
Nicoss54 deleted the feature/collapse-size branch August 29, 2025 17:26
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.

4 participants