Skip to content

Conversation

@LHBruneton-C2C
Copy link
Collaborator

@LHBruneton-C2C LHBruneton-C2C commented Jan 27, 2026

Description

This PR is a minimal fix extract of #1433.

It simply adds missing open-on-select argument on search and results samples.

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Note: the CI can't compute the GN version matrix, because neither the Dathub app nor the Metadata-Editor app are affected. This is not a real issue.

How to test

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

Affected libs:

Affected apps:
webcomponents

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

@coveralls
Copy link

coveralls commented Jan 27, 2026

Coverage Status

coverage: 100.0% (+16.1%) from 83.854%
when pulling 6dfafd0 on wc-search-input-and-results-open-on-select
into bac81b4 on main.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

📷 Screenshots for webcomponents are here!

@LHBruneton-C2C LHBruneton-C2C requested a review from tkohr January 27, 2026 11:13
@LHBruneton-C2C
Copy link
Collaborator Author

Hello @maxcollombin,
Could you give a try to the branch in this PR, and tell me if you still have a wrong behavior when clicking on an autocomplete suggestion.
I'd be glad to know how you tested if that's the case, and maybe add some more e2e tests.

@maxcollombin
Copy link
Contributor

Hi @LHBruneton-C2C,

Unfortunately this doesn't completely fix the issue.

The tab key and the search icon aren't triggering the redirection in the gn-search-input-and-results.sample.html and gn-search-input-and-results-multilingual.sample.html examples.

@LHBruneton-C2C LHBruneton-C2C force-pushed the wc-search-input-and-results-open-on-select branch from 18ccb19 to 6dfafd0 Compare January 28, 2026 17:19
@LHBruneton-C2C
Copy link
Collaborator Author

The tab key and the search icon aren't triggering the redirection in the gn-search-input-and-results.sample.html and gn-search-input-and-results-multilingual.sample.html examples.

Did you mean the enter key?

There is not redirection on search in the examples you mentioned, only on suggestion select.

The open on search is configured in gn-search-input.sample.html and working on both enter and icon click.

@maxcollombin
Copy link
Contributor

Did you mean the enter key?

Yes, indeed, sorry. I went to fast on the comments and the tests (same for below).

There is not redirection on search in the examples you mentioned, only on suggestion select.

Shouldn't be added there too, following the same logic? (It may be necessary to remove open-on-search when addressing the PR #1458).

The open on search is configured in gn-search-input.sample.html and working on both enter and icon click.

That's correct.

@LHBruneton-C2C
Copy link
Collaborator Author

Shouldn't be added there too, following the same logic?

The two examples for "search" and "search and results" demonstrate two use cases for the webcomponents:

  • "search" is when you only use the search webcomponent, and not the results webcomponents; then it makes sense to "open-on-search" on a different page

This is used in the home portal of Géo2France for example:

image
  • "search and results" is when you use both webcomponents on the same page; then it doesn't make sense to leave the page, as the results are already displayed

Copy link
Collaborator

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @LHBruneton-C2C! Works as described!

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.

5 participants