Comments (12)
@param
support is now implemented without the feature flag in the latest v.0.5 release. If any bugs are found it would be great to get them opened in new issues
from lookbook.
That would be awesome!
from lookbook.
@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.
from lookbook.
@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 :-)
from lookbook.
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.
You can reference the branch in your Gemfile like so:
gem 'lookbook', git: 'git://github.com/allmarkedup/lookbook.git', branch: 'preview-params'
Update: This has now been included as an opt-in, feature-flagged experimental feature in the v0.4.5
release. See the docs on opting-in to experimental features for more info.
from lookbook.
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.
Params tab appear correctly with what I configured.
I'll try to take more time and check if I see somehting.
from lookbook.
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 :-)
from lookbook.
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 v0.4.5
that includes this @param
functionality behind an 'experimental' feature flag.
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 preview-params
branch any more) and then enable access to this feature in your config:
config.lookbook.experimental_features = ["params"]
If anything is unclear or you have any problems please just shout! :-)
from lookbook.
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.
But if I did hard-refresh I still had the issue too.
Thanks for your work and responses :)
from lookbook.
Hi @allmarkedup I just tested with latest version on my custom admin gem and it works
I only tested text
and select
for now. But it looks good.
from lookbook.
@allmarkedup I did some try to 0.5.0
beta version on my gem and I had the same issue with param back. I discover that I previously set config.lookbook.preview_srcdoc = false
, but don't remember why.
After removing this line, params works back.
Just asking, do you thing it is possible to use constants values for select
param, instead re-write every values manually?
I may try to help for this if you think it is possible.
I often use constants in my components, and think it could be nice to don't have to write their values twice
from lookbook.
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 (see OBJECT)
syntax to refer to param definitions on other methods, so that you only need to define them once and can then reference them from other example methods. Does that help at all?
from lookbook.
Related Issues (20)
- undefined method `shift_path' for #<ActionView::Base:0x0000000000cdf0> HOT 9
- Support for Phlex builder-style components HOT 8
- Lookbook engine sometimes hangs when changing params in preview HOT 2
- The action โrender_scenario_to_stringโ could not be found for ViewComponentsController HOT 3
- Switching tabs doesn't work HOT 10
- Preview controller shouldn't be memoized HOT 1
- Getting missing partial error for collections on v2 HOT 4
- Reflected XSS Vulnerability in Lookbook HOT 2
- Lookbook preview embed not configured for external sites HOT 4
- Pages section ordering incorrect when using order number prefix HOT 5
- Deviseโs authenticate block breaks previews HOT 9
- DataResolver is a little noisy on application startup HOT 5
- How to resize previews in pages? HOT 3
- Output HTML is beautified, causing rendering differences HOT 4
- Configuring ActionCable `allowed_request_origins` HOT 3
- Lookbook tries to render our icon component rather than its own HOT 4
- ArgumentError: wrong number of arguments (given 0, expected 1..3) HOT 11
- YARD generation
- Embed do not have the "copy contents" button HOT 4
- Deprecated warning - `path` to replace with `lookup_path` in Embeds HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lookbook.