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

feat(@dpc-sdp/ripple-tide-search): allow multiple result items types #1200

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

lambry
Copy link
Contributor

@lambry lambry commented Jun 3, 2024

What I did

  • Add support for multiple result item types, the search listing API/JSON looks like this would be supported, plus why not support it.

As an example say you wanted something like a News & Events listing, the example config below is now supported.

"resultsConfig": {
    "layout": {
      "component": "TideSearchResultsList"
    },
    "item": {
      "news": {
        "component": "TideNewsSearchResult"
      },
      "event": {
        "component": "TideEventSearchResult"
      }
    }
  }

Checklist

For all PR's

  • I've added relevant changes to the project Readme if needed.
  • I've updated the documentation site as needed.
  • I have added cypress tests to cover my changes (if not applicable, please state why in a comment)

For new components only

  • I have added a story covering all variants
  • I have checked a11y tab in storybook passes
  • Any events are emitted on the event bus

@lambry lambry self-assigned this Jun 3, 2024
Copy link

netlify bot commented Jun 3, 2024

Deploy Preview for ripple-docs canceled.

Name Link
🔨 Latest commit ae054e8
🔍 Latest deploy log https://app.netlify.com/sites/ripple-docs/deploys/665d3aebdb2cba000853aa3a

@dylankelly
Copy link
Contributor

Might be useful to discuss whether we could support different results based upon other properties instead of content type. For example, what about data pipelines that include different results based upon arbitrary fields? What if we had a way to pass a function to determine what result type to use?

@dylankelly dylankelly enabled auto-merge June 3, 2024 23:59
@dylankelly dylankelly added this pull request to the merge queue Jun 3, 2024
Merged via the queue into develop with commit bba7667 Jun 4, 2024
8 checks passed
@dylankelly dylankelly deleted the feature/multiple-result-component-support branch June 4, 2024 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants