feat(dashboard): implement Zulip dashboard widget#126
Conversation
c3b9cb5 to
024d861
Compare
|
This PR improve on my previous #123
Here is a dashboard widget screenshot Please tell me if I need to add or modify something. |
edward-ly
left a comment
There was a problem hiding this comment.
Nice work with the unread messages feature and the IReloadableWidget! Just a few more improvements to go:
- Along with
IReloadableWidget, it might be a good idea to implementIIconWidgetas well. ItsgetIconUrlmethod would allow you to import the Zulip icon without the need for any external CSS such ascss/dashboard.css. - Implementing
IReloadableWidgetalso means that thesrc/views/Dashboard.vuecomponent is no longer necessary, along withsrc/dashboard.jsand the changes towebpack.js. As a consequence, the widget'sloadmethod can be empty too. - Also make sure in the
getItemsV2method to check that a Zulip account$isConnectedbefore fetching messages, perhaps. - (Optional) Small point, but we typically prefix private class methods with a
_for added clarity. - And please resolve the errors found by PHP-CS-Fixer and Psalm in the CI checks as well.
And FYI, if you want to clean up your PR without creating a new one, a combination of git rebase and git push -f would allow you to do just that.
024d861 to
4957c6b
Compare
|
I think your requested changes are done. Code seems cleaner by the way. |
There was a problem hiding this comment.
It sure does! I can take care of the remaining CI checks and rebase the branch from here. Thanks a lot for your contribution!
Actually, would you mind running composer run cs:fix and commit the result to resolve the last failing check, and rebase the branch so that the branch starts from the tip of main? I don't think I have the ability to modify your branch.
|
Sure, I will do it. But |
531e18e to
b5a0692
Compare
Add a dashboard widget showing recent or unread Zulip messages. - Register ZulipDashboardWidget implementing IReloadableWidget, IButtonWidget, and IIconWidget for standardised server-side item fetching (getItemsV2), auto-reload every 60s (getReloadInterval), a "show more" button (getWidgetButtons) pointing to /#feed or /#inbox depending on mode, and a theme-aware icon (getIconUrl) - Add getRecentMessages() and getUnreadMessages() to ZulipAPIService; both share a _cleanMessageContent() helper that converts Zulip emoji spans (emoji-1f603 class) to Unicode and strips remaining HTML tags - Expose a "Show only unread messages" toggle in PersonalSettings, stored as dashboard_show_unread; the widget adapts its empty-state copy and button link accordingly - Register the widget in Application bootstrap and appinfo/info.xml Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Thomas Ritou <thomas@ritou.me>
b5a0692 to
bb54541
Compare
|
Done! |
|
Perfect, thanks again! |
|
Any chance you push the new version to Nextcloud apps soon ? |
Sure, I'll see if I have time by the end of this week. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |



Add a dashboard widget showing recent or unread Zulip messages.
Assisted-by: Claude Sonnet 4.6 noreply@anthropic.com
🤖 AI (if applicable)