Skip to content

feat(express-search): add visual editor for express search#7976

Open
grantfitzsimmons wants to merge 35 commits intomainfrom
express
Open

feat(express-search): add visual editor for express search#7976
grantfitzsimmons wants to merge 35 commits intomainfrom
express

Conversation

@grantfitzsimmons
Copy link
Copy Markdown
Member

@grantfitzsimmons grantfitzsimmons commented Apr 14, 2026

Fixes #7973

This PR adds Express Search configuration support and visual editing for Configure Express Search in Specify 7.

The goal is to provide a managed Express Search config workflow instead of requiring raw XML authoring or filesystem overrides:

  • Add a backend API for loading and saving Express Search config.
  • Add a visual editor with search field selection, display field selection, related query activation, and result ordering.
  • Reconcile loaded config against schema metadata and user permissions.
  • Register Express Search Config as a first-class app resource in the App Resources editor.
  • Expose the config dialog from the Express Search page for authorized users.

Current

No Express Search configuration editor exists in the UI. Config is only available via raw XML files or manual app resource editing (which effectively means Specify 6 is the only editor).

This PR

Adds a configured UI dialog for Express Search config, including:

  • Search field and display field management per table.
  • Related query activation and ordering.
  • Result ordering control for tables and queries.
  • Save/apply behavior that serializes config back to XML.

Implementation

  • Added /express_search/config/ GET and PUT endpoints in the backend.
  • Implemented XML parsing/serialization for Express Search config, including searchtable, searchfield, displayfield, and relatedquery elements.
  • Reconciled existing config with current datamodel and table permissions to avoid exposing hidden or unauthorized fields.
  • Added ExpressSearchConfigDialog and ExpressSearchConfigEditor with three editor tabs:
    • Search fields
    • Related queries
    • Results ordering
  • Integrated the new editor into AppResources as expressSearchConfig and added localized labels.
  • Added access control so only users with resource permissions can open the configure dialog.
  • Added frontend and backend tests covering config loading, saving, and invalid payload handling.

Testing instructions

  • Open the Express Search page as a user with app resource read, edit, update permissions.
  • Click the configure button to open the Express Search config dialog (either on the front page or after searching using the express search button on the nav menu).
  • Verify the editor loads the current config (either at the user level or collection level) or loads it from the defaults.
  • Configure search fields and display fields for one or more tables.
  • Enable and disable related queries in the Related Tables tab.
  • Reorder tables and related queries in the Results Ordering tab.
  • Save the configuration and confirm the backend persists XML (check app resources).
  • Test both edited Express Search Config app resources at the collection level (with no user definition) and just a user definition
  • Confirm the saved config is reloaded correctly after closing and reopening the dialog.

@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Apr 14, 2026
@grantfitzsimmons grantfitzsimmons changed the title feat(schema-config): add express search config dialog and editor feat(schema-config): add visual editor for express search Apr 14, 2026
@grantfitzsimmons grantfitzsimmons changed the title feat(schema-config): add visual editor for express search feat(express-search): add visual editor for express search Apr 15, 2026
Triggered by 5d716f5 on branch refs/heads/express
Triggered by 9e92da8 on branch refs/heads/express
This handles cases where legacy XML files have related queries that do not exist in 7 + tests to make sure it works
Triggered by f7d343f on branch refs/heads/express
this will help people use it more effectively! links to docs on Speciforum as well.
Remembers if someone dismisses it so they don't have to see the instructions every search
Now it requires app resources read, create, and update. Maybe there is a better set of permissions?
@grantfitzsimmons grantfitzsimmons added this to the 7.12.2 milestone Apr 16, 2026
@grantfitzsimmons grantfitzsimmons marked this pull request as ready for review April 16, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

Express search fields should be configurable with a UI

1 participant