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

Use qs web component #1895

Merged
merged 2 commits into from
Apr 8, 2024
Merged

Use qs web component #1895

merged 2 commits into from
Apr 8, 2024

Conversation

ia3andy
Copy link
Contributor

@ia3andy ia3andy commented Feb 21, 2024

This is a draft until I come back from PTOs

It mostly need CSS cleaning to be ready..

The search service needs to be started locally, and it might require some change in the Chrome config to allow cors on localhost.

@ia3andy
Copy link
Contributor Author

ia3andy commented Feb 21, 2024

This needs: quarkusio/search.quarkus.io#58

Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

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

Thanks. I added a few comments below.

_config.yml Outdated Show resolved Hide resolved
_config.yml Show resolved Hide resolved
_includes/index-doc-item.html Outdated Show resolved Hide resolved
_includes/index-docs.html Outdated Show resolved Hide resolved
_plugins/copy-search-wc.rb Outdated Show resolved Hide resolved
@ia3andy ia3andy force-pushed the wc branch 17 times, most recently from ef1b72e to 632949d Compare April 5, 2024 15:36
@ia3andy ia3andy marked this pull request as ready for review April 5, 2024 15:49
Copy link

github-actions bot commented Apr 5, 2024

🙈 The PR is closed and the preview is expired.

@gsmet
Copy link
Member

gsmet commented Apr 5, 2024

I rebased to fix a conflict and the preview should work.

@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 6, 2024

Ok it works and can be tested in the preview 🥳
cc @marko-bekhta @yrodiere

@yrodiere
Copy link
Member

yrodiere commented Apr 6, 2024

Thanks Andy.

I noticed a few things:

  1. The ellipses ("...") seem to be gone in the excerpts from the content:
    image
    image
  2. Selecting version "3.8" or earlier leads to a 404... but maybe that's just a limitation of the preview? Regardless, I wasn't able to test the "old" guide list.
  3. If you go to https://quarkus-site-pr-1895-preview.surge.sh/guides/ , then select version "Main - Snapshot", then click "back" to go to the previous page in your browser... the list displays a search, for some reason, instead of just the default display by guide type (tutorial/etc.). The value of the drop-down also doesn't get reverted, but that seems to be a pre-existing bug. The first problem isn't, though.
    image
  4. Calls to the search backend appear to be twice as numerous as before: first an OPTIONS call, then a GET call. And that's not just the first call either, but every single call. Is that on purpose? The existing version only does a GET call.
    Note that we sometimes have serious latency problems on this cluster, so doubling the number of calls could have dramatic impact...
    image

@marko-bekhta
Copy link
Contributor

One more thing 🙈 if a user tries to search for something and then deletes the search text a never-ending-spinner is displayed:
image

@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 7, 2024

@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 7, 2024

@marko-bekhta good catch, I never experienced it because there is no latency locally :)

@yrodiere
Copy link
Member

yrodiere commented Apr 8, 2024

@yrodiere https://stackoverflow.com/questions/29954037/why-is-an-options-request-sent-and-can-i-disable-it

Thanks, but we didn't experience that before, so surely there's been a change that triggers it. Is that change worth doubling the latency?

@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 8, 2024

Ok this should fix most of the issues you experienced:
https://github.com/quarkusio/search.quarkus.io/pull/222/files

@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 8, 2024

For the ..., I think it should be done by the api instead if that's possible?

@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 8, 2024

@yrodiere @marko-bekhta could you give it a new try, and if it's good we can merge :)

@yrodiere
Copy link
Member

yrodiere commented Apr 8, 2024

The ellipses ("...") seem to be gone in the excerpts from the content:

Will be fixed in quarkusio/search.quarkus.io#223 , thanks @marko-bekhta .

If you go to https://quarkus-site-pr-1895-preview.surge.sh/guides/ , then select version "Main - Snapshot", then click "back" to go to the previous page in your browser... the list displays a search, for some reason, instead of just the default display by guide type (tutorial/etc.). The value of the drop-down also doesn't get reverted, but that seems to be a pre-existing bug. The first problem isn't, though.

Still the same problem:
Screencast from 2024-04-08 15-23-22.webm

Selecting version "3.8" or earlier leads to a 404... but maybe that's just a limitation of the preview? Regardless, I wasn't able to test the "old" guide list.

Still the same problem -- is this just a limitation of the preview? Did you test "old" guide lists locally, e.g. the one for 2.7?

Calls to the search backend appear to be twice as numerous as before: first an OPTIONS call, then a GET call

Fixed, thanks.

@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 8, 2024

The ellipses ("...") seem to be gone in the excerpts from the content:

Will be fixed in quarkusio/search.quarkus.io#223 , thanks @marko-bekhta .

🙏

If you go to https://quarkus-site-pr-1895-preview.surge.sh/guides/ , then select version "Main - Snapshot", then click "back" to go to the previous page in your browser... the list displays a search, for some reason, instead of just the default display by guide type (tutorial/etc.). The value of the drop-down also doesn't get reverted, but that seems to be a pre-existing bug. The first problem isn't, though.

Still the same problem: Screencast from 2024-04-08 15-23-22.webm

I can't reproduce this issue because I suspect it's a latency issue. I have a good idea of why: the search form detects the change which starts a search, and then loads the page. I have a fix and I created a PR for it on search.quarkus.io

Selecting version "3.8" or earlier leads to a 404... but maybe that's just a limitation of the preview? Regardless, I wasn't able to test the "old" guide list.

Yes I tested it locally and it works fine

Still the same problem -- is this just a limitation of the preview? Did you test "old" guide lists locally, e.g. the one for 2.7?

Calls to the search backend appear to be twice as numerous as before: first an OPTIONS call, then a GET call

Fixed, thanks.

yeahh!

@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 8, 2024

@yrodiere so when the latest PR is in prod, we can merge this right?

@yrodiere
Copy link
Member

yrodiere commented Apr 8, 2024

If you go to https://quarkus-site-pr-1895-preview.surge.sh/guides/ , then select version "Main - Snapshot", then click "back" to go to the previous page in your browser... the list displays a search, for some reason, instead of just the default display by guide type (tutorial/etc.). The value of the drop-down also doesn't get reverted, but that seems to be a pre-existing bug. The first problem isn't, though.

Still the same problem: Screencast from 2024-04-08 15-23-22.webm

I can't reproduce this issue because I suspect it's a latency issue. I have a good idea of why: the search form detects the change which starts a search, and then loads the page. I have a fix and I created a PR for it on search.quarkus.io

Seems to work now, thanks

@yrodiere
Copy link
Member

yrodiere commented Apr 8, 2024

LGTM thanks; feel free to merge whenever you have time to handle the possible consequences :)

@ia3andy ia3andy merged commit a19ce0b into quarkusio:develop Apr 8, 2024
1 check passed
@ia3andy ia3andy deleted the wc branch April 8, 2024 15:54
@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 8, 2024

🤞

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.

4 participants