-
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: submissions feed reflects events rather than successful audit entries only #3153
Conversation
🤖 Hasura Change Summary compared a subset of table metadata including permissions: Updated Tables (1)
|
editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/EventsLog.tsx
Outdated
Show resolved
Hide resolved
editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/index.tsx
Show resolved
Hide resolved
Removed vultr server and associated DNS entries |
editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/EventsLog.tsx
Outdated
Show resolved
Hide resolved
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.
A few comments on code, a few comments below!
I think we probably want to make our success / failure states more visually obvious. I really like the icons denoting the event types but I feel the green/red distinction is not quite visually strong enough.
A nice usability improvement here would be a copy button next to the session id - super nice though that the click interaction is just on the caret so I can easily copy/paste as-is. I wasn't expecting this from the initial screenshot.
I'm also seeing a slight visual issue with some of the table row styles with a doubled-up bottom border -
Similar to @ianjon3s' comments on Slack, grouping by sessionId might be nice but Hasura doesn't natively support this in queries which I think would mean getting back to the view, or "post-processing" in TS when we have the data - not ideal? Grouping by sessionId also breaks the chronological order of events - also not easily understandable probably? I think I'd favour keeping this as-is for now and awaiting feedback before jumping into changes here - this is a whole lot better than the current submission view and Slack imho 👍
editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/EventsLog.tsx
Outdated
Show resolved
Hide resolved
editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/EventsLog.tsx
Show resolved
Hide resolved
editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/index.tsx
Show resolved
Hide resolved
editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/EventsLog.tsx
Outdated
Show resolved
Hide resolved
left join hdb_catalog.hdb_scheduled_events se on se.id = seil.event_id | ||
where se.tries > 1 | ||
group by seil.event_id | ||
) |
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.
This retries
logic isn't perfect and assumes we only do 1 automatic retry (max of 2 tries
) - but that's true for all our scheduled events currently so let's go with it ! Overall I think a boolean here is a bit easier to reason with officers about than showing raw tries = 2
against both invoked events
message: `Successfully sent "Submit" email`, | ||
message: `Successfully sent to email`, | ||
inbox: sendToEmail, | ||
govuk_notify_template: "Submit", |
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.
Slightly tweaking API responses here so they offer a bit more context in the "response" row (will apply to future events only) ✔️
display: "flex", | ||
flexDirection: "column-reverse", | ||
readingOrder: "flex-visual", | ||
})); |
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.
This post was helpful for figuring out the "feed" style, and has some good accessibility notes to revisit one day when we're ready to get the Editor certified https://kittygiraudel.com/2024/02/26/css-only-bottom-anchored-scrolling-area/
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.
This is a huge leap forward as a v2! I vote we get it on production and iterate further based on feedback
Currently, the submissions log only displays "successful" events, and it shows a lot of empty space for event types that may not apply to your service.
Now, it reflects events applicable to this service only, including failed ones & retries, like a filtered view of Slack's
#planx-notifications
channel.Testing links: