-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(site): add task notifications to user settings #20006
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
Conversation
9012832 to
f62c341
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.
I think all the changes look pretty straightforward and make sense
I'm going to approve in a minute – I just need to test something out with the story setup. I think we can sneak in some updates to all the findByText calls to make them less fragile and also test for accessibility
|
Okay, I did some digging, and I think the current testing setup is papering over some problems with the code Namely, the change to the runtime code was in user settings version of I think that realistically, we can keep the test updates for the deployment settings version. And then for the user settings version, we can get away with throwing this play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
// We only need to findBy for the first group, because all groups should
// load in at the same time
await canvas.findByRole("checkbox", { name: "Task Events" });
void canvas.getByRole("checkbox", { name: "Template Events" });
void canvas.getByRole("checkbox", { name: "User Events" });
void canvas.getByRole("checkbox", { name: "Workspace Events" });
void canvas.getByRole("checkbox", { name: "Custom Events" });
},Trying to abstract that into a loop seemed like overkill |
site/src/pages/UserSettingsPage/NotificationsPage/NotificationsPage.tsx
Outdated
Show resolved
Hide resolved
|
@Parkreiner why would you I'm not a fan of these kinds of patterns where you do something once and then do basically the same thing a different way many more times. it needs a comment to explain itself and doesn't provide any real benefit imo. |
|
@aslilac I dunno, it's something I've considered doing lately to make it clear that there is a usable return value, but it's deliberately not being used. The I had the first be a I'm fine with making all of them |
|
yeah, asserting that you can click them and it affects checkbox state is a good plan |
@Parkreiner PR #19965 introduced a new |
@Parkreiner addressed in d1d600f |
|
@aslilac @Parkreiner thank you for the review and comments. I believe I’ve addressed all of them. Would it be okay if I merge the PR as-is? I just want to make sure it goes in before the release freeze 🙂 |
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.
Almost there. I think we accidentally added some flaky behavior for CI, but I just posted a suggestion for how to take care of it

Description
Add UI support for the new
Task Eventsnotification templates (Task WorkingandTask Idle) added in backend PR #19965. The/api/v2/notifications/templates/systemendpoint now returns these templates, therefore this PR keeps the UI in sync.Changes
Task WorkingandTask Idleto notification template mocks so Storybook reflects backend data.Task Eventsso they appear for end users.Depends on: #19965