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

Filtering a listing numerically fails non-deterministically #4606

Closed
4 tasks done
MattF-NSIDC opened this issue Mar 2, 2023 · 3 comments
Closed
4 tasks done

Filtering a listing numerically fails non-deterministically #4606

MattF-NSIDC opened this issue Mar 2, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@MattF-NSIDC
Copy link

MattF-NSIDC commented Mar 2, 2023

Bug description

Reproducing

To set up for reproduction quickly, clone this repo and follow the instructions in "Repro steps" below:

https://github.com/MattF-NSIDC/sscce-quarto-listing-issue

Setup steps

  1. Create the project
    quarto create-project demo-filter-issue --type=website
    
  2. Change the index.qmd to a "table"-type listing
    ---
    title: "demo-filter-issue"
    listing: "table"
    ---
    
  3. Create an items/ dir and populate with 4 markdown files with numbered titles, e.g. # Item #1: Foo, # Item #2: Bar, etc.
  4. Remove about.qmd

Repro steps

  1. quarto preview
  2. In your browser on the index page, try filtering the listing for 1, 2, 3, and 4 separately.
  3. At least one of these filter attempts will not actually cause any filtering. If this doesn't happen, delete .quarto and _site directories and start over. Each time, the behavior should be different. E.g. the first time filtering for 1 may be ineffective, and next time filtering for 4 may be ineffective, and the next time both 1 and 2 will not be filterable.

Repro screenshot sample

Because this issue is non-deterministic, each run of quarto preview will behave differently. Therefore, the issue won't reproduce exactly the same as these screenshots.

  • Filtering for 2 is effective

image

  • Filtering for 3 is ineffective

image

Versions tested

  • Quarto 1.3.241, 1.3.217, 1.2.335
  • Ubuntu 20
  • No IDE

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
@MattF-NSIDC MattF-NSIDC added the bug Something isn't working label Mar 2, 2023
@MattF-NSIDC
Copy link
Author

MattF-NSIDC commented Mar 2, 2023

Additional observations:

  • Filtering for # always returns no results.
  • Only numeric searches are affected in this non-deterministic way. E.g. if filtering for 2 is ineffective, filtering for bar will be effective.

@dragonstyle
Copy link
Collaborator

Great one! I've found the underlying issue which seems to only affect table style listings (at least the number indeterminate behavior). It should be fixed in our next pre-release build (7d221f4).

Currently, it appears search/filter doesn't support elements like # - there is open issue in the parent repo here:

javve/list.js#699

Thanks for reporting this- was fun to track down!

@MattF-NSIDC
Copy link
Author

the href would often contain port numbers, making the behavior appear random.

That behavior makes so much sense now 😆

Nice find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants