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

Consider support absolute path render with <AutoField> #1126

Closed
levi-art-rules opened this issue Jun 7, 2022 · 6 comments · Fixed by #1192
Closed

Consider support absolute path render with <AutoField> #1126

levi-art-rules opened this issue Jun 7, 2022 · 6 comments · Fixed by #1192
Assignees
Labels
Area: Core Affects the uniforms package Type: Feature New features and feature requests
Milestone

Comments

@levi-art-rules
Copy link

levi-art-rules commented Jun 7, 2022

Motivation why you'd like to see this in uniforms.

We have a use case where we want to display a field down to its sister field. Rn, because uniforms only supports rendering children fields within a specific field, it is not possible. In general, I think it's also beneficial to enable rendering a field given an absolute path. uniforms already provides useField with options to accept this option, what we need to do is to enable it inside createAutoField.

Examples of how others could use this feature.

Usage: <AutoField name="lists.0.name" options={ absoluteName: true} />

Possible workarounds, if applicable.

N/A

@radekmie radekmie self-assigned this Jun 10, 2022
@radekmie radekmie added Type: Feature New features and feature requests Area: Core Affects the uniforms package labels Jun 10, 2022
@radekmie radekmie added this to Needs triage in Open Source (migrated) via automation Jun 10, 2022
@radekmie radekmie added this to the v4.0 milestone Jun 10, 2022
@radekmie radekmie moved this from Needs triage to To do in Open Source (migrated) Jun 10, 2022
@radekmie
Copy link
Contributor

Hi @levi-art-rules and thanks for the idea! I definitely see it as something we'd like to have going forward, but introducing any sort of prop (with a sane name) to AutoField may break a lot of projects. It's doable in v4, though.

In the meantime, I'm thinking whether or not we could add something like experimental_nameIsAbsolute flag or even experimental_absoluteName as an alternative to name. What do you think?

CC @vazco/open-source.

@levi-art-rules
Copy link
Author

Hi @levi-art-rules and thanks for the idea! I definitely see it as something we'd like to have going forward, but introducing any sort of prop (with a sane name) to AutoField may break a lot of projects. It's doable in v4, though.

In the meantime, I'm thinking whether or not we could add something like experimental_nameIsAbsolute flag or even experimental_absoluteName as an alternative to name. What do you think?

CC @vazco/open-source.

Feature flag sounds good to me. Thank you for your reply. I wonder what the timeline for pushing it will look like?

@wadamek65
Copy link
Contributor

@radekmie I think adding it as an experimental feature flag sounds good.

As a side note, maybe we could make it easier for us to introduce such changes in the future by adding a mention to the docs like any props prefixed with "uniformsExperimental_" are reserved? I don't think it's a common practice or how useful that will actually be but just a random thought.

@radekmie
Copy link
Contributor

@levi-art-rules We can't give you a timeline, sorry!

@wadamek65 Do you think that we should add uniforms prefix too? I never seen a lot of experimental_ props anyway, especially on UI components. In any case, we should add it to FAQ, that we may use them for pre-releases of some features.

@radekmie
Copy link
Contributor

(That also means this issue is up for grabs; if you want, do send us a PR!)

@wadamek65
Copy link
Contributor

@radekmie Just experimental_ also sounds good to me.

@radekmie radekmie modified the milestones: v4.0, v3.x Jul 1, 2022
@radekmie radekmie modified the milestones: v3.x, v4.0 Oct 7, 2022
@radekmie radekmie removed their assignment Nov 4, 2022
@wadamek65 wadamek65 self-assigned this Nov 4, 2022
@wadamek65 wadamek65 moved this from To do to In progress in Open Source (migrated) Nov 4, 2022
@wadamek65 wadamek65 moved this from In progress to Review in Open Source (migrated) Nov 18, 2022
radekmie pushed a commit that referenced this issue Dec 19, 2022
* Test implementation

* Finish implementation, cleanup

* Rename options to experimental_options

* Replace experimental_options with experimental_absoluteName

Co-authored-by: Adrian Mucha <kestarumper8@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Affects the uniforms package Type: Feature New features and feature requests
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants