Hello... Been trying to give this module a try. I do realize it is in an early state. Not a Drupal developer, but been around for a bit I suppose. Some UI feature requests for you. Nothing terribly earth-shattering here I don't think. Some might be trivial.

User interface changes

  1. When editing Digests (/admin/structure/digests) it would be handy if the Operations selectors could include an Enable/Disable option to more quickly move between the two values. Easy enough to edit it and make the change, but this would make it a bit easier.

    Moved to #3181409: Add enable / disable operations to Digests

  2. Similarly, would be nice if the same Operations selector (for the Enabled digests) also had a "Send Now" option to actually do the sending at that time. Useful for testing or when the schedule doesn't really need to be applied, like after a big update or something.

    Moved send to single user to #3175852: Add a send to user function for digests

  3. That same view could also benefit from displaying when it was last run and/or when it is expected to run next.

    Moved to #3162691: Add send data to digest views

  4. And one more thing for the view... the ability to change the order of the digests? When they are displayed on the registration page, I'd prefer to have a specific order applied.
  5. I've added the digests as something the user can edit in their profile, and handy that it is available at the time the user is registering. However, it would be easier for the user to find these settings later if they appeared under their own tab (say, a Digests tab) on the User page rather than having to hunt for it elsewhere. Maybe there is another way to do this and I'm just not familiar?

So far everything seems to be looking pretty solid! Nice work.

CommentFileSizeAuthor
#12 UserDisplay.png22.88 KBderekcresswell
#12 UserFields.png67.33 KBderekcresswell

Comments

GNUMatrix created an issue. See original summary.

gnumatrix’s picture

Issue summary: View changes
derekcresswell’s picture

Thanks for the kind words!

From the looks of it, most of these are good changes but likely won't be until a 1.1.0 release. See 3166611 for the details for 1.0.0 release.

1. Yep, I like it. We'll get that in as soon as possible.

2. This would be very useful. I wonder if it should be added as a test feature or not. Currently the "send" function for digests is for one user at a time. So either we have the "Test send" which just sends one to the current user or we add a "sendMultiple" function.
An important note for this, cron runs as an anonymous user. To make sure behaviour is consistent, this test would need to send from an anonymous user.

3. Sure, sounds alright to me.

4. I love my organisation as much as the next guy. This doesn't have much purpose, usually when this is added it would mean that the order on the page has a meaning (which it doesn't). I wouldn't mind having this added, but it would likely be pushed further back in development.

5. I'm not entirely sure how to achieve what you are asking at this moment (at least, in a no hacky way). There was talk in 3154614 for why this was added as a user field if that's any bit helpful. Perhaps we can find a way to allow the option of the fields being edited on a separate page (I'm sure Drupal has the capability), might just require some searching. If that's something to be achieved inside the module (as opposed to in the site) I'd be happy to include it.

gnumatrix’s picture

Thanks for the response! Totally understandable that these things get implemented whenever it suits you, if at all :-)

Further to 2) I think a Test is a good idea, sending to the account email that is logged in and running the test - no reason to create a new test email account field or anything. Certainly safer than sending out to everyone.

Further to 4) the idea is that I've got digests that are weekly and daily and some that cover everything and some that cover something very specific, so the order isn't important for any system reason but makes for better presentation. IE, I might want to list all the daily digests first, followed by all the weekly digests. Or put the company-wide digest first and the product-specific digest last. That sort of thing. I dunno. If you've ever seen the multi-year thread (still ongoing) about how the sorting is done for the "add content" page in Drupal, maybe sorting isn't such an easy thing?

Further to 5) I suppose I could add a separate page with just that on it, just for editing, but again as I'm not a developer I have no clue how people implement what I'm asking about either, so I can't be of much help. Would be a good UI to have. I think simplenews does this, but I can't recall offhand for certain. Certainly something that does get implemented, but obviously lower on the to-do list I'm sure.

derekcresswell’s picture

When I find some time I will look into 4 and 5 deeper.
1, 2, and 3 will just have to wait until after 1.0.0 as I want to get a functional release out.

gnumatrix’s picture

For 4, I didn't realize that they are already sorted by machine name. So I've recreated my digests using machine names ordered how I'd like, so all good for now. Thanks for the consideration though. Still a good idea to implement a proper ordering mechanism down the road I think. Good luck with the 1.0.0 release. Looking good I hope!

gnumatrix’s picture

For 5, it seems it is actually not hard at all to add a view as a new user page. Involves, briefly:

  1. Create a new view with a page display, pointing at the user type
  2. Add Digests field
  3. Adjust the page url to be /user/%user/pagename (eg /user/%user/Digests)
  4. Change the menu option to point at the User Accounts view
  5. Set the Contextual filter to point at the user, which it gets from the URL
  6. New tab called Digests now appears on the user page, displaying the contents of the view.

So this works great for displaying the list of Digests that a user has subscribed to.

However, it seems beyond me as to how to make this editable, showing all of the available Digests with their descriptions, sorting, etc. I guess this is a Digest field widget? I tinkered a bit with the Entity Browser module, but might have to save that for another day - not the easiest thing to muddle through. Not sure how else to display the widget in the view though, rather than just the values.

There's another Views Entity Form Field module, but it is not marked as ready for D9 so I've not tried that one. Might be a better fit.

Something for me to tinker with tomorrow I suppose.

gnumatrix’s picture

Further to the user tab issue, I've been posting requests to a similar module called DANSE. They are trying to do something a little different than what you're doing here. I had requested the same of them and they managed to add a switch to their module to toggle whether their block appears in the Edit page or a separate tab. Maybe you can have a peek at their code and see what it did? I'm not nearly well-equipped enough to be able to do this for you, I'm afraid. Check out this thread.

derekcresswell’s picture

That is a helpful resource. We will likely try to implement something similar here.

For the moment, we are freezing features for 1.0.0 while we conduct some testing of the RC on one of our sites. If you can begin testing with the RC let us know of any bugs that come up.

I'm already planning a 1.1.0 release that will include many of the visual changes here and in the issue queue. Shortly after we ship the stable 1.0.0, I will create a meta issue detailing the inclusions for 1.1.0. I'm very keen to keep this module moving forward, sadly time is being constrictive right now.

Since you have provided an example of similar functionality I would assume that this can be addressed very soon in the life cycle since I or whoever takes it up won't have to think very much.
I'll also note, if you are very eager to get more development going onto this module, I'd advise you spread the word about it to the community. As I said, my time for this is sadly becoming restricted but perhaps we can attract other community members to participate in building it up.

derekcresswell’s picture

Issue summary: View changes
derekcresswell’s picture

Issue summary: View changes
derekcresswell’s picture

StatusFileSize
new67.33 KB
new22.88 KB

Hey GNU, I think I have the solution you are looking for!

I always try and find another module to do work for me before typing my own code and I stumbled (more so remembered, it's not a very niche module) onto the Field Group module. And here is a handy little tutorial.

For me, I just put all of the user fields inside of tabs and separated out the subscriptions. This way you could also include any other module that uses fields for subscriptions in the same place. I checked out the DANSE module way of doing this and being honest I am not a fan of their method. That being using user data and a separate form for this stuff.
Anyway here are some screenshots of what the field group did for me. To me this is sufficient for the task if I understand you correctly and "more right" than making another tab as might have been the original thought (such as the user view, edit, etc. tab).

Lemme know if that's good : )

P.S. With the field group you can then do the exact same and display the view page with tabs or however you want.