Skip to content
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

nested modules don't work in stories #260

Closed
tcoopman opened this issue Mar 9, 2023 · 2 comments · Fixed by #265
Closed

nested modules don't work in stories #260

tcoopman opened this issue Mar 9, 2023 · 2 comments · Fixed by #265
Assignees
Labels
bug Something isn't working

Comments

@tcoopman
Copy link

tcoopman commented Mar 9, 2023

having a defmodule Foo inside of a story results in the following error:

** (UndefinedFunctionError) function StoryBook.BlockComponents.Gwt.Foo.storybook_type/0 is undefined or private
    StoryBook.BlockComponents.Gwt.Foo.storybook_type()
    (phoenix_storybook 0.5.0) lib/phoenix_storybook/stories/story_validator.ex:30: PhoenixStorybook.Stories.StoryValidator.validate!/1
    (phoenix_storybook 0.5.0) lib/phoenix_storybook/stories/story_validator.ex:16: PhoenixStorybook.Stories.StoryValidator.validate/1
    (phoenix_storybook 0.5.0) lib/phoenix_storybook/live/story_live.ex:47: PhoenixStorybook.StoryLive.handle_params/3
    (phoenix_live_view 0.18.16) lib/phoenix_live_view/utils.ex:416: anonymous fn/5 in Phoenix.LiveView.Utils.call_handle_params!/5
    (telemetry 1.2.1) /home/thomas/Workspace/domain-modelling-workshop/domain-modelling-server/deps/telemetry/src/telemetry.erl:321: :telemetry.span/3
    (phoenix_live_view 0.18.16) lib/phoenix_live_view/channel.ex:452: Phoenix.LiveView.Channel.maybe_call_mount_handle_params/4
    (phoenix_live_view 0.18.16) lib/phoenix_live_view/channel.ex:1030: Phoenix.LiveView.Channel.verified_mount/8
    (phoenix_live_view 0.18.16) lib/phoenix_live_view/channel.ex:59: Phoenix.LiveView.Channel.handle_info/2
    (stdlib 4.2) gen_server.erl:1123: :gen_server.try_dispatch/4
    (stdlib 4.2) gen_server.erl:1200: :gen_server.handle_msg/6
    (stdlib 4.2) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
@cblavier
Copy link
Contributor

cblavier commented Mar 9, 2023

yes indeed, I already noticed this! Should be fixable tho
I had not much time to work on the storybook these past weeks, will do a batch of issue-fixing next week

@cblavier cblavier added the bug Something isn't working label Mar 9, 2023
@cblavier cblavier self-assigned this Mar 15, 2023
@cblavier cblavier linked a pull request Mar 15, 2023 that will close this issue
@cblavier
Copy link
Contributor

Hey @tcoopman
Any chance you can test the main branch to see if the issue is fixed for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants