Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add IconV2 with new svg settings and revert old Icons changed by PR #384 #387

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

physicsSorcererKing
Copy link
Contributor

@physicsSorcererKing physicsSorcererKing commented May 5, 2024

Why need this change? / Root cause:

  • 因為為了新的ButtonV2動到了舊icon的設定,在舊版網頁上會遇到未正確顯示顏色而看起來像消失的問題。

Changes made:

  • 於是採用新舊icon分開的作法,新Icon就叫IconV2,並增加style prop;舊的icon設定全數還原。

Test Scope / Change impact:

  • 修改storybook對於IconV2的背景顏色,讓icon變得更明顯。
  • 新增對於IconV2 style prop的測試。

Issue

@physicsSorcererKing physicsSorcererKing linked an issue May 5, 2024 that may be closed by this pull request
Copy link

sonarcloud bot commented May 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@GaaSBot
Copy link

GaaSBot commented May 5, 2024

Knip Scan Result for 9d1aaa8

Unused files (9)
Unused files (9)
.bundlewatch.config.js
components/shared/Chat/ChatContent.tsx
components/shared/Chat/ChatMessage.tsx
components/shared/Chat/index.tsx
configs/i18nConfigs.ts
lighthouserc.js
reset.d.ts
scripts/knipScanReporter.js
scripts/lhciScanReporter.js
Unused dependencies (2)
Unused dependencies (2)
@svgr/webpack package.json
sharp package.json
Unused devDependencies (5)
Unused devDependencies (5)
@actions/github package.json
@octokit/core package.json
@storybook/blocks package.json
@storybook/testing-library package.json
@total-typescript/ts-reset package.json
Unused exported types (2)
Unused exported types (2)
ChatProps type components/shared/Chat/v2/Chat.tsx
ChatHeaderProps type components/shared/Chat/v2/ChatHeader.tsx
Unused exported types in namespaces (1)
Unused exported types in namespaces (1)
BaseBoxFancyProp interface components/shared/BoxFancy/BoxFancy.tsx
Configuration issues (1)
Configuration issues (1)
Unused item in ignoreDependencies: @next/bundle-analyzer

@GaaSBot
Copy link

GaaSBot commented May 5, 2024

🤖 Lighthouse Scan Result for 9d1aaa8

/rooms
Metric Value
Performance 72
Seo 78
Accessibility 78
HTML Report for LHCI Scan Report Link
/rooms/abc
Metric Value
Performance 77
Seo 78
Accessibility 64
HTML Report for LHCI Scan Report Link
/login
Metric Value
Performance 75
Seo 78
Accessibility 93
HTML Report for LHCI Scan Report Link

@physicsSorcererKing physicsSorcererKing changed the title Add IconV2 with new svg settings and revert old Icons changed by PR #384 feat: Add IconV2 with new svg settings and revert old Icons changed by PR #384 May 12, 2024
@github-actions github-actions bot added the feature New Feature label May 12, 2024
@physicsSorcererKing physicsSorcererKing requested review from JohnsonMao and removed request for ricksu978 May 12, 2024 12:09
@physicsSorcererKing physicsSorcererKing changed the title feat: Add IconV2 with new svg settings and revert old Icons changed by PR #384 fix: Add IconV2 with new svg settings and revert old Icons changed by PR #384 May 20, 2024
@github-actions github-actions bot added the bug Fix something in main label May 20, 2024
@physicsSorcererKing physicsSorcererKing self-assigned this May 20, 2024
Copy link
Contributor

@JohnsonMao JohnsonMao left a comment

Choose a reason for hiding this comment

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

幫我把 storybook 白底白字的部分調整好就可以了~
其他看起來 ok


return (
<>
<p className="absolute top-[-1.25rem] right-0 text-white/90">
Copy link
Contributor

Choose a reason for hiding this comment

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

這裡的 className 幫我調整成 absolute top-0 right-4 text-zinc-950
讓 storybook 的白畫面可以看的到字

label="搜尋"
value={value}
onChange={setValue}
labelClassName="mr-3 leading-normal"
Copy link
Contributor

Choose a reason for hiding this comment

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

labelClassName 也幫我改成 mr-3 leading-normal text-zinc-950
讓字顯示出來

onClick={handleClick(iconName)}
>
<IconV2 name={iconName} className="w-full h-full" />
<p className="text-center text-white/90 whitespace-nowrap">
Copy link
Contributor

Choose a reason for hiding this comment

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

這裡的 className 幫我改成 text-center text-zinc-950 whitespace-nowrap
讓字顯示出來

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix something in main feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix: some icon disappeared
3 participants