Great module.

It would be nice to have multiple conditional_messages available to be setup.

Comments

SocialNicheGuru created an issue. See original summary.

wranvaud’s picture

Assigned: Unassigned » wranvaud

Thank you! This is in the road-map, should be implemented soon

mpp’s picture

Hi @wranvaud, any update on this?

wranvaud’s picture

Hi, development has been slow lately but I want to get back to it now. I hope to get some energy into this soon, thanks for bumping!

mpp’s picture

@wranvaud,

We'd probably need a custom entity to do this or what did you have in mind to store the different messages?

socialnicheguru’s picture

a cm_message entity to hold the different messages could work.

wranvaud’s picture

Yes, thanks for bumping, I'm working on this right now. My idea is to move all the module config to entities so the user can create a new entity that contains the conditions and messages as any other content on the site.

mpp’s picture

Hi @wrvanaud, thanks for the update on this!

I'd avoid using a regular node entity (like alertbox does) to avoid the overhead that comes with nodes. Instead I'd use a custom content entity.

There is one advantage on having a node, that is that we can enable scheduling using existing solutions for nodes. Not sure if you have scheduling on the backlog?

Perhaps you could create a clone on GitHub so we could follow up this feature and contribute there, wdyt?

socialnicheguru’s picture

For simplicity and future expansion I would stick with nodes.

wranvaud’s picture

Great, thanks for pointing out about scheduling. It wasn't something in my mind. I've done it as content entity indeed, it's still much of a work in progress, some code is pushed to the development branch some still to go as it matures. I'll gladly accept contributions once it gets a bit more stable!

mpp’s picture

@wranvaud, did you have a look at this project: https://www.drupal.org/project/user_alert

It's ancient but it largely seems to cover the same use cases. Note that it's also providing a custom content entity and (I haven't looked yet to the code for it) but it claims to support scheduling through scheduler.

Off topic:
- Something that could be improved perhaps is the use of Condition API to enable visibility configuration similar to block UI;
- I noticed some caching issue we may need to solve (we plan to use this in combination with Varnish);
I'll open issues if I get to spend some more time on this.

wranvaud’s picture

Hello, @mmp @SocialNicheGuru
Thanks for the suggestions, they are helpful.
Just to update you on this, most of the rewrite is done but still not functional for a release. On the next week or two we should have minimally functional features and then do incremental updates from there. Will keep you posted.

mpp’s picture

Thanks for the update @wranvaud!

  • wranvaud committed 9ef54f4 on 8.x-1.x
    Issue #2935839: Have multiple messages based on different criteria
    
wranvaud’s picture

Version: 8.x-1.x-dev » 8.x-1.0-alpha4
Status: Active » Fixed

Released a new version alpha5 with the ability to configure multiple messages.

Mind that the old configuration form was not deleted and you can check there your configurations but you'll have to create new messages for it to work. The deprecated forms will be deleted on the next releases.
Consider that this is alpha code and there will be usability improvements but please feel free to open another issue if you find functionality related issues. I'm closing this as fixed.

Thank you for your ideas and support on this issue!

mpp’s picture

Hi @wranvaud, thank you very much for the update!

wranvaud’s picture

Comment just to add credit where it is due, for some reason @SocialNicheGuru didn't get the credits for this issue the first time. Thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.