-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor: Standardise error summary #3259
Conversation
Removed vultr server and associated DNS entries |
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.
Super appreciated update, thanks for picking this one up!
Beyond these files, there's a couple more that come to mind that I think might good candidates for similar update/refactor to share this new standard component:
.../editor.planx.uk/src/@planx/components/shared/Preview/ErrorSummaryContainer.tsx
- Which is then imported/used a couple of places like
ErrorFallback
,PlanningConstraints
&PropertyInformation
graph warnings
- Which is then imported/used a couple of places like
<ErrorSummary | ||
format="info" | ||
heading="No feedback found for this service" | ||
message="If you're looking for feedback before January 1, 2024, please contact a PlanX developer." |
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.
nit: in the case of feedback, I think it should read "If you're looking for feedback from more than six months ago, please contact a PlanX developer" - because feedback availability is subject to our data sanitation policy (6 month retention) ! Submission event receipts are always retained (no personal data), and that view is actually filtered from January 2024 forwards for simplicity.
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.
Ah yes, I coped this over from the submission log and had made a note to clarify. Thanks for this, will update.
message: "Summary of information message.", | ||
format: "info", | ||
}, | ||
} satisfies Story; |
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.
💯
} | ||
|
||
const Root = styled(Box, { | ||
shouldForwardProp: (prop) => !["format"].includes(prop.toString()), |
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.
the syntax of shouldForwardProp
is still never quite intuitive to me, but I think this can simply be ??
shouldForwardProp: (prop) => prop !== "format",
and then on L14 just below, might need to adjust to <Props["format"]>
rather than current <Props>
, as we're just forwarding along the single property?
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.
Thanks, this works without adjusting line 14 👍
Thanks for the review @jessicamcinchak , I will follow up with a further PR to update |
What does this PR do?
Preview:
https://storybook.3259.planx.pizza/?path=/docs/design-system-molecules-errorsummary--docs