From 24a0143b67908adaec5e6ff9a6cbdf830da0a341 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 29 Dec 2025 12:40:48 +0530 Subject: [PATCH 1/4] docs: update banner notification docs --- docs/appNotifications/readme.md | 52 ++------------------------------- 1 file changed, 3 insertions(+), 49 deletions(-) diff --git a/docs/appNotifications/readme.md b/docs/appNotifications/readme.md index 99feb09e..5d82acea 100644 --- a/docs/appNotifications/readme.md +++ b/docs/appNotifications/readme.md @@ -25,6 +25,7 @@ A sample json is as follows: { "SAMPLE_NOTIFICATION_NAME": { "DANGER_SHOW_ON_EVERY_BOOT" : false, + "PRO_EDITION_ONLY" : false, "HTML_CONTENT": "
hello world Click to acknowledge.
", "FOR_VERSIONS": "1.x || >=2.5.0 || 5.0.0 - 7.2.3", "PLATFORM" : "allDesktop" @@ -37,6 +38,8 @@ A sample json is as follows: or there is an html element with class `notification_ack`. 1. `SAMPLE_NOTIFICATION_NAME` : This is a unique ID. It is used to check if the notification was shown to user. +2. `PRO_EDITION_ONLY` : (Default false) Setting this to true will not show the notification on community editions. + Only works in versions > 5.0.0 - so combine it with that is must! 2. `DANGER_SHOW_ON_EVERY_BOOT` : (Default false) Setting this to true will cause the notification to be shown on every boot. This is bad ux and only be used if there is a critical security issue that we want the version not to be used. @@ -48,52 +51,3 @@ A sample json is as follows: The notification will be shown to all versions satisfying this. 5. `PLATFORM`: A comma seperated list(no spaces) of all platforms in which the message will be shown. allowed values are: `mac,win,linux,allDesktop,firefox,chrome,safari,allBrowser,all` - - -## toast notifications - `toast.json` - -Toast notifications are shown at the side on the general notification area. Multiple toast notifications -can be shown at the same time. Format is similar to banner notification. - -By default, a notification is shown only once and auto close after 25 seconds. -If there is an html element with class `notification_ack` it must be clicked to be dismissed, -else it will come up after every boot till it is acknowledged or the close button clicked. - -### Format of `/root/toast.json` - -> - -`` can be `staging` or `prod`. (`dev` stage is directly in phoenix codebase for ease of development.) - -A sample json is as follows: -```json -{ - "SAMPLE_NOTIFICATION_NAME": { - "TRIGGER" : "MENU_CLICK:file.newFolder,HTML_ELEMENT:#project-files-container", - "TYPE": "ERROR/WARN/INFO/SUCCESS", - "HTML_CONTENT": "
hello world Click to acknowledge.
", - "FOR_VERSIONS": "1.x || >=2.5.0 || 5.0.0 - 7.2.3", - "PLATFORM" : "allDesktop", - "autoCloseTimeS": 25 - }, - "ANOTHER_SAMPLE_NOTIFICATION_NAME": {...} -} -``` - -1. `SAMPLE_NOTIFICATION_NAME` : This is a unique ID. It is used to check if the notification was shown to user. -2. `TRIGGER` : The trigger to show the notification. Can be a comma seperated list of one of the following - `APP_START/MENU_CLICK:/KEYBOARD_SHORTCUT:/OTHER:/HTML_ELEMENT:<.class/#id>` - 1. `APP_START` : notification will be shown on app start. - 2. `MENU_CLICK:` : When a command is executed by clicking on a ui menu item. - 3. `KEYBOARD_SHORTCUT:` : When a command is executed by keyboard shortcut. - 4. `HTML_ELEMENT:` : On click on the given html element with jquery selector. -3. `TYPE` : Can be one of `ERROR/WARN/INFO/SUCCESS`. -4. `HTML_CONTENT`: The actual html content to show to the user. It can have an optional `notification_ack` class. - Setting this class in any child html node will cause the notification to be shown once a day until the user explicitly clicks - on any html element with class `notification_ack` or explicitly click the close button. - If such a class is not present, then the notification is shown only once ever. -4. `FOR_VERSIONS` : [Semver compatible version filter](https://www.npmjs.com/package/semver). - The notification will be shown to all versions satisfying this. -5. `PLATFORM`: A comma seperated list(no spaces) of all platforms in which the message will be shown. - allowed values are: `mac,win,linux,allDesktop,firefox,chrome,safari,allBrowser,all` -6. `autoCloseTimeS`: Time to auto close the popup in seconds \ No newline at end of file From b50524bdbf5d43c3d88efff9909af9b9d08471e2 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 29 Dec 2025 13:30:58 +0530 Subject: [PATCH 2/4] refactor: remove unused toast.json --- docs/appNotifications/prod/de/toast.json | 2 -- docs/appNotifications/prod/fr/toast.json | 2 -- docs/appNotifications/prod/it/toast.json | 2 -- docs/appNotifications/prod/ja/toast.json | 2 -- docs/appNotifications/prod/ko/toast.json | 2 -- docs/appNotifications/prod/pt-BR/toast.json | 2 -- docs/appNotifications/prod/root/toast.json | 2 -- docs/appNotifications/staging/root/toast.json | 2 -- 8 files changed, 16 deletions(-) delete mode 100644 docs/appNotifications/prod/de/toast.json delete mode 100644 docs/appNotifications/prod/fr/toast.json delete mode 100644 docs/appNotifications/prod/it/toast.json delete mode 100644 docs/appNotifications/prod/ja/toast.json delete mode 100644 docs/appNotifications/prod/ko/toast.json delete mode 100644 docs/appNotifications/prod/pt-BR/toast.json delete mode 100644 docs/appNotifications/prod/root/toast.json delete mode 100644 docs/appNotifications/staging/root/toast.json diff --git a/docs/appNotifications/prod/de/toast.json b/docs/appNotifications/prod/de/toast.json deleted file mode 100644 index 7a73a41b..00000000 --- a/docs/appNotifications/prod/de/toast.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/docs/appNotifications/prod/fr/toast.json b/docs/appNotifications/prod/fr/toast.json deleted file mode 100644 index 7a73a41b..00000000 --- a/docs/appNotifications/prod/fr/toast.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/docs/appNotifications/prod/it/toast.json b/docs/appNotifications/prod/it/toast.json deleted file mode 100644 index 7a73a41b..00000000 --- a/docs/appNotifications/prod/it/toast.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/docs/appNotifications/prod/ja/toast.json b/docs/appNotifications/prod/ja/toast.json deleted file mode 100644 index 7a73a41b..00000000 --- a/docs/appNotifications/prod/ja/toast.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/docs/appNotifications/prod/ko/toast.json b/docs/appNotifications/prod/ko/toast.json deleted file mode 100644 index 7a73a41b..00000000 --- a/docs/appNotifications/prod/ko/toast.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/docs/appNotifications/prod/pt-BR/toast.json b/docs/appNotifications/prod/pt-BR/toast.json deleted file mode 100644 index 7a73a41b..00000000 --- a/docs/appNotifications/prod/pt-BR/toast.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/docs/appNotifications/prod/root/toast.json b/docs/appNotifications/prod/root/toast.json deleted file mode 100644 index 7a73a41b..00000000 --- a/docs/appNotifications/prod/root/toast.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/docs/appNotifications/staging/root/toast.json b/docs/appNotifications/staging/root/toast.json deleted file mode 100644 index 7a73a41b..00000000 --- a/docs/appNotifications/staging/root/toast.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file From f12d69edc719c298c21b1415640bd1f64016fbb0 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 29 Dec 2025 17:00:43 +0530 Subject: [PATCH 3/4] chore: update notificatiojn docs --- docs/appNotifications/readme.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/appNotifications/readme.md b/docs/appNotifications/readme.md index 5d82acea..fb01c29b 100644 --- a/docs/appNotifications/readme.md +++ b/docs/appNotifications/readme.md @@ -25,10 +25,10 @@ A sample json is as follows: { "SAMPLE_NOTIFICATION_NAME": { "DANGER_SHOW_ON_EVERY_BOOT" : false, - "PRO_EDITION_ONLY" : false, "HTML_CONTENT": "", "FOR_VERSIONS": "1.x || >=2.5.0 || 5.0.0 - 7.2.3", - "PLATFORM" : "allDesktop" + "PLATFORM" : "allDesktop", + "USER_TYPE" : "all" }, "ANOTHER_SAMPLE_NOTIFICATION_NAME": {...} } @@ -38,8 +38,6 @@ A sample json is as follows: or there is an html element with class `notification_ack`. 1. `SAMPLE_NOTIFICATION_NAME` : This is a unique ID. It is used to check if the notification was shown to user. -2. `PRO_EDITION_ONLY` : (Default false) Setting this to true will not show the notification on community editions. - Only works in versions > 5.0.0 - so combine it with that is must! 2. `DANGER_SHOW_ON_EVERY_BOOT` : (Default false) Setting this to true will cause the notification to be shown on every boot. This is bad ux and only be used if there is a critical security issue that we want the version not to be used. @@ -51,3 +49,6 @@ A sample json is as follows: The notification will be shown to all versions satisfying this. 5. `PLATFORM`: A comma seperated list(no spaces) of all platforms in which the message will be shown. allowed values are: `mac,win,linux,allDesktop,firefox,chrome,safari,allBrowser,all` +6. `USER_TYPE`: A comma seperated list(no spaces) of all user types in which the message will be shown. + allowed values are: [`all`, `notLoggedIn`, `loggedIn`, `trial`, `paidSubscriber`]. This filter is only available + in versions > 5, else it is ignored in older versions. combine with `FOR_VERSIONS` to filter based on user type. From 62057e521990c363cd54bb87ad22c7c002b94f5e Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 29 Dec 2025 17:04:08 +0530 Subject: [PATCH 4/4] chore: update notificatiojn docs --- docs/appNotifications/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/appNotifications/readme.md b/docs/appNotifications/readme.md index fb01c29b..7d22285f 100644 --- a/docs/appNotifications/readme.md +++ b/docs/appNotifications/readme.md @@ -28,7 +28,7 @@ A sample json is as follows: "HTML_CONTENT": "", "FOR_VERSIONS": "1.x || >=2.5.0 || 5.0.0 - 7.2.3", "PLATFORM" : "allDesktop", - "USER_TYPE" : "all" + "USER_TYPE" : ["paidSubscriber", "loggedIn"] }, "ANOTHER_SAMPLE_NOTIFICATION_NAME": {...} } @@ -49,6 +49,6 @@ A sample json is as follows: The notification will be shown to all versions satisfying this. 5. `PLATFORM`: A comma seperated list(no spaces) of all platforms in which the message will be shown. allowed values are: `mac,win,linux,allDesktop,firefox,chrome,safari,allBrowser,all` -6. `USER_TYPE`: A comma seperated list(no spaces) of all user types in which the message will be shown. +6. `USER_TYPE`: An array of all user types in which the message will be shown. allowed values are: [`all`, `notLoggedIn`, `loggedIn`, `trial`, `paidSubscriber`]. This filter is only available in versions > 5, else it is ignored in older versions. combine with `FOR_VERSIONS` to filter based on user type.