solymosi / npu

Neptun PowerUp! - Felturbózza a Neptun-odat
MIT License
274 stars 47 forks source link

Hide unfilled survey popup after login #57

Closed ghost closed 3 years ago

ghost commented 3 years ago

Neptun notifies the user about unfilled surveys every time they log in. There are already enough notifications about it via Neptun messages and emails, so it can be distracting when you're trying to focus on work.

The popup still appears briefly on login but it's automatically closed.

I have not been able to test yet whether this will dismiss any other popups that may appear on login.

solymosi commented 3 years ago

The npu.user.js in the main folder is now obsolete, it's only there so that existing users can seamlessly auto-upgrade to the new @downloadURL in the metadata.

The new way of adding functionality is:

  1. creating a new module in src/modules (you can use a similar existing module as an example)
  2. and hooking it up in src/index.js

The CI pipeline will run a few checks on the new code and will build it automatically.

ghost commented 3 years ago

Yeah, I realized in meantime, I changed it to be a module right before you commented.

solymosi commented 3 years ago

Thanks for the PR, this is good to go from my side 🎉 ✔️

A possible future enhancement could be adding a notice to the inbox page somewhere if there was a questionnaire popup that was auto-closed by the script, plus a link that allows the questionnaire to be filled out regardless. This way users would still have the option of filling it out but it wouldn't be shoved right in their face every time they log in.

Anyways, I'll merge this now.

ghost commented 3 years ago

It can still be filled out by going to Administration -> Questionnaires (Ügyintézés -> Kérdőívek), there's just no notification that they're still unfilled (unless you're fast enough to read it before the dialog closes).

solymosi commented 3 years ago

It can still be filled out by going to Administration -> Questionnaires (Ügyintézés -> Kérdőívek)

Ah, I didn't know that it was also exposed in the menu. In that case it's all good, people can still find it if they really want to 👍

solymosi commented 3 years ago

Version 2.1.0 has been released ✔️