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

feat(plugins): add logging plugin that allows writing logs to storybook #131

Merged
merged 4 commits into from
Mar 11, 2024
Merged

feat(plugins): add logging plugin that allows writing logs to storybook #131

merged 4 commits into from
Mar 11, 2024

Conversation

buehler
Copy link
Contributor

@buehler buehler commented Feb 5, 2024

This adds a new plugin "logging".
This allows getting a log interface from the context to write
logs from buttons or actions. One can see the log list with the
"quote" icon and can inspect logged messages.

As an example:

Story(
  name: 'Story/Logging',
  builder: (context) => Center(
    child: ElevatedButton(
      onPressed: () => context.logger.log('This is a test message'),
      child: const Text('Log something'),
    ),
  ),
),

@buehler
Copy link
Contributor Author

buehler commented Feb 22, 2024

Hey @ookami-kb
wdyt? :-)

@ookami-kb
Copy link
Owner

Yeah, LGTM. Please just update golden images (use the ones from the action run artifacts – the ones with _testImage name).

@buehler
Copy link
Contributor Author

buehler commented Mar 11, 2024

Alright, sorry @ookami-kb for the delay. I updated the golden images and pushed them.

Let me know if you need something :-)

@buehler
Copy link
Contributor Author

buehler commented Mar 11, 2024

Weird, why do they fail now?

@ookami-kb
Copy link
Owner

@buehler you can download generated images from the artifacts here: https://github.com/ookami-kb/storybook_flutter/actions/runs/8233183433?pr=131

In general, there are some minor incosistencies between different platforms, so it's better to just copy and commit the generated images from the artifacts, if they look correct.

@buehler
Copy link
Contributor Author

buehler commented Mar 11, 2024

@ookami-kb Wohow! :-)
Thank you for the help regarding the golden images.

@ookami-kb ookami-kb merged commit a77b2e4 into ookami-kb:master Mar 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants