-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Sandcastle search and filtering updates #12854
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
Draft
ggetz
wants to merge
5
commits into
sandcastle-v2
Choose a base branch
from
sandcastle-search-updates
base: sandcastle-v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thank you for the pull request, @ggetz! ✅ We can confirm we have a CLA on file for you. |
Thanks @ggetz this is looking pretty good! Definitely glad search is much better with the title/description. I didn't dig into the code yet but had a handful of small initial comments Style nit-picks
Functionality
Video of the slight 2 step lag/update when changing theme and filters: simplescreenrecorder-2025-08-29_13.23.21.mp4 |
52 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
sandcastle.config.js
file for managing gallery and search-related properties which may change more frequently than the source code, and could differ across different deployments.scripts/buildGallery.js
now:sandcastle.config.js
.list.json
directly to thepublic
folder, rather than relying on vite to copy later. This keeps source and output files separate, preventing unintentional overwrites.scripts/createGalleryRecord.js
, creates an in-memory HTML file for each gallery item that pagefind can use for indexing.tile
>>description
>>code
in terms of search relevance using thedata-pagefind-weight
attribute. Hierarchical labels like "Title", "Description", and "Labels" are ignored completed.data-pagefind-meta
lets us grab metadata properties.data-pagefind-filter
let's us grab the metadata used for filtering. Lastly,id
attributes are important to assign for enabling highlighting on the front end.mark
semantic element.--highlight-color-*
, including background color, border color, and text color; hover and pressed variations. Update--highlight-color-*
variables insrc/App.css
to tweak the highlight colors.src/utils/loadFromUrl.js
is now in it's own file—It loads per the the url param as before, but now throws errors if requested content can not be found. Errors are handled and routed to in-app console to make it obvious to the user.src/Gallery
directory:src/Gallery/GalleryItemStore.ts
creates a shared context for use across gallery components.src/Gallery/GalleryItemList.ts
andsrc/Gallery/GalleryItemCard.ts
manages the filtered list of gallery items, implementing the ariakitComposite*
abstract components.src/Gallery/GalleryItemSearchInput.tsx
handles the search term query input. The pagefind search is performant enough that, IMO, it does not require the debounce, so I left it out for the sake of simplicity. Let me know if there are strong opinions on this.src/Gallery/GalleryItemSearchFilter.tsx
handles filtering by labels with theDropdownMenu
component so we can show the pagefind total results per-category..d.ts
files moved moved to@types
directory that is specified in the typescript config as a types root.Issue number and link
N/A
Testing plan
Author checklist
CONTRIBUTORS.md
I have updatedCHANGES.md
with a short summary of my changeI have added or updated unit tests to ensure consistent code coverageI have updated the inline documentation, and included code examples where relevant