-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
AdminUI - Replace Contact Summary Activities tab #27717
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
There is a conflict now in Summary.php as a result of merging the relationships tab.
Great to see another tab being replaced! |
I can't see +Add Activity button: Also I have some doubts, in terms of usability, about removing the exclude activity type on the first view. From the perspective of the previous design, in general, I use more often exclude mailing activity type. With this proposal, I need to know that I have to modify the "is one of" selector and also make 1 click more than with the previous design. |
It looks nice. A couple notes:
|
Fixed. I had to add an ugly hack to copy the list of activities from the toolbar menu at the top of the page. Don't look at the code. But at least it's self-contained and we can justify it with the thousands of lines of bad code this will get rid of.
From what I can tell, that's a pre-existing condition. But ok, fixed.
Those were both caused by the same permission-related bug in the API. Fixed.
Well, personally I think the previous design was quite silly to put two mutually-exclusive filters on the same form (if you fill out both they will contradict each other). But whatever, if the path of least resistance to getting this merged is to add it, ok, I've added it.
Hmm, ok that's a todo.
I guess that setting will be irrelevant now. The new way to change the behavior would be to locally override the saved search and remove the where clause that excludes cases.
Is that even true for updates? Maybe we can just fix the form.
Again, I'm not sure that's true for updates, but if so we ought to fix it in the form, as per-activity-type dynamic urls would be crazy hard. |
Cool.
Yeah ok. I see this tab in particular suffering from the message-template upgrade style nightmare, having to merge in changes from core if you've overridden it, but I still don't have a good idea what to do about that. Another general thing maybe better discussed elsewhere, is that there are existing unit tests for this feature which obviously didn't catch this here. We maybe need a strategy for what to do with existing unit tests on various features on tabs, and also for admin-ui although I doubt there are many for those.
I'm not sure what you mean by "even for updates", but yes? I will grant that since activity revisions are gone it at least doesn't have that problem. But as one simple example edit an Open Case activity with the regular url. First, the fields are not the right set of fields. Second, the sections are not the right sections, e.g. there's supposed to be a "send a copy" section, and I definitely don't want a "repeat activity" section on open case. Third, if you edit the activity date it doesn't do all the right things. I also get a "We could not find a contact id" error popup on save which doesn't at first glance affect the save, but is obviously wrong. So I'm not sure what you mean by "fix the form". It's a different form.
It's true for some case activity types, and at least for regular inbound and outbound email. I did test now. Also contribution and event registration activities used to link to their entities instead. They're now linking to the regular activity url which is ... weird. Is there a way for extensions to change these links per-row? (Core or 3rd party extensions.) Or is that what you mean by crazy hard - that these have to be part of the search display definition? |
@demeritcowboy thanks for summing up this crummy situation. IMO it's a bad design if the form to edit a thing requires a lot of information about the thing to be passed through the URL. I've seen it in other places too, and fixed it where I could. For example the Manage Case Form was requiring both an When you only ever link to a form from one place, then it seems easy enough to generate fat links that carry a lot of calculated data. But as soon as you start needing to link from other places, performing that same logic all over the place gets messy. IMO the ideal SearchKit is most efficient with thin (id-only) links. It can deal with fatter links and will add the necessary SELECTs to the query, but only if it can all be expressed with tokens. For example, the Relationship edit form, for some reason, requires 3 bits of data to be passed in: id, cid & rtype. That probably represents a design flaw in the form, but SearchKit copes with it because it knows what to do with tokens. But what you're describing requires the links be completely different depending on the activity type, and some of the forms aren't even activity forms! That's not tokenizeable. Bleh. What if we made the tokenized link look like this:
SearchKit would handle that just fine. And because of the way paths work in CiviCRM, that makes |
Thanks @colemanw I can see the "+ Add Activity" button Regarding the inclusion and exclusion filters, I share with you that the first version avoids the confusion of using the inclusion and exclusion filters at the same time. But instead, the current version maintains the practicality of being able to directly enter the activities to be excluded. Perhaps some warning could be added if both filters are filled in the style: "Only one of the exclude or include filters should be used." For me, I have no resistance about the first option, just doubts. In any case, if we keep the current option, we would add labels to the fields (include, exclude, date and status). Otherwise, once the value is entered, the context of which filter is applied is lost. |
Thanks @larssandergreen for testing. |
I've added the "Remember Filters" feature to Afform, which will replace the functionality of the 'preserve_activity_tab_filter' setting. |
d3d5ed5
to
4251e79
Compare
@aydun @larssandergreen @francescbassas @demeritcowboy I've reworked this PR in tandem with #27973. When that one is merged this one will be fully-functional. I've also moved this into the Admin UI extension to give it a softer launch. I've updated the description, screenshots and removed draft status. It's ready! |
…r toolbar buttons
Thanks @francescbassas - you must have very quick fingers to have captured that screenshot! |
I'm going to merge this based on the discussion / review / testing that has already gone into it I think the issue is how we communicate around this one as per mentioned above this is a tab some users have customised |
I'm slowly catching up... Looks good @colemanw ! |
Overview
3rd core contact summary tab to be replaced by SearchKit!
Unlike #27610 and #27701 this one is added to the optional Admin UI extension instead of directly to core, since it's more complex and more heavily used. This will give a trial period with some time to test the new version & update any customizations they've made to the old version of the tab.
Before
After
Comments
A couple differences between the before & after UI:
To create a new activity, instead of picking an activity type from a dropdown and then getting a popup, you get a popup and then pick the activity type from a dropdown.Fixed via SearchKit - New getLinks API action for advanced link handling #27973, see updated screenshot above.Note: The
civicaseShowCaseActivities
system setting is respected by this new display. Case activities will be shown if that setting is enabled. However, once this code gets migrated from AdminUI to core, we should probably look at phasing out that setting since it can be achieved simply by editing the SavedSearch criteria.