Skip to content

Comments

Add support for fragment context#53

Merged
jho406 merged 1 commit intomainfrom
fragment-context-3
Sep 20, 2025
Merged

Add support for fragment context#53
jho406 merged 1 commit intomainfrom
fragment-context-3

Conversation

@jho406
Copy link
Contributor

@jho406 jho406 commented Sep 17, 2025

This commit was missing from the 2.0 release and includes several related improvements:

  1. Adds fragmentContext to allow digging using props_at to find a node, then considering what fragment it was found in, returns a found_path that can be used in a graft response's path. We'll need to replace the generated files in superglue_rails

  2. Modifies fragments! to return paths that are relative to the data being presented. So instead of data.a.deep.path.in.page it returns. data.a.deep.path.in.response with the latter being much shorter.

This commit was missing from the 2.0 release and includes several related
improvements:

1. Adds fragmentContext to allow digging using props_at to find a node, then
considering what fragment it was found in, returns a `found_path` that can
be used in a graft response's `path`. We'll need to replace the generated
files in superglue_rails

2. Modifies `fragments!` to return paths that are relative to the data being
presented. So instead of `data.a.deep.path.in.page` it returns. `data.a.deep.path.in.response`
with the latter being much shorter.
@jho406 jho406 merged commit 177e35e into main Sep 20, 2025
20 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant