Skip to content

Bug: Some Lookbook component previews are broken when viewing Lookbook on a project #283

@lamroger-nava

Description

@lamroger-nava

Contact Details

No response

Is your feature request related to a problem? Please describe

No response

A clear and concise description of what you want to happen

It looks like some component previews depend on TestRecord which only exists in the dummy app in the SDK repo, so when viewing the preview on a project like OSCER it's broken.

The solution isn't obvious since these component previews are testing out the form builder methods. Some ideas:

Maybe we can test them with an ActiveModel object instead of an ActiveRecord object

Maybe we can export the TestRecord class from the SDK (con: it will add a useless test_records table to the project)

Maybe we can find a way to decouple the visual view of the Form Builder methods from the databinding functionality and just preview the view

Maybe it's not actually valuable to export Lookbook previews for SDK components. Instead we should host a Lookbook for the SDK that project teams can reference if they want. (pros: centralized SDK docs). (con: lookbook will reflect latest version of SDK, not the version the project has).

Loren: I kind of lean towards option 4 at the moment. If we go that route we should look into hosting the SDK Lookbook somewhere.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontendFrontend changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions