Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
59151ef
Add Announcements component to Header for improved user notifications
ussaama Jun 25, 2025
f915465
Update Announcements component icons and adjust notification indicato…
ussaama Jun 25, 2025
71ce23d
Refactor AnnouncementItem and Announcements components for improved f…
ussaama Jun 26, 2025
4830eca
Refactor AnnouncementItem and Announcements components for improved f…
ussaama Jun 26, 2025
2c15cf9
Update Announcement components and add latest announcement query
ussaama Jun 27, 2025
46f744d
Enhance Announcements and TopAnnouncementBar components for improved …
ussaama Jun 27, 2025
ca0d911
Refactor TopAnnouncementBar and useProcessedAnnouncements for improve…
ussaama Jun 27, 2025
8fc7a1b
Update AnnouncementItem styling for improved user interaction
ussaama Jun 27, 2025
d365824
Enhance TopAnnouncementBar functionality to track read status and mar…
ussaama Jun 27, 2025
71e5481
Refactor Announcements and TopAnnouncementBar components to remove cu…
ussaama Jun 27, 2025
c618c0e
Refactor Announcements component and enhance query handling
ussaama Jul 1, 2025
049ffc6
Refactor Announcements component to improve state management and quer…
ussaama Jul 2, 2025
0587d6c
Refactor AnnouncementDrawerHeader to utilize useUnreadAnnouncements hook
ussaama Jul 2, 2025
e8d4b6a
Update Announcements component loader styling for improved user exper…
ussaama Jul 2, 2025
18202e4
Refactor AnnouncementSkeleton component for enhanced loading experience
ussaama Jul 2, 2025
485b176
Refactor AnnouncementIcon component for improved user interaction
ussaama Jul 2, 2025
a783b92
Enhance useUnreadAnnouncements hook to improve user-specific announce…
ussaama Jul 2, 2025
b546515
Add markAllAsRead mutation to Announcements component for improved us…
ussaama Jul 2, 2025
ced2679
Refactor AnnouncementDrawerHeader and AnnouncementIcon for improved b…
ussaama Jul 2, 2025
ec1bcd2
Refactor AnnouncementDrawerHeader and useUnreadAnnouncements hook for…
ussaama Jul 2, 2025
ba0d0b6
Refactor announcement marking logic for improved clarity and performance
ussaama Jul 2, 2025
f97ea42
Remove unused unreadAnnouncements variable from Announcements compone…
ussaama Jul 2, 2025
795bafd
Enhance useAnnouncementDrawer hook to reset drawer state on page reload
ussaama Jul 2, 2025
b03f097
Update TopAnnouncementBar to apply line clamping on title Markdown fo…
ussaama Jul 3, 2025
0e912ec
Add focus outline to close button in AnnouncementDrawerHeader for imp…
ussaama Jul 3, 2025
9437d1b
Enhance layout responsiveness by introducing dynamic height and paddi…
ussaama Jul 3, 2025
64783e4
Remove console log statements from AnnouncementItem component to clea…
ussaama Jul 3, 2025
879f963
Update TopAnnouncementBar styles for improved layout consistency
ussaama Jul 3, 2025
70a5556
Refactor AnnouncementIcon to simplify disabled state logic
ussaama Jul 3, 2025
5ffc9ce
Enhance AnnouncementItem date formatting with localization support
ussaama Jul 3, 2025
d794bde
ECHO-333 Add feature flag for conversation health (#199)
spashii Jul 1, 2025
2d7a71e
merge with main
ussaama Jul 3, 2025
dc07f27
Add current user filtering to latest announcements queries
ussaama Jul 3, 2025
d015074
Refactor announcement hooks import paths for consistency
ussaama Jul 3, 2025
b9c66b5
Refactor date formatting in AnnouncementItem component
ussaama Jul 3, 2025
20fed25
Enhance localization support in AnnouncementDrawerHeader component
ussaama Jul 3, 2025
c782574
Add feature flag for announcements in Header component
ussaama Jul 3, 2025
e2ff0ae
Remove unnecessary size prop from IconX in AnnouncementDrawerHeader c…
ussaama Jul 3, 2025
b7f10a2
Add border styling to announcement content
ussaama Jul 3, 2025
8919ebb
Update Announcements component to limit content width
ussaama Jul 3, 2025
3ec9ccb
Add announcements and related metrics to dashboards and permissions
ussaama Jul 3, 2025
d4ba708
Refactor date formatting utility and update AnnouncementItem component
ussaama Jul 3, 2025
840b90d
Refactor getTranslatedContent function to use specific types for anno…
ussaama Jul 3, 2025
25a7e6a
Refactor announcement components for improved type safety and readabi…
ussaama Jul 3, 2025
9b0809e
Update type annotation in AnnouncementIcon component for improved typ…
ussaama Jul 3, 2025
d256585
Merge branch 'main' into dashboard-announcements
ussaama Jul 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions echo/directus/sync/collections/dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"color": "#2ECDA7",
"_syncId": "79cde56d-c5cd-4a4c-9903-d99d3b4b796b"
},
{
"name": "Announcements",
"icon": "space_dashboard",
"note": null,
"color": null,
"_syncId": "d88e3e89-f55a-4279-87a5-159d8efc6dbc"
},
{
"name": "ECHO",
"icon": "space_dashboard",
Expand Down
94 changes: 94 additions & 0 deletions echo/directus/sync/collections/panels.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@
},
"_syncId": "10d105b0-55c3-4011-9e20-773f6a21ba80"
},
{
"dashboard": "d88e3e89-f55a-4279-87a5-159d8efc6dbc",
"name": "Announcement Readers Graph",
"icon": null,
"color": null,
"show_header": true,
"note": null,
"type": "time-series",
"position_x": 27,
"position_y": 1,
"width": 25,
"height": 16,
"options": {
"collection": "announcement_activity",
"precision": "day",
"function": "countDistinct",
"dateField": "created_at",
"valueField": "user_id",
"range": "auto",
"missingData": "ignore"
},
"_syncId": "1479f9f7-00ba-428c-beef-50d9f53c34bf"
},
{
"dashboard": "fadfb3fb-a781-41f1-a202-ef0f92174226",
"name": "report views weekly",
Expand Down Expand Up @@ -404,6 +427,26 @@
},
"_syncId": "a3492153-f6b8-45ee-9796-c21a3019bfcc"
},
{
"dashboard": "d88e3e89-f55a-4279-87a5-159d8efc6dbc",
"name": "Total Read Announcements",
"icon": null,
"color": null,
"show_header": true,
"note": "Shows the number of people who marked announcement as read",
"type": "metric",
"position_x": 1,
"position_y": 17,
"width": 24,
"height": 18,
"options": {
"collection": "announcement_activity",
"field": "read",
"sortField": "id",
"function": "count"
},
"_syncId": "a5a88e2e-38b4-43a5-b7b4-266bdbc8debb"
},
{
"dashboard": "fadfb3fb-a781-41f1-a202-ef0f92174226",
"name": "reports / day",
Expand Down Expand Up @@ -471,6 +514,26 @@
},
"_syncId": "bb95bf10-c43b-401b-adb3-97ea6898f160"
},
{
"dashboard": "d88e3e89-f55a-4279-87a5-159d8efc6dbc",
"name": "Read By Users",
"icon": null,
"color": null,
"show_header": true,
"note": "Shows the number of people who marked announcement as read",
"type": "metric",
"position_x": 1,
"position_y": 1,
"width": 24,
"height": 16,
"options": {
"collection": "announcement_activity",
"field": "user_id",
"sortField": "id",
"function": "countDistinct"
},
"_syncId": "c478c29d-8855-46e3-a84a-06c5350b1e11"
},
{
"dashboard": "79cde56d-c5cd-4a4c-9903-d99d3b4b796b",
"name": "Number of insights",
Expand Down Expand Up @@ -655,6 +718,37 @@
},
"_syncId": "de507cdf-90d9-4f7b-bc91-1e21921b0507"
},
{
"dashboard": "d88e3e89-f55a-4279-87a5-159d8efc6dbc",
"name": "Read Count Per User",
"icon": null,
"color": null,
"show_header": true,
"note": null,
"type": "metric-list",
"position_x": 27,
"position_y": 17,
"width": 25,
"height": 18,
"options": {
"collection": "announcement_activity",
"aggregateField": "read",
"groupByField": "user_id",
"aggregateFunction": "countDistinct",
"sortField": "user_id",
"displayTemplate": "{{user_created.first_name}}",
"aggregation": "countDistinct",
"xAxis": "read",
"yAxis": "sort",
"grouping": "user_id",
"column": "user_id",
"donut": true,
"legend": "bottom",
"showLabels": true,
"limit": null
},
"_syncId": "e73a55b3-f505-41d2-aa84-012f7d76ad0a"
},
{
"dashboard": "79cde56d-c5cd-4a4c-9903-d99d3b4b796b",
"name": null,
Expand Down
136 changes: 136 additions & 0 deletions echo/directus/sync/collections/permissions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2353,6 +2353,142 @@
"policy": "2446660a-ab6c-4801-ad69-5711030cba83",
"_syncId": "b3a01e3c-d32c-45f0-8834-8d5d08a7abe4"
},
{
"collection": "announcement_activity",
"action": "create",
"permissions": null,
"validation": {
"_and": [
{
"user_id": {
"_eq": "$CURRENT_USER"
}
}
]
},
"presets": null,
"fields": [
"id",
"sort",
"created_at",
"user_created",
"user_updated",
"updated_at",
"read",
"user_id",
"announcement_activity"
],
"policy": "37a60e48-dd00-4867-af07-1fb22ac89078",
"_syncId": "a22d1e0e-556f-4e75-a7a7-b359d847ba62"
},
{
"collection": "announcement_activity",
"action": "read",
"permissions": {
"_and": [
{
"user_id": {
"_eq": "$CURRENT_USER"
}
}
]
},
"validation": null,
"presets": null,
"fields": [
"id",
"user_created",
"created_at",
"sort",
"updated_at",
"user_updated",
"user_id",
"read",
"announcement_activity"
],
"policy": "37a60e48-dd00-4867-af07-1fb22ac89078",
"_syncId": "b625d325-8d04-4f7e-9e18-44b0ac70f840"
},
{
"collection": "announcement_activity",
"action": "update",
"permissions": {
"_and": [
{
"user_id": {
"_eq": "$CURRENT_USER"
}
}
]
},
"validation": null,
"presets": null,
"fields": [
"id",
"user_created",
"created_at",
"sort",
"updated_at",
"user_updated",
"user_id",
"read",
"announcement_activity"
],
"policy": "37a60e48-dd00-4867-af07-1fb22ac89078",
"_syncId": "f9d6e17c-73f4-4e58-9b5b-c4187364318b"
},
{
"collection": "announcement_translations",
"action": "read",
"permissions": null,
"validation": null,
"presets": null,
"fields": [
"id",
"message",
"title",
"languages_code",
"announcement_id"
],
"policy": "37a60e48-dd00-4867-af07-1fb22ac89078",
"_syncId": "fe9d0dc9-bc69-4d7e-a647-9dfc087b6863"
},
{
"collection": "announcement",
"action": "create",
"permissions": null,
"validation": null,
"presets": null,
"fields": [
"*"
],
"policy": "37a60e48-dd00-4867-af07-1fb22ac89078",
"_syncId": "bb806129-2228-4a2a-8509-2a1b824f2d02"
},
{
"collection": "announcement",
"action": "read",
"permissions": null,
"validation": null,
"presets": null,
"fields": [
"*"
],
"policy": "37a60e48-dd00-4867-af07-1fb22ac89078",
"_syncId": "37b3f2a9-10c6-4418-90ff-861dc3e7ac51"
},
{
"collection": "announcement",
"action": "update",
"permissions": null,
"validation": null,
"presets": null,
"fields": [
"*"
],
"policy": "37a60e48-dd00-4867-af07-1fb22ac89078",
"_syncId": "ace5fc6d-b127-4443-bdcb-ffee193049f2"
},
{
"collection": "aspect",
"action": "create",
Expand Down
28 changes: 28 additions & 0 deletions echo/directus/sync/snapshot/collections/announcement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"collection": "announcement",
"meta": {
"accountability": "all",
"archive_app_filter": true,
"archive_field": null,
"archive_value": "archived",
"collapse": "open",
Comment on lines +4 to +8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Archiving is mis-wired – field missing.

archive_app_filter is on and archive_value / unarchive_value are set, but archive_field is null. Directus will ignore archiving completely. Point it to the status field (or drop the config).

-    "archive_field": null,
+    "archive_field": "status",

If there’s no status field, either add it or nuke the archive settings.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"accountability": "all",
"archive_app_filter": true,
"archive_field": null,
"archive_value": "archived",
"collapse": "open",
"accountability": "all",
"archive_app_filter": true,
- "archive_field": null,
+ "archive_field": "status",
"archive_value": "archived",
"collapse": "open",
🤖 Prompt for AI Agents
In echo/directus/sync/snapshot/collections/announcement.json around lines 4 to
8, the archive_field is set to null while archive_app_filter is true and
archive_value is set, causing Directus to ignore archiving. Fix this by setting
archive_field to the correct status field name used for archiving, or if no such
field exists, remove the archive_app_filter, archive_field, and archive_value
settings entirely to disable archiving properly.

"collection": "announcement",
"color": null,
"display_template": null,
"group": null,
"hidden": false,
"icon": null,
"item_duplication_fields": null,
"note": null,
"preview_url": null,
"singleton": false,
"sort": null,
"sort_field": "sort",
"translations": null,
"unarchive_value": "draft",
"versioning": false
},
"schema": {
"name": "announcement"
}
}
28 changes: 28 additions & 0 deletions echo/directus/sync/snapshot/collections/announcement_activity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"collection": "announcement_activity",
"meta": {
"accountability": "all",
"archive_app_filter": true,
"archive_field": null,
"archive_value": "archived",
"collapse": "open",
"collection": "announcement_activity",
"color": null,
"display_template": null,
"group": null,
"hidden": false,
"icon": null,
"item_duplication_fields": null,
"note": null,
"preview_url": null,
"singleton": false,
"sort": null,
"sort_field": "sort",
"translations": null,
"unarchive_value": "draft",
"versioning": false
},
"schema": {
"name": "announcement_activity"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"collection": "announcement_translations",
"meta": {
"accountability": "all",
"archive_app_filter": true,
"archive_field": null,
"archive_value": null,
"collapse": "open",
"collection": "announcement_translations",
"color": null,
"display_template": null,
"group": null,
"hidden": true,
"icon": "import_export",
"item_duplication_fields": null,
"note": null,
"preview_url": null,
"singleton": false,
"sort": null,
"sort_field": null,
"translations": null,
"unarchive_value": null,
"versioning": false
},
"schema": {
"name": "announcement_translations"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"collection": "dashboard_announcements_translations",
"meta": {
"accountability": "all",
"archive_app_filter": true,
"archive_field": null,
"archive_value": null,
"collapse": "open",
"collection": "dashboard_announcements_translations",
"color": null,
"display_template": null,
"group": null,
"hidden": true,
"icon": "import_export",
"item_duplication_fields": null,
"note": null,
"preview_url": null,
"singleton": false,
"sort": null,
"sort_field": null,
"translations": null,
"unarchive_value": null,
"versioning": false
},
"schema": {
"name": "dashboard_announcements_translations"
}
}
Loading