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

APIv4 - Make the @searchable flag explicit for OptionList type entities. #20560

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jun 8, 2021

Overview

Improves code for categorizing entities for SearchKit, making searchability easier to grok and less magical/mysterious.

Comments

When I was first trying to figure out how to categorize entities in SearchKit I came up with this "OptionList" type, which seemed like a good idea at the time. But then I later developed the @searchable flag which works much better.
The OptionList trait may or may not be useful in future, maybe we'll just get rid of it if not.
But I think it's better not to couple it with the @searchable flag, as that's not exactly the same thing.

@civibot
Copy link

civibot bot commented Jun 8, 2021

(Standard links)

@civibot civibot bot added the master label Jun 8, 2021
@eileenmcnaughton
Copy link
Contributor

@colemanw so are fields like 'MembershipType.minimum_amount' still accessible with this change?

@colemanw
Copy link
Member Author

colemanw commented Jun 8, 2021

@eileenmcnaughton this doesn't change any functionality, just the structure of the code.

@eileenmcnaughton
Copy link
Contributor

@colemanw per discussion I think we should expose many of these in search kit now we have the to-be-documented 'secondary' notification

The OptionList trait may or may not be useful in future, maybe we'll just get rid of it if not.
But I think it's better not to couple it with the @searchable flag, as that's not exactly the same thing.
@colemanw
Copy link
Member Author

colemanw commented Jun 9, 2021

@eileenmcnaughton it's updated now

@eileenmcnaughton
Copy link
Contributor

OK - so the entities marked as secondary were not available before but now they are in the 'long list'

I think that's a good thing as they all have fields you might want to display & the main reason we didn't before was the UI

@colemanw
Copy link
Member Author

colemanw commented Jun 9, 2021

Yep

@eileenmcnaughton eileenmcnaughton merged commit b4271e2 into civicrm:master Jun 9, 2021
@eileenmcnaughton eileenmcnaughton deleted the searchable branch June 9, 2021 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants