-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add predefined date ranges, and UI tooltips #2
Add predefined date ranges, and UI tooltips #2
Conversation
Added error-viewing capability, thanks to @neekfenwick
Thanks for updating! I'll dig into reviewing this afternoon.
I'd opted to include it "anyway". because I figured most error messages aren't actually going to be monstrous. And errors won't happen regularly. Plus we're only listing like max 25 or so records at a time, so it's not gonna blow out RAM.
I'll have to model your code to see what you mean. |
zc_plugins/EmailArchiveManager/v4.0.0/admin/email_archive_manager.php
Outdated
Show resolved
Hide resolved
Food for thought: define('SUBJECT_SIZE_LIMIT', 200);
define('MESSAGE_SIZE_LIMIT', 550); Will storeowners need to change these at all? I don't want to create configuration table entries for these settings. Having them hardcoded as constants was kinda okay when the plugin was something people drop into the core app directory's files, to manually edit those values there. So, my question is: do these values "need" to be user-editable? Or are these defaults "fine"? I'm inclined to leave it as-is: IMO these are reasonable defaults. But input welcome. |
Fair points but I think you're overthinking. I don't know where these constants came from exactly, I did pop the subject one up from 25 to 200 to let the CSS ellipsis rule do more heavy lifting. Building something to make them more editable seems like overkill. |
And thanks for catching some of my missed updates to echo syntax. 👍 |
Do you have an opinion on removing the Archive ID column and replacing it with a tooltip or info circle or something with the archive id value available? e.g.: in Date Sent column: I feel most store owners won't care about the ID value and it just takes up screen space. Developers needing to access a database record by ID can still get to it. Another trick often used it to put it in an expando attribute like |
I'm okay with preserving the screen space by hiding the ID behind a tooltip. I'm mindful that the ID shows when viewing the actual email full-screen via either of the text/html buttons in the right column ... and sometimes when parsing through an on-screen list it's nice to correlate those IDs from individual pages to the "grid". |
I notice I added one years ago to help my troubleshooting so I might be confusing myself but I see nothing in the install/upgrade SQL that adds an index. However a recent 158 database I installed has two indexes idx_email_to_address_zen and idx_module_zen and I can't see where these are created during install. If you agree, how would you add this index? Core ZC? And/or a patch-in in this addon like is done for the errorinfo column? |
I support a PR to core ZC to add the It could be added to the ScriptedInstaller for this plugin as well (again, preferably a separate PR for it), but would have to first check whether an index by that same name already exists, else install/upgrade will fail. |
Sounds great, could you do the core ZC please, as I'm not nearly as familiar as you. I can probably handle this addon changes. If the core "index exists" helper fn does not exist pre v2.1 in core it'll have to have its own in-house fn for back-compat, I guess I'll add that. I missed the index creation in core 'cause I almost never do it in the CREATE TABLE statement, so didn't even bother looking there :) Weird that my text search didn't find it. Whatever, doh! |
I'd forgotten: We usually don't use |
Done: Index added to v2.1.0 |
See this latest commit, with recently discussed changes. Looks pretty good. Possible merge candidate, I think it's up to date with main branch. |
Hang on, I'm going to make the default date range shorter, like 30 days, no shop is going to want to request their entire history on initial page load. |
Done. |
zc_plugins/EmailArchiveManager/v4.0.0/admin/email_archive_manager.php
Outdated
Show resolved
Hide resolved
zc_plugins/EmailArchiveManager/v4.0.0/admin/email_archive_manager.php
Outdated
Show resolved
Hide resolved
Er. I've left the CSS kind of half cocked. Was trying to get the columns to be a fixed width but it didn't work because |
Thanks @neekfenwick ! |
These are changes from the commit scottcwilson/Email_Archive_Manager@1053e6c which seems to have been missed as my PR there was incorporated into this plugin.
The structure here is quite different (in a good way) so I've had to get slightly creative but it's basically the same stuff.
One thing I'm not clear on is the styling of the radio buttons seems to have some space on their left edge that wasn't there before. It's late here, I'm going to leave this here and will come back in the morning.
By the way don't worry about the datepicker not having an icon, it's my custom fontawesome font missing that glyph, I'll fix that locally.