Get rid of notification settings wiki macros

Hi everyone,

the notification settings UI have been developed in the past by defining a set of various wiki macros that are then called in the user profile for displaying the different notification settings option.
I’m not sure why this was developed like this back then: maybe there’s a specific usecase for allowing to reuse those macros. Right now, those macro are only reused once, in the administration settings for notifications. But to my knowledge that’s the only two places where we need to use those macros, and I’m failing to see why a user would want to inject those macro in a page.

So right now I see 2 problems with having those settings defined as macro:

  1. it’s displayed to end user when they want to select macros to insert related to notifications, which should never be the case see:

  2. it creates a maintenance burden since those macro are supposed to work, but we never really test them outside of notification settings and so we’re easily missing regressions (e.g. Loading...)

So this proposal is about getting rid of these wiki macros and probably transform the code to velocity macros put in one or some dedicated pages of Notification code to be reused where needed.

WDYT?

We could lighten a bit the burden by tagging those macros as internal.

But anyway, if you feel the feature can be implemented without going through macro, +1 to get rid of them.

1 Like

It’s probably the first easy thing to do, before checking to move it to velocity macros.

But I’d still move the code as I don’t see the point of being implemented like that.

I guess we could move those macro to internal in LTS and refactor only in master for example.

1 Like

+1 to first mark them as internal, then do the refactoring on master only (probably including moving the macros to legacy).

We could ask @gdelhumeau since I think he worked on this.

Same here, thx