GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [doc] Search improvements by adangel · Pull Request #6073 · pmd/pmd

Conversation

@adangel

@adangel adangel commented Sep 18, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Describe the PR

Improves the integrated search in the documentation:

  • displays the results in a more readable way
  • allow to use simple keyboard shortcuts: press "s" to focus the search field, use arrow up/down to navigate the results
  • display the rule descriptions in the search results
  • as our rule names are using PascalCase, I split these into single words so that rules can be found by part of their name.
  • display 20 results and make it scrollable
  • disable fuzzy search. without it more understandable results are returned.

Old:
image

New:
image

Related issues

  • Fix #

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adangel adangel added this to the 7.18.0 milestone Sep 18, 2025
@adangel adangel added the in:documentation Affects the documentation [doc] label Sep 18, 2025
@pmd-actions-helper

pmd-actions-helper Bot commented Sep 18, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Documentation Preview

No regression tested rules have been changed.

(comment created at 2025-10-24 12:59:21+00:00 for 8b0adeb)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zbynek

zbynek commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

The new layout is nice!

Two (Chrome/Windows specific?) issues: when search is not active, there is an empty search box:
image
When it is active, there are both vertical and horizontal scrollbars, even if they are not needed. Would it make sense to have just overflow-y: auto to fix both of these isues?

For renamed rules this gives the same description for both the new and the deprecated one -- it might be useful to replace the description of deprecated rules with just the word "Deprecated.".

Suggestion for the future: Simple Jekyll Search has a new maintainer and the new version seems to have some useful features (e.g. ignores word order, unless quotes are used) https://github.com/neilboyd/Simple-Jekyll-Search .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adangel
adangel force-pushed the doc/search-improvements branch from 89f8936 to 4c3019d Compare September 19, 2025 15:25
@adangel

adangel commented Sep 19, 2025

Copy link
Copy Markdown
Member Author

The new layout is nice!

Thanks!

Two (Chrome/Windows specific?) issues: when search is not active, there is an empty search box: When it is active, there are both vertical and horizontal scrollbars, even if they are not needed. Would it make sense to have just overflow-y: auto to fix both of these isues?

Yes, I thought/wanted to use "auto". I'm using Firefox, which seems to be different in this regards doesn't force scrollbars. Anyway, using overflow-y: auto now...

For renamed rules this gives the same description for both the new and the deprecated one -- it might be useful to replace the description of deprecated rules with just the word "Deprecated.".

Good idea, I've added this. We might need to experiment a little bit with the presentation, but it's better now.

Suggestion for the future: Simple Jekyll Search has a new maintainer and the new version seems to have some useful features (e.g. ignores word order, unless quotes are used) https://github.com/neilboyd/Simple-Jekyll-Search .

Thanks for the hint - yes. At some point, we should update...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

zbynek
zbynek approved these changes Sep 19, 2025
View reviewed changes

@zbynek zbynek left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Scrollbar issues are fixed now.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
adangel added 11 commits October 24, 2025 14:14
@adangel
[doc] Improve search index
db1cc73
- split rule names
- disable fuzzy search
- correctly escape search index
- remove unused news.html and news_archive.html
@adangel
[doc] Improve search UI
1e5c40a
- display title and summary
- navigation with arrow keys up/down
- keyboard shortcut "s" for search
- display 20 search results with scrolling
@adangel
[doc] Improve search UI
9185483
- close search results when clicking somewhere
@adangel
[doc] Display rule descriptions in search
59cc684
- extracts rule descriptions into frontmatter
- use rule descriptions as summary for search result
- remove exclude configuration from search
  as it is not excluding data from search.json by key,
  but by regexing the content...
- remove escape_regex again
@adangel
[doc] search: Only show scrollbars when needed in results-container
fb72c09
@adangel
[doc] For deprecated rules, provide deprecation notice in search result
3e61127
@adangel
[doc] search: avoid losing focus while searching
f329ab3
@adangel
[doc] search: refactor to not use jquery anymore
f614ba1
@adangel
[doc] search: Update Simple Jekyll Search from 1.0.8 to 1.14.0
48cbabd
@adangel
[doc] Make search working in local mode
8f8120f
Move search index into an own js file, that is loaded via
<script> and not fetched. This allows to open the documentation
locally in a browser and still use the search functionality.
Otherwise, you'd need to run a local webserver.
@adangel
[doc] Update release notes (pmd#6073)
f111bb2
@adangel
adangel force-pushed the doc/search-improvements branch from 4c221c3 to f111bb2 Compare October 24, 2025 12:19
@adangel
[doc] Use emoji variant
8b0adeb
@adangel
adangel merged commit aa3901b into pmd:main Oct 24, 2025
@adangel
adangel deleted the doc/search-improvements branch October 24, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zbynek zbynek zbynek approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

in:documentation Affects the documentation [doc]

Projects

None yet

Milestone

7.18.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@adangel @zbynek
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.