Skip to content

Provide context to stories #257

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

Merged
merged 3 commits into from
Aug 11, 2024
Merged

Provide context to stories #257

merged 3 commits into from
Aug 11, 2024

Conversation

vocksel
Copy link
Collaborator

@vocksel vocksel commented Aug 11, 2024

Problem

With the addition of SettingsContext in #249 I inadvertently broke most of our stories since the context wasn't being provided to them

Solution

I'm now supplying the ContextProviders component to the stories that need it. This should future-proof things since any new context providers will be added to that component.

There are some stories I didn't touch since they weren't erroring, so those ones may need to be updated in the future if they start depending on context values. In the meantime this gets us back on track

Checklist

  • Ran lune run test locally before merging

Known errors:

flipbook/UserSettings/SettingsContext.spec 
  ● hook › local plugin settings override defaults

    attempt to index nil with 'value'

      ReplicatedStorage.flipbook.UserSettings.SettingsContext.spec:58

  ● hook › set setting value via context

    attempt to index nil with 'value'

      ReplicatedStorage.flipbook.UserSettings.SettingsContext.spec:70

 FAIL  flipbook/stories.spec 
  ● mount/unmount Hoarcekat.story

    attempt to index function with 'react'

      ReplicatedStorage.flipbook.stories.spec:21

Test Suites: 2 failed, 12 passed, 14 total
Tests:       3 failed, 67 passed, 70 total
Snapshots:   0 total
Time:        1.179 s
Ran all test suites.

@vocksel vocksel marked this pull request as ready for review August 11, 2024 14:33
@vocksel vocksel merged commit 3384737 into main Aug 11, 2024
5 checks passed
@vocksel vocksel deleted the provide-context-to-stories branch August 11, 2024 14:50
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.

1 participant