-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Preview Pane Support for List Widget: Variable Types #2307
Comments
To expand upon my custom widget comment, I want to try following this documentation in order to build a preview pane for the variable types list widget: https://www.netlifycms.org/docs/customization/ |
No issue tracking this that I'm aware of, but I could be wrong. Would definitely like to see previews working, just haven't heard a lot of feedback from folks using this functionality to determine if we got the control side right. cc/ @smnh |
Hey, Yes originally we had more advanced previews for typed list widget. But eventually we dropped it as, if I understood correctly, the preview itself might be customized per case. But if preview of typed lists is still desired we can bring it back, I think one of the commits of the original PR still has it - |
One problem is that we've passed more power to widget control components over time, but did not do the same for the widget preview components. The preview component core needs to catch up to the control component core to address this. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
For me the preview pane has been working perfectly for my very extensive Variable Type setup. I don't know why the documentation says it doesn't work :) |
@laurenskling Do you have some example or docs how to implement it? Maybe we could extend the netlify cms docs? |
Preview pane has been working for me out of the box for Variable Types. I haven't done anything special (I think...) isn't it working for you? If that's the case, I'm willing to try to setup a MVP for you.... |
@laurenskling - I haven't actually tested it, but maybe I will now. I figured based off the docs it just wasn't supported. To confirm you're using Did you do anything to customize your preview pane setup or are you just using it out of the box? |
Just as the docs say. Note:
This is just as normal, right? It just works for me |
The docs might mean having default previews is not supported. Will check and update here. |
FYI, rephrased the docs to mention custom preview support #3376 |
Thank you both @erezrokah & @laurenskling! |
Whooo, didn't know that it works. This is insane 👍 🥇 🎉 |
Use case for passing
outputs (with Immutable formatting)
But, when I use a standard list:
Current workaround to render markdown with
|
When using a Variable Type list widget and a custom preview component, the `widgetsFor` helper would only return a `data` list with each of the items in the list, not a `widgets` list, e.g. {"data" => {"markdown" => "# Title"} {"type" => "block_body"} } {"widgets" => undefined} 🚫 The `widgets` list should also be supplied, particularly for nested Markdown widgets, so a fully formatted preview can be rendered: {"data" => {"markdown" => "# Title"} {"type" => "block_body"} } {"widgets" => {"markdown" => Object} ✅ } This extends support in `widgetsFor` to detect variable type list widgets and correctly construct the `widgets` return value. As reported at decaporg#2307 (comment)
I've hit the same issue when creating a custom preview component, as the Thanks for the precise issue description @garrettboatman, that was helpful! |
Is your feature request related to a problem? Please describe.
Not a problem, just a beta feature that has not yet been fully developed.
ref: https://www.netlifycms.org/docs/beta-features/#list-widget-variable-types
I searched for an existing issue or article that is tracking the development of this beta feature but could not find one - please forgive me if this is a duplicate :)
Describe the solution you'd like
Simply put I'm wondering if this feature has been roadmapped for development. If not, I'm looking to open a discussion regarding implementing a preview pane through a custom widget (not entirely sure this is possible, as I haven't had a chance to test out custom widgets yet).
Describe alternatives you've considered
See custom widget comment above.
Additional context
Working on a template system that relies fairly heavily on this beta feature, so any insight into the development of the Variable Types for the List Widget would be greatly appreciated!
I'll be testing more with custom widgets in the coming week and will post any updates or alternative solutions I find here.
The text was updated successfully, but these errors were encountered: