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
In-browser editable dynamic preview parameters #2
Comments
That would be awesome! |
Work on this is underway - there is a some cleaning up and testing still to do but it should be useable. If anyone is interested in trying it out before a proper pre-release is ready then that would be great! Any feedback or bug reports at this point would be much appreciated. There is some documentation here which is hopefully enough to get up and running.
Update: This has now been included as an opt-in, feature-flagged experimental feature in the |
👋 @allmarkedup happy to see this feature testable! I did a quick test on one of our app. Output tab is updated, but the preview seems to not change. Maybe I missed something. I'll try to take more time and check if I see somehting. |
Hey @nicolas-brousse - many thanks for giving this a spin. I can't seem to replicate the issue you describe on my (very simple!) test app right now, so anything else you notice that could help me debug would be great. Is it possible to paste in the code for the preview example method you are trying? Although it's odd that the output is updated but the preview is not. So doesn't sound like a problem with your example if I'm honest. I'll do some more digging myself and see if I can figure out what could potentially be causing it. One thing which would be good to know - if you do a hard-refresh of the page after making changes to the field, does the preview render correctly on first load? Thanks as always for your time on this :-) |
Hey again @nicolas-brousse - just to let you know, I want to try a different way of getting in-progress/experimental features into peoples hands to play with a little easier. So I've just released If/when you do any further testing on it, you will just need to update the regular Gem as normal (i.e. don't use the config.lookbook.experimental_features = ["params"] If anything is unclear or you have any problems please just shout! :-) |
Hi @allmarkedup. I did a try in a new fresh app and it works perfectly 🤩. Last week I did test on an Rails engine app. Maybe I missed something that broke your gem. I'll have a look later and let you know. Thanks for your work and responses :) |
@nicolas-brousse ok that is good to know, thank you! If you figure out what might be causing the issue in your app then let me know and I'll look into it if it is something that could be addressed at my end. |
Hi @allmarkedup I just tested with latest version on my custom admin gem and it works 🙂 I only tested |
@nicolas-brousse that's great, thank for letting me know. I'm just working on a v0.5.0 release that has some fixes and updates to the params stuff (and quite a bit of UI improvements too) which should be out before too long :-) |
@allmarkedup I did some try to After removing this line, params works back. Just asking, do you thing it is possible to use constants values for I often use constants in my components, and think it could be nice to don't have to write their values twice 😅 |
Ok that is very helpful, thanks @nicolas-brousse - I've just released v0.5.0-beta.2 which should fix the issue you are seeing. If you are still having any problems just let me know. Constants for the select params is not possible right now, but you can use the YARD reference tag |
|
ViewComponent previews allow setting dynamic values that be changed by editing query string parameters.
Lookbook could parse the parameters and generate fields in the UI so that these values could be edited live and the changes instantly reflected in the rendered component preview, much like the way StorybookJS controls work.
The text was updated successfully, but these errors were encountered: