Inconsistent `Provider` placement in components
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 56/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
Read the discussion linked from the issue, then compare Provider placement in packages/react-aria-components/src/Select.tsx, NumberField.tsx, SearchField.tsx, and TextField.tsx. Determine the consistent placement that preserves context for render-prop containers, apply it across the affected components, and verify the behavior with the relevant component tests.
由索引模型根据 Issue 内容生成。
描述
Discussed in https://github.com/adobe/react-spectrum/discussions/10155
Originally posted by af-cf June 3, 2026
Hi. I noticed that certain components have an inconsistent placement of <Provider>. Sometimes it's the root element, sometimes it's not.
Examples:
- https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/Select.tsx#L243 (nested)
- https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/NumberField.tsx#L157 (nested)
- https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/SearchField.tsx#L168 (root)
- https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/TextField.tsx#L159 (root)
I noticed when implementing RAC I would use render prop to render a generically styled form field container component, RAC components that do not have Provider as root would (for obvious reasons) not set the context props for elements like RAC label or error that are inside of that form field container component.
For now I am relying on testing as I implement to determine whether render prop works or not and then opt for nesting the field container component instead if render doesn't work. However I imagine ideally it should be consistent across all of the components that implement a provider.
More concrete examples in comment https://github.com/adobe/react-spectrum/discussions/10155#discussioncomment-17322355
- 主要语言
- TypeScript
- 星标
- 16k
- 派生
- 1.6k
- 平均合并
- 4 天 3 小时
- 30 天内合并 PR
- 39
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
adobe/react-spectrum 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
adobe/react-spectrum#10940 ·
维护者通常 1 天内回复
-
@internationalized/number: NumberParser misparses Arabic-digit numbers that use . , or ، (sd parses ١٬٢٣٤.٥ as 12345)可能已有人在做 @itsrayeedscodespace 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
adobe/react-spectrum#10936 · 3 条评论 ·
维护者通常 1 天内回复
-
PreviewTrigger: the preview dialog has no accessible name可能已有人在做 @therealemmanueloppong 于 3 天前认领。 未关闭accessibility bug PreviewTrigger
难度 2/5 1-3 小时 新手友好度 76/100
adobe/react-spectrum#10917 · 3 条评论 ·
维护者通常 1 天内回复
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unit可能已有人在做 @darshpatel1052 于 6 天前认领。 未关闭waiting on author
难度 2/5 1 小时以内 新手友好度 88/100
adobe/react-spectrum#10909 · 3 条评论 ·
维护者通常 1 天内回复
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValue可能已有人在做 @mrlexcoder 于 6 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 68/100
adobe/react-spectrum#10900 · 2 条评论 ·
维护者通常 1 天内回复
查看 adobe/react-spectrum 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
prime-radiant-inc/evener#5901 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
Bug: Batcher binds the texture that opens a new batch twice (one draw call per element with maxBatchableTextures = 1)可能已有人在做 @darzarzycki 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 2 天内回复
-
area:study-data p2-high ready-for-agent type:chore
难度 2/5 1-3 小时 新手友好度 78/100
fderuiter/deruiter.dev#3706 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
nicobailon/pi-subagents#3242 ·
维护者通常 1 天内回复