Skip to content
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

Merged
merged 8 commits into from
May 17, 2024

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented May 15, 2024

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.

Screenshot from 2024-05-17 12-34-08

Testing links:

Copy link

github-actions bot commented May 15, 2024

🤖 Hasura Change Summary compared a subset of table metadata including permissions:

Updated Tables (1)

  • public.submission_services_log permissions:

    insert select update delete
    platformAdmin
    teamEditor
    16 added column permissions
    insert select update
    platformAdmin ➕ created_at
    ➕ event_id
    ➕ event_type
    ➕ flow_id
    ➕ response
    ➕ retry
    ➕ session_id
    ➕ status
    teamEditor

@jessicamcinchak
Copy link
Member Author

Copy link

github-actions bot commented May 15, 2024

Removed vultr server and associated DNS entries

Copy link
Contributor

@DafyddLlyr DafyddLlyr left a 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 -

image

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 👍

left join hdb_catalog.hdb_scheduled_events se on se.id = seil.event_id
where se.tries > 1
group by seil.event_id
)
Copy link
Member Author

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

@jessicamcinchak jessicamcinchak marked this pull request as ready for review May 16, 2024 17:51
message: `Successfully sent "Submit" email`,
message: `Successfully sent to email`,
inbox: sendToEmail,
govuk_notify_template: "Submit",
Copy link
Member Author

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",
}));
Copy link
Member Author

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/

@jessicamcinchak jessicamcinchak changed the title feat: submissions log reflects events rather than successful audit entries only feat: submissions feed reflects events rather than successful audit entries only May 17, 2024
Copy link
Contributor

@ianjon3s ianjon3s left a 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

@jessicamcinchak jessicamcinchak merged commit 59c9f50 into main May 17, 2024
12 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/submissions-log-v2 branch May 17, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants