Giter Site home page Giter Site logo

Comments (12)

allmarkedup avatar allmarkedup commented on May 11, 2024 2

@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.

kirillplatonov avatar kirillplatonov commented on May 11, 2024 1

That would be awesome!

from lookbook.

allmarkedup avatar allmarkedup commented on May 11, 2024 1

@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.

allmarkedup avatar allmarkedup commented on May 11, 2024 1

@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.

allmarkedup avatar allmarkedup commented on May 11, 2024

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.

dynamic_params

from lookbook.

nicolas-brousse avatar nicolas-brousse commented on May 11, 2024

๐Ÿ‘‹ @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.
Params tab appear correctly with what I configured.

I'll try to take more time and check if I see somehting.

from lookbook.

allmarkedup avatar allmarkedup commented on May 11, 2024

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.

allmarkedup avatar allmarkedup commented on May 11, 2024

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.

nicolas-brousse avatar nicolas-brousse commented on May 11, 2024

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.

nicolas-brousse avatar nicolas-brousse commented on May 11, 2024

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.

nicolas-brousse avatar nicolas-brousse commented on May 11, 2024

@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.

allmarkedup avatar allmarkedup commented on May 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.