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

feat: number-input #1379

Merged
merged 9 commits into from
Oct 7, 2024
Merged

feat: number-input #1379

merged 9 commits into from
Oct 7, 2024

Conversation

RyushiAok
Copy link
Collaborator

@RyushiAok RyushiAok commented Oct 4, 2024

タスク

resolve: #1346

Copy link

changeset-bot bot commented Oct 4, 2024

🦋 Changeset detected

Latest commit: 16fde5d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@wizleap-inc/wiz-ui-react Minor
@wizleap-inc/wiz-ui-next Minor
@wizleap-inc/wiz-ui-constants Minor
@wizleap-inc/wiz-ui-styles Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 4, 2024

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

Name Status Preview Comments Updated (UTC)
wiz-ui-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 4:55am
wiz-ui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 4:55am

Copy link
Contributor

github-actions bot commented Oct 4, 2024

Size Change: +38 B (+0.01%)

Total Size: 339 kB

Filename Size Change
./packages/wiz-ui-next/dist/wiz-ui.es.js 87 kB +12 B (+0.01%)
./packages/wiz-ui-next/dist/wiz-ui.umd.js 76.9 kB +12 B (+0.02%)
./packages/wiz-ui-react/dist/wiz-ui.es.js 80.2 kB +8 B (+0.01%)
./packages/wiz-ui-react/dist/wiz-ui.umd.js 70.7 kB +6 B (+0.01%)
ℹ️ View Unchanged
Filename Size
./packages/wiz-ui-next/dist/style.css 11.8 kB
./packages/wiz-ui-react/dist/style.css 11.8 kB

compressed-size-action

Copy link

reg-suit bot commented Oct 4, 2024

reg-suit detected visual differences.

Check this report, and review them.

🔴🔴🔴🔴🔴🔴
⚪⚪⚪⚪⚪⚪⚪⚪

🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵

What do the circles mean? The number of circles represent the number of changed images.
🔴 : Changed items, ⚪ : New items, ⚫ : Deleted items, and 🔵 Passed items

How can I change the check status? If reviewers approve this PR, the reg context status will be green automatically.

@RyushiAok RyushiAok changed the title wip: number-input feat: number-input Oct 5, 2024
@RyushiAok RyushiAok requested a review from ichi-h October 5, 2024 15:04
@RyushiAok RyushiAok marked this pull request as ready for review October 5, 2024 15:04
@RyushiAok RyushiAok added 📦 component コンポーネントの追加・変更 and removed 🚧 wip Work In Progress labels Oct 5, 2024
Copy link
Collaborator

@ichi-h ichi-h left a comment

Choose a reason for hiding this comment

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

buttonのfocus問題はよろしくお願いいたします! 🙏

小さいバグを見つけたのですが、めちゃくちゃどうでも良いところなので、簡単に直せたらで大丈夫です……笑

inputが空のときに全角文字を入力すると、カーソル位置が左にずれる

  • 再現手順
    • disabledでないnumber-inputのstoryを開く
    • 入力欄を空にする
    • 入力欄に「あ」と入力する(enterは押さない)(画像1)
    • enterを押す
    • カーソル位置が左にずれる(画像2)
  • 想定する挙動
    • 全角文字を入力してもカーソルが右に出続ける
スクリーンショット 2024-10-07 10 54 52 スクリーンショット 2024-10-07 10 55 29

Comment on lines 67 to 69
inputBorderStyle[isError ? "error" : isFocused ? "active" : "default"],
className
)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do not nest ternary expressions の警告がでています!

Comment on lines 17 to 19
type Props = BaseProps & {
value: number | null;
onChange: (e: number | null) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

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

ComponentProps<"input"> の型を見ると string | number | readonly string[] | undefined ですが、number-inputであることを考慮すると、nullよりも number | undefined の方が良さそうに見えます!

Copy link
Collaborator

Choose a reason for hiding this comment

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

また、valueとonChangeはoptionalにしておきたいです!(HTML標準の仕様と近いインターフェースを提供したいため)

Copy link
Collaborator

@ichi-h ichi-h left a comment

Choose a reason for hiding this comment

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

Danke schön! 🇩🇪

@ichi-h ichi-h merged commit b942063 into main Oct 7, 2024
9 checks passed
@ichi-h ichi-h deleted the feat/number-input branch October 7, 2024 05:21
@github-actions github-actions bot mentioned this pull request Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 component コンポーネントの追加・変更
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat(number-input): type=numberのinputのコンポーネント
2 participants