Skip to content

fix: filter out tab slots missing id or label#8361

Merged
f2c-ci-robot[bot] merged 1 commit into
halo-dev:mainfrom
LIlGG:fix/iconify-hidden-page
Feb 26, 2026
Merged

fix: filter out tab slots missing id or label#8361
f2c-ci-robot[bot] merged 1 commit into
halo-dev:mainfrom
LIlGG:fix/iconify-hidden-page

Conversation

@LIlGG

@LIlGG LIlGG commented Feb 24, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

/kind bug
/area ui

What this PR does / why we need it:

由于当注释掉或者使用判断语句隐藏掉的 slot 仍旧会出现在 useSlots() 中,因此选择过滤掉 slots 中为 undefined slot。

Which issue(s) this PR fixes:

Fixes #8349

Does this PR introduce a user-facing change?

解决 iconify 组件中存在隐藏的空白页面的问题

When building tabItems from default slots, filter out any slot entries whose id or label are undefined. This prevents undefined tab entries from being included in the tabs list and makes the component more robust against incomplete slot props.
@f2c-ci-robot f2c-ci-robot Bot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. area/ui Issues or PRs related to the Halo UI labels Feb 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

@pkg-pr-new

pkg-pr-new Bot commented Feb 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

@halo-dev/api-client

npm i https://pkg.pr.new/@halo-dev/api-client@8361

@halo-dev/components

npm i https://pkg.pr.new/@halo-dev/components@8361

@halo-dev/richtext-editor

npm i https://pkg.pr.new/@halo-dev/richtext-editor@8361

@halo-dev/ui-shared

npm i https://pkg.pr.new/@halo-dev/ui-shared@8361

@halo-dev/ui-plugin-bundler-kit

npm i https://pkg.pr.new/@halo-dev/ui-plugin-bundler-kit@8361

commit: e14c6b0

@codecov

codecov Bot commented Feb 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.83%. Comparing base (42c374d) to head (e14c6b0).
⚠️ Report is 456 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8361      +/-   ##
============================================
+ Coverage     59.55%   60.83%   +1.27%     
- Complexity     3812     3998     +186     
============================================
  Files           677      698      +21     
  Lines         23248    23856     +608     
  Branches       1500     1555      +55     
============================================
+ Hits          13846    14512     +666     
+ Misses         8764     8613     -151     
- Partials        638      731      +93     

☔ 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.

@ruibaby ruibaby left a comment

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.

/lgtm

@f2c-ci-robot f2c-ci-robot Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2026
@f2c-ci-robot

f2c-ci-robot Bot commented Feb 26, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2026
@f2c-ci-robot f2c-ci-robot Bot merged commit 2a9e074 into halo-dev:main Feb 26, 2026
12 checks passed
@ruibaby ruibaby added this to the 2.23.x milestone Feb 26, 2026
@ruibaby ruibaby modified the milestones: 2.23.x, 2.23.0 Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ui Issues or PRs related to the Halo UI kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Iconify 组件中存在隐藏的可点击页面

2 participants