Closed (fixed)
Project:
Experience Builder
Component:
Page builder
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Jul 2024 at 10:58 UTC
Updated:
2 Sep 2024 at 07:09 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
larowlanAdding some error boundaries would help here
Comment #3
lauriiiI ran into an error with the new sidebar which ended up crashing the whole client side app. Another data point that we need some improvements in regards to this.
Comment #4
wim leersWe did something similar for the AM:A React UI in https://git.drupalcode.org/project/acquia_migrate/-/commit/42d8cf15889c6... using https://react.dev/reference/react/Component#catching-rendering-errors-wi....
Having this should also make it easier to provide good bug reports, and should result in more meaningful test failures — especially after #3461435: End-to-end test that tests both the client (UI) and server.
Comment #5
syeda-farheen commentedComment #6
wim leersHow is that going, @syeda-farheen? 😊
Comment #7
syeda-farheen commented@wim-leers I am working on it, will update here asap
Comment #8
jessebaker commentedIt seems there are actually three different aspects to this issue. So, for clarity, I see the breakdown as follows:
I'm not sure, but 1 and 2 may actually be able to be addressed by the same error handling.
3 should use as described in #4
Comment #9
wim leers@syeda-farheen It's been a week now, but still zero commits on the issue fork. Can you give us an update? 🙏
Comment #10
syeda-farheen commentedSorry for the delayed update here, had paused on it due to health reason, un assigning it for now.
Comment #11
syeda-farheen commentedComment #12
fazilitehreem commentedComment #14
fazilitehreem commentedComment #15
fazilitehreem commentedComment #16
wim leersA whole slew of CI jobs are failing:
eslint,stylelint, unit tests, E2E test … this is not in a reviewable state 😅Comment #18
bnjmnmThis needs tests as well. In Cypress Intercepting requests and returning junk should make it possible to trigger some errors for testing.
Comment #19
wim leers#3450308: Create an Open API spec for the current mock HTTP responses landed, which should mean fewer failures due to the server returning a non-compliant response. But … there can always be a network problem. So this definitely is still important!
Comment #20
wim leersComment #21
balintbrewsComment #22
balintbrewsI'm giving this a fresh start by creating our own reusable error boundary component on top of
bvaughn/react-error-boundarywhich is even mentioned in the React docs. I'll have the first draft MR up shortly.Comment #24
wim leersTests are present now! 🚀 While this MR is still a draft, this could benefit from early reviews. Keeping assigned to @balintbrews to signal that he's continuing to work on this :)
Comment #25
balintbrewsI accidentally checked the logging placeholder task off the list yesterday. I've completed that just now. I did, however, run into a bunny hole with trying to unit test that the logging method is being called. Turns out mocking/stubbing/spying ES module imports is not solved within Cypress Component Testing. There is
@cypress/vite-plugin-cypress-esmwhich attempts to solve this, but it's very experimental. I gave it a go, managed to merge it with our existing Vite config just for Cypress, then as a result, Vite stopped resolving file path aliases. It might have worked otherwise, but this is where I stopped trying to make this happen. So no unit testing for calling the logging method as of yet. Moving forward for the sake of progress.Comment #30
hooroomooSo great to have now :)
Comment #31
wim leersNext up: