Skip to content
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

SearchKit - Add static groups and organize main entity selector #20434

Merged
merged 5 commits into from
May 31, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented May 28, 2021

Overview

Adds static (non-smart) groups to SearchKit, and organizes main entity selector to be less cluttered, with primary entities up top and the rest within a collapsible optgroup.

Comments

I started doing the declutter work because selecting a group join is confusing. There are currently 3 ways to join on group (created by, modified by, plus the actual join on GroupContact which is the one 99% people want to use over the other two). That circled my mind back to a previous conversation about basic vs advanced modes, and I thought a collapsible optgroup would help a lot towards that end.
In this PR I didn't get as far as organizing the join selectors, so far the declutter just applies to the main entity selector, but it's a start and this PR is getting quite large, so it'd be good to get it merged and I'll keep at it...

@civibot
Copy link

civibot bot commented May 28, 2021

(Standard links)

@civibot civibot bot added the master label May 28, 2021
@eileenmcnaughton
Copy link
Contributor

@colemanw
Test Result (2 failures / +2)

api.v4.Action.FkJoinTest.testBridgeJoinTags
api.v4.Action.FkJoinTest.testBridgeJoinRelationshipContactActivity
-- | --

colemanw added 4 commits May 28, 2021 07:42
This changes the 'bridge' metadata property to a multi-dimensional array
to hold extra info like description.
In preparation for showing different tiers of entities, make this a string
instead of a boolean property, to mark searchability as 'primary', 'secondary', or 'none'.
Adds a collapsed optgroup for secondary entities so they are available
but not as prominent as the commonly-searched primary entities.
@eileenmcnaughton
Copy link
Contributor

So I like what you have done on organising the main selector

image

I think it needs to be documented - probably in this page

https://docs.civicrm.org/dev/en/latest/api/v4/architecture/

@eileenmcnaughton
Copy link
Contributor

This adds in - I think the 3 fields are confusing but that isn't new to this PR and I think it DOES make the non-smart group ness clear - should we also state non-parent groups there?

image

@eileenmcnaughton
Copy link
Contributor

@colemanw I have a couple of comments - I'm OK with this being merged & those things being addressed as follow ups - as long as they are

@eileenmcnaughton
Copy link
Contributor

Re docs - it might make more sense to add a new search kit section - the bridge entity and the primary secondary stuff need documenting - I did test that for existing entities without primary/secondary defined they defaulted to secondary. I didn't test the changes to bridge entities as these seemed to be only used in core and they still work in core - eg contributions with payments listing

image

@colemanw
Copy link
Member Author

Yes I thought "Secondary" was a good default, since extension authors won't necessarily think about it when they add a new entity.

@colemanw colemanw merged commit 94f5f09 into civicrm:master May 31, 2021
@colemanw colemanw deleted the groupContact branch May 31, 2021 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants