`Surface.View` can not access context
まだ誰も着手していません。
評価
調査の方向性
Start with lib/surface/compiler/eex_engine.ex around lines 1095-1100, identified as the culprit, and reproduce the issue using a Surface initialized with --layouts and context in live.sface or a used component. Done means the context value is read correctly instead of returning nil; the issue does not name a test to run.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When using the context in a template defined inside a Surface.View, both (old) <Context get={...}> and (new) prop name, :type, from_context: ... in a used component yields nil.
How to reproduce it
- Use surface initialized with
--layouts - Use context in
live.sfaceor a component used bylive.sface - Resulting value will always be
nil
The behavior you expected
The value is read correctly.
Your Environment
Surface: v0.8.1
LiveView: v0.17.11
Elixir: v1.14.0
Culprit
I tracked down the issue to the following line: https://github.com/surface-ui/surface/blob/b9675f9662f9d684ad4baeebdcc358ffab5264b2/lib/surface/compiler/eex_engine.ex#L1095-L1100
Since this looks like the context is intentionally set to an empty map, I decided not to attempt a PR for now.
Workaround
I built the component inclusion manually, for now, to work around the constraint / issue:
- 主要言語
- Elixir
- スター
- 2.1k
- フォーク
- 146
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
surface-ui/surface のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
surface-ui/surface#634 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
surface-ui/surface#770 ·
-
Website is downオープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
surface-ui/surface#768 · コメント 4 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
surface-ui/surface#762 · コメント 2 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
surface-ui/surface#759 · リアクション 1 件 ·
surface-ui/surface の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
ci-cd
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
carverauto/serviceradar#5648 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Bug Elixir Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
getsentry/sentry-elixir#1242 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-telemetry/opentelemetry-erlang-contrib#846 ·
メンテナーはふだん 1 日以内に返信