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

Search Builder - Enhance UI with Select2 and EntityRef #19471

Merged
merged 1 commit into from
Jan 31, 2021

Conversation

colemanw
Copy link
Member

Overview

Improves the UI of Search Builder (the classic one in core, not the new Search Kit extension) by using Select2 dropdowns for selecting options & autocompleting contacts, events, etc instead of needing to enter numeric ids.

Before

image

After

image

Technical Details

The After screenshot includes PR #19463 to demonstrate that this fixes the issue caused in that other PR. Note that this PR does not require that one.

Comments

This change was motivated by #19463, in which removing Campaign pseudoconstants broke the Campagn select list in Search Builder.

@civibot
Copy link

civibot bot commented Jan 30, 2021

(Standard links)

@demeritcowboy
Copy link
Contributor

I think it's an improvement except that for Contact - ContactID it lets you enter an id same as before, but for example Case - CaseID or Participant - ContactID, it's now a dropdown list with names which doesn't seem right.

Also there's a pre-existing issue for contributions - will make a ticket.

This changes the simple select fields to use Select2
and the plain text inputs for e.g. participant_contact_id will now present a searchable dropdown for selecting a contact.
@colemanw colemanw force-pushed the searchBuilderSelect2 branch from 5e56a2e to c26543a Compare January 31, 2021 00:38
@colemanw
Copy link
Member Author

@demeritcowboy thanks for the review. I've updated the code to not render an entityRef for an entity's own ID field.

@demeritcowboy
Copy link
Contributor

jenkins retest this please

@demeritcowboy
Copy link
Contributor

Looks good.

@seamuslee001
Copy link
Contributor

I'm going to merge this based on @demeritcowboy 's testing

@seamuslee001 seamuslee001 merged commit f5a6f95 into civicrm:master Jan 31, 2021
@seamuslee001 seamuslee001 deleted the searchBuilderSelect2 branch January 31, 2021 20:39
@colemanw
Copy link
Member Author

Thanks @demeritcowboy !

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.

3 participants