Add JSON response support for notifications/tray#2398
Conversation
| json.creator notification.creator, partial: "users/user", as: :user | ||
| json.creator do | ||
| json.partial! "users/user", user: notification.creator | ||
| json.avatar_url user_avatar_url(notification.creator) |
There was a problem hiding this comment.
@jorgemanrubia Do you see any reason why we couldn't include the avatar url in the existing user partial?
There was a problem hiding this comment.
@svara should be fine to add it to the user partial
e6e395f to
a3aefba
Compare
f604f0e to
d954ec9
Compare
| def show | ||
| @notifications = Current.user.notifications.preloaded.unread.ordered.limit(100) | ||
| @notifications = unread_notifications | ||
| if include_unread? |
There was a problem hiding this comment.
@svara added this query parameter instead of checking for format.json. Let me know if you have any concerns.
There was a problem hiding this comment.
I'm a bit confused. Don't both the web and mobile apps always want unread items here? And just the mobile apps also want read items for the json response? If we used a query param, wouldn't I expect this to be include_read?
There was a problem hiding this comment.
doh, I meant read.
If we used a query param, wouldn't I expect this to be include_read?
Yes.
There was a problem hiding this comment.
Sorry for confusing both of you, my bad. The param should named as include_read.
|
Hey @kevinmcconnell, I think we're done with the changes. Could you review this when you have a moment? |
|
@jhutarek FYI, just deployed this branch to beta2. |
f99d54e to
df5057c
Compare
|
@monorkin and @kevinmcconnell I’ve rebased this branch on top of server-side-notification-grouping. I think we still need this endpoint for the apps, unless we want to incorporate these changes into the notifications endpoint. |
|
I'm having trouble to deploy this branch to |
|
@alpkeser if you rebased this to my branch you should deploy to staging. Deploying to a beta could cause problems in production. |
df5057c to
21acb11
Compare
Hey both, as we’re approaching to the launch, this PR along side with server-side-notification-grouping seems to be one of the last dependencies we need to get in. We’re aiming to have an internal release next Monday. I wanted to check if it works on your end timing-wise. |
c799228 to
36ee253
Compare
Thank you for the heads up @monorkin 🙏 I'm on it. |
Add avatar url, board name, and column.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Includes assignee users in the card object for display in notification UI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These fields were added but are not used by the iOS client. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
21acb11 to
b755522
Compare
|
Hey @monorkin, I wanted to double-check if there’s anything that needs a follow-up or if this one is good to go. |
|
@alpkeser we are good to go from my side |
Updated
notification/trayJSON for mobile app requirements: