-
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
feat: Styled feedback table #3208
Conversation
Removed vultr server and associated DNS entries |
editor.planx.uk/src/pages/FlowEditor/components/Flow/FeedbackPage.tsx
Outdated
Show resolved
Hide resolved
editor.planx.uk/src/pages/FlowEditor/components/Flow/FeedbackPage.tsx
Outdated
Show resolved
Hide resolved
5ce90c7
to
9619640
Compare
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.
Changes look great here! A few final minor comments, but no stoppers - very happy for this to merge!
Perhaps in a follow-up PR we can add a simple "Feedback" tab alongside "Submissions" & similar under "Flow settings"?
|
||
const combinedHelpText = `${detailedFeedback.helpText || ""} ${ | ||
detailedFeedback.helpDefinition || "" | ||
} ${detailedFeedback.helpSources || ""}`.trim(); |
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: maybe this is a bit more readable for concatenating strings & filtering out any null ones?
[detailedFeedback.helpText, detailedFeedback.helpDefinition, detailedFeedback.helpSources].filter(Boolean).join(" ").trim()
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, I wasn't aware of the simplicity of .filter(Boolean)
const truncatedHelpText = | ||
combinedHelpText.length > 65 | ||
? `${combinedHelpText.slice(0, 65)}...` | ||
: combinedHelpText; |
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.
👍 clever! I always forget the css syntax to do this, good reminder it can be clearly handled this way too
|
||
const labelMap: Record<string, string> = { | ||
userComment: item.type === "issue" ? "What went wrong?" : "User comment", | ||
address: "Project address", |
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: I'm not sure we use "Project address" anywhere else - is "Property address" or "Site address" perhaps more consistent with service content ?
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.
I'll change to "Property address" as this matches the question "Enter the postcode of the property" where the data is gathered
What does this PR do?
Adds a styled feedback table using the 'feed' style used for the submissions log.
Example:
https://3208.planx.pizza/testing/find-out-if-you-need-planning-permission/feedback