Skip to content

feat(docs): Add filtering capability#395

Merged
nsdeschenes merged 15 commits into
mainfrom
nd/feat-docs-add-filtering-capability
May 22, 2026
Merged

feat(docs): Add filtering capability#395
nsdeschenes merged 15 commits into
mainfrom
nd/feat-docs-add-filtering-capability

Conversation

@nsdeschenes
Copy link
Copy Markdown
Contributor

@nsdeschenes nsdeschenes commented May 20, 2026

Description

This PR adds in some selects to filter out attributes based off of different key fields that appear on attributes. You are also able to mix and match these filters to narrow down attributes even further.

These changes were done up by Codex and myself, everything seems to be working a-okay, but I'm not the best at Svelte 🫣

@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@cursor review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (docs) Add filtering capability by nsdeschenes in #395

🤖 This preview updates automatically when you update the PR.

Comment thread docs/src/components/AttributeFilters.svelte
Comment thread docs/src/components/AttributeFilters.svelte
@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@cursor review

Comment thread docs/src/components/AttributeFilters.svelte
Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice! I gave the PR a try and filtering seems to work quite well. I think this is a pretty interesting approach because we render the entire list of attributes to static HTML and manually hide the ones not matching the filter criterion. A consequence of Astro being static-first and the filter component itself being the dynamic island. I think this is reasonable though. If we ever run into performance problems, we can convert the entire attributes list to be rendered as a svelte component but I don't think it's necessary to change this now. The Svelte component itself looks good to me!

Had a couple of nits and one visual request:

Image

can we show "x/N attributes" instead of "N Attributes" on these labels?

Comment thread docs/src/components/AttributeFilters.svelte Outdated
Comment thread docs/src/components/AttributeFilters.svelte Outdated
@nsdeschenes nsdeschenes marked this pull request as ready for review May 21, 2026 10:30
@nsdeschenes nsdeschenes requested review from a team, cleptric and mjq as code owners May 21, 2026 10:30
@nsdeschenes
Copy link
Copy Markdown
Contributor Author

Nice! I gave the PR a try and filtering seems to work quite well. I think this is a pretty interesting approach because we render the entire list of attributes to static HTML and manually hide the ones not matching the filter criterion. A consequence of Astro being static-first and the filter component itself being the dynamic island. I think this is reasonable though. If we ever run into performance problems, we can convert the entire attributes list to be rendered as a svelte component but I don't think it's necessary to change this now. The Svelte component itself looks good to me!

Had a couple of nits and one visual request:

Image can we show "x/N attributes" instead of "N Attributes" on these labels?

All feedback addressed, and added in that change for categories, though it will only show when we're rending the entire list. If a user has a selected category we leave it blank.

Comment thread docs/src/components/AttributeFilters.svelte
Comment thread docs/src/components/SearchModal.svelte Outdated
@nsdeschenes nsdeschenes requested a review from Lms24 May 21, 2026 11:00
Comment thread docs/src/components/AttributeFilters.svelte
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 13756e7. Configure here.

Comment thread docs/src/components/AttributeFilters.svelte Outdated
Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice, thanks for making the changes! I think the failing CI job comes from formatting. Might need to run yarn format again. 🚀

nsdeschenes and others added 14 commits May 22, 2026 07:13
Reuse formatAttributeCount and add formatCategoryCount so counts of 1 read correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Search only needs key, brief, type, category, url, and deprecated; PII, visibility, and OTel filtering live on the attribute pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
Deep links to default-hidden cards stayed invisible after filter hydration; also open collapsed deprecated sections and re-scroll on hash change.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nsdeschenes nsdeschenes force-pushed the nd/feat-docs-add-filtering-capability branch from 088a703 to 8247f26 Compare May 22, 2026 10:14
@nsdeschenes nsdeschenes merged commit 6ff072d into main May 22, 2026
15 checks passed
@nsdeschenes nsdeschenes deleted the nd/feat-docs-add-filtering-capability branch May 22, 2026 10:18
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.

2 participants