[BOOKINGSG-9114][RYN] migrate error-display component#1100
Open
ryan-nguyen-t wants to merge 10 commits intopre-release/v4from
Open
[BOOKINGSG-9114][RYN] migrate error-display component#1100ryan-nguyen-t wants to merge 10 commits intopre-release/v4from
ryan-nguyen-t wants to merge 10 commits intopre-release/v4from
Conversation
added 7 commits
April 14, 2026 16:17
ghazwan-gt
reviewed
Apr 15, 2026
zhaoyanxzy
reviewed
Apr 16, 2026
| @@ -0,0 +1,23 @@ | |||
| // e2e/nextjs-app/src/app/components/error-display/with-action-button.e2e.tsx | |||
qroll
requested changes
Apr 16, 2026
Contributor
There was a problem hiding this comment.
run the prompt against the file again
/test-component-functional review the test spec and refactor the file to match the conventions
| await story.init("maintenance"); | ||
| }); | ||
|
|
||
| test("Maintenance – renders dateString in description", async ({ |
Contributor
There was a problem hiding this comment.
this could be part of the unit tests instead
Comment on lines
+15
to
+18
| .story-background-wrapper { | ||
| padding: 1rem; | ||
| background-color: var(--fds-colour-bg); | ||
| } |
Contributor
There was a problem hiding this comment.
- padding is not needed since it's part of the layout
- we can hardcode the colour here so that it's independent of the theme
- you also probably intended to only apply this in dark mode so you should include the media query for that. the default test is now failing since it always has the dark background
Suggested change
| .story-background-wrapper { | |
| padding: 1rem; | |
| background-color: var(--fds-colour-bg); | |
| } | |
| @media (prefers-color-scheme: dark) { | |
| .story-background { | |
| background-color: #000000; | |
| } | |
| } |
| {...updatedAssets.img} | ||
| alt="" | ||
| data-id="error-display-image" | ||
| className={styles.img} |
Contributor
There was a problem hiding this comment.
we should chain the classname here too since the prop accepts all html img attributes
clsx(styles.img, updatedAssets.img.className)
Comment on lines
+124
to
+137
| propTypes: [ | ||
| `"lifesg"`, | ||
| `"bookingsg"`, | ||
| `"ccube"`, | ||
| `"rbs"`, | ||
| `"mylegacy"`, | ||
| `"oneservice"`, | ||
| `"pa"`, | ||
| `"spf"`, | ||
| `"a11y-playground"`, | ||
| `"sgw-digital-lobby"`, | ||
| `"supportgowhere"`, | ||
| `"imda"`, | ||
| ], |
ghazwan-gt
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
classNameis chained correctly withclsx- [ ] Added/updated unit tests- [ ] Listed breaking changesAdditional information
Added a global css class named
story-background-wrapperto add a background that reflexes the current theme so that the content does not get blended in.