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
Improved Alpine error resiliency and logging #2027
Improved Alpine error resiliency and logging #2027
Conversation
…ten to. ( pulled package-lock.json )
…ten to. -> fixed import from csp
Hello! Does anyone know what needs to happen in order to have this merged? I really want this feature. |
@Pronian I think it's pending a @calebporzio review 😄 The previous PR with similar changes had a bunch of discussion on it so he asked for it to be re-created with a clear description to make it easier to review. |
@@ -70,7 +70,7 @@ test('store\'s "this" context is reactive for init function', | |||
[html` | |||
<div x-data> | |||
<span x-text="$store.test.count"></span> | |||
<button @click="$store.test.increment()" id="button">increment</button> | |||
<button id="button">increment</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose for removing the @click here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
increment function doesn't exist so test fails with reference error once error handling implemented
@@ -26,7 +26,6 @@ test('directives are auto cleaned up', | |||
`, | |||
` | |||
Alpine.directive('foo', (el, {}, { effect, cleanup, evaluateLater }) => { | |||
let evaluate = evaluateLater('foo') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of removing these lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing. Expression 'foo' is evaluated and since it's invalid test fails once error handling is happening.
Thanks for the improvement on this PR and sorry for lagging on it. Things look mostly good. I left a review inquiring about those seemingly unrelated test modifications - want to make sure we're not breaking anything. |
Thanks for following up! |
Resiliency example
Without these changes: https://codepen.io/danddanddand/pen/QWgGeZB
With these changes: https://codepen.io/danddanddand/pen/eYRBqLo