Moved generation of notify div element from php code to hypha.html #172
No reviewers
Labels
No labels
Component: User interface
Component: Wymeditor
Help wanted
Level: Difficult
Level: Easy
Level: Moderate
Pagetype: Festival
Pagetype: Mailinglist
Pagetype: Peer reviewed article
Pagetype: Text
Privacy GDPR AVG
status: has conflicts
Status: Needs changes
Status: Needs discussion
Status: Needs review
Status: Ready to merge
Status: Waiting for response
Type: Bug
Type: Enhancement
Type: Question
Usecase: De Stadsbron
Usecase: Koppelting
Usecase: MeetjeStad
Value: Coders
Value: Security
Value: Users
Value: Visitors
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
harmen/hypha!172
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "notifyStyling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The div element with id 'hyphaNotify' was generated dynamically in the function
addNotifier in events.php and added to the end of the DOM document. Now it is
included in the default hypha.html document to facilitate styling.
I wonder what we should do with existing installations, that do not have this entry in their hypha.html. With the PR as it is now, these require manually updating hypha.html, or they will lose notifications entirely.
One way to fix this would be to keep the old code, but only insert the div when it is not already present. If we do this inside hypha_getHtml() (IIRC), this would also automatically happen when you edit the markup through the webinterface, so if you edit it once, it will automatically get inserted. Another approach would be to have some kind of explicit "migration" run that modifies all themes.
Or we could ignore this for now (just update it manually) and create something proper for migrations later.
This visibility setting should actually happen further down below, since now notifications from $_GET are not included in this check. I think this is not a new problem, though, but something that's easy to fix now.
I added a very rough compatibility check, to at least not break existing installations.
I also fixed the GET notification ordering, which were indeed hidden. While I was there, I fixed a few more details.
Looks good!
Perhaps the ":empty" pseudo selector can offer a solution here?!