-
-
Notifications
You must be signed in to change notification settings - Fork 949
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
SAK-49287 Notifications. Improved push permissions workflow #11947
Conversation
Tasty - I was wondering how we were going to handle this. Folks say 'no' to the "accept notifications" for all sites - so for an LMS they need a second chance. We will need to see if browsers kind of beat us up - they probably have some trick to keep sites from asking over and over. |
webcomponents/bundle/src/main/bundle/sui-notifications.properties
Outdated
Show resolved
Hide resolved
webcomponents/bundle/src/main/bundle/sui-notifications.properties
Outdated
Show resolved
Hide resolved
sakai-root/pom.xml
Outdated
|
||
<name>Sakai Root</name> | ||
<groupId>org.sakaiproject</groupId> | ||
<artifactId>ROOT</artifactId> |
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.
Adrian can you explain this artifact ROOT? do we have a better name?
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.
So the war file is called ROOT.war and is deployed to the tomcat root, that's all.
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.
Do you think I can change the artifact id while still creating ROOT.war to deploy to tomcat?
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.
the reason we have this sakai-root thing is that we need to deploy a single service worker to the top level of our hierarchy so it can control all of Sakai's paths. It's crucial.
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.
the artifact is now "serviceworker" and I've used deployId to deploy to tomcat as the ROOT war.
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.
Not particularly a fan of the path names maybe we can discuss that?
which path names in particular? |
f2f1c35
to
7706cfc
Compare
I've updated this to change the ROOT sakai maven module to just be called "root" and not "sakai-root". Also, I've added a button in the notifications window to make it explicit that the user is opting into Sakai notifications. |
5d77766
to
1b2f73e
Compare
I've now updated this maven module to be called "serviceworker". No more root. |
@adrianfish I think I can take a look at the PR sometime next week, if it's still needed. But just to get some context, when the user does not accept the push notifications, there will be no notifications within the portal neither? |
@stetsche Exactly that. Our challenge is inform the user that Sakai notifications are good. Push is so powerful and it is a shame that companies have abused it so heavily. |
@adrianfish, okay I understand what the PR is for. But when I enable push notifications, will notifications display only in the portal, or like other push notifications as OS notifications (What a lot of websites are abusing)? |
Depending on the browser, both. Chrome and firefox will popup a OS notification as well as adding a notification to the portal area. |
Okay, and if you want to have only portal notifications you need to enable them in the browser and block browser notifications on the OS level? |
I suppose so. Or we could just disable them in the js. They are explicitly triggered, the os notifications. |
7cabc84
to
8a9d022
Compare
webcomponents/tool/src/main/frontend/packages/sakai-push-utils/test/sakai-push-utils.test.js
Outdated
Show resolved
Hide resolved
7d4b3b6
to
1fe1cd2
Compare
3e7136d
to
cdfb529
Compare
Done with this now. I've removed sakai-message-broker.js. Most of the logic moved nicely into sakai-push.utils.js and the remainder I just tacked onto portal.init.js. |
This seems to consistently break Cypress tests. I saw lots of errors in my console around theme switching. Maybe theme switcher was depending on something that got moved? |
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.
@adrianfish I can take a closer look at next week
webcomponents/tool/src/main/frontend/packages/sakai-push-utils/package.json
Outdated
Show resolved
Hide resolved
webcomponents/tool/src/main/frontend/packages/sakai-push-utils/README.md
Outdated
Show resolved
Hide resolved
webcomponents/tool/src/main/frontend/packages/sakai-push-utils/test/sakai-push-utils.test.js
Show resolved
Hide resolved
webcomponents/tool/src/main/frontend/packages/sakai-push-utils/web-test-runner.config.mjs
Show resolved
Hide resolved
portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeAccountNav.vm
Outdated
Show resolved
Hide resolved
portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeAccountNav.vm
Outdated
Show resolved
Hide resolved
portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeAccountNav.vm
Outdated
Show resolved
Hide resolved
portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeMobileFooter.vm
Outdated
Show resolved
Hide resolved
portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeStandardHead.vm
Outdated
Show resolved
Hide resolved
webcomponents/bundle/src/main/bundle/sakai-notifications.properties
Outdated
Show resolved
Hide resolved
webcomponents/tool/src/main/frontend/packages/sakai-push-utils/src/sakai-push-utils.js
Outdated
Show resolved
Hide resolved
webcomponents/tool/src/main/frontend/packages/sakai-push-utils/src/sakai-push-utils.js
Outdated
Show resolved
Hide resolved
kernel/api/src/main/java/org/sakaiproject/messaging/api/model/UserNotification.java
Outdated
Show resolved
Hide resolved
portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeAccountNav.vm
Show resolved
Hide resolved
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.
The PR looks good to me now. Well done @adrianfish! I only found a console.log
to remove, but I'll mark this as approved already, so I don't have to come back to the PR
webcomponents/tool/src/main/frontend/packages/sakai-push-utils/src/sakai-push-utils.js
Outdated
Show resolved
Hide resolved
…/src/sakai-push-utils.js Co-authored-by: stetsche <[email protected]>
Thanks a ton @stetsche, for the review. And anybody else who reviewed this PR. Much appreciated :) |
Made changes to the artefact name and sakai code module name
I think the husky command is failing for windows |
Co-authored-by: stetsche <[email protected]> (cherry picked from commit 3cbd7d2) Conflicts: portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeStandardHead.vm webcomponents/tool/src/main/frontend/packages/sakai-notifications/src/SakaiNotifications.js
https://sakaiproject.atlassian.net/browse/SAK-49287