[feat]: Animate Presence component addition
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
まず、既存の useTransition API と、issue で説明されている提案中の useAnimatePresence hook および animatedPresence HOC を確認します。ファイル、テスト、エントリーポイントは指定されていないため、実装前に API と動作について maintainer と合意する必要があります。合意された mount および unmount アニメーションの設計が実装され、検証されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
A clear and concise description of what the feature is
A new component / hook that animates elements depending on whether their children are being rendered or not without the need to be passing data (this is similar but separate to useTransition which could be depreciated in favour of this new hook)
Why should this feature be included?
framer-motion has a component called animate presence which is fairly similar to our useTransition except with the latter, you have to pass state to the hook to control the appearance of the animated components.
This isn't the worst thing when you're only controlling one modal for instance, but if you want to control multiple it would be easier to be able to handle the animations depending on whether the dom element was mounted or not (see here for more context).
This feature would hopefully lead into #1628 which is also something I would be very interested in adding to react-spring.
Please provide an example for how this would work
Unlike framer-motion, rs has two parts, the hook that runs outside the react-render world & the animated component that interpolates those SpringValues to be applied to the DOM element.
We could create a new component in a similar API style to AnimatePresence, but it would be more inline with the direction of react-spring if we could make a hook & the an additional HOC built on animated to register these components for the hook to manipulate & track. So an ideal approach can be seen below:
const MyComponent = ({show}) => {
const springs = useAnimatePresence({
from: {
opacity: 0,
},
enter: {
opacity: 1
},
leave: {
opacity: 0
}
})
return show ? <animatedPresence.div style={springs}>Hello world</animatedPresence.div> : null
}
Of course, happy to hear other people's API design ideas // thoughts or even concerns about this feature.
- 主要言語
- TypeScript
- スター
- 29.3k
- フォーク
- 1.2k
- 平均マージ
- 3日 15時間
- マージ済み PR(30日)
- 17
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pmndrs/react-spring のほかの issue
-
template: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
pmndrs/react-spring#2656 ·
メンテナーはふだん 1 日以内に返信
-
area: core kind: request
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
pmndrs/react-spring#2542 ·
メンテナーはふだん 1 日以内に返信
-
area: typescript kind: request release: major
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
pmndrs/react-spring#2541 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
release: major type: RFC
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
pmndrs/react-spring#2522 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[bug]: Tab crash with skipAnimation and loop対応中かも @mrityunjay-pandey が 43 日前に担当しました。 オープンarea: core kind: bug
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
pmndrs/react-spring#2409 ·
メンテナーはふだん 1 日以内に返信
pmndrs/react-spring の issue をすべて見る
似ている issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
lingdojo/kana-dojo#34714 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
manaflow-ai/cmux#59692 ·
メンテナーはふだん 1 日以内に返信
-
Retire stale Python-parity labels in Rust ingress and auth tests対応中かも @github-actions が今日担当しました。 オープンfactory factory:building factory:unowned ralph-status:in-progress via:opencode-free/hy4-flash-free
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
JoshCLWren/comic-pile#5874 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area: community lane: free-agent priority: P1 roadmap type: task
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
velella-sh/offing#1046 ·
メンテナーはふだん 1 日以内に返信