Skip to content

[codex] Sync category filters with URL and prioritize favorites#151

Open
onewesong wants to merge 2 commits into
chicogong:masterfrom
onewesong:codex/category-url-favorites-sync
Open

[codex] Sync category filters with URL and prioritize favorites#151
onewesong wants to merge 2 commits into
chicogong:masterfrom
onewesong:codex/category-url-favorites-sync

Conversation

@onewesong

Copy link
Copy Markdown

Summary

  • sync homepage category filter state into the URL via ?category=...
  • restore category state from query/hash URLs and browser history
  • render favorited tools before non-favorites, including filtered search results

Validation

  • npm test
  • node --check assets/js/main.js

Implement category selection via URL query parameters and hash, allowing users to share or bookmark specific category views. Added functions to read and update URL state, and handle browser navigation with popstate events.
Implement sorting logic to display favorite tools first in the tool list, maintaining original order for non-favorites. Updated rendering functions to use a precomputed order array and adjusted search filtering to respect favorite status.
@vercel

vercel Bot commented Apr 27, 2026

Copy link
Copy Markdown

@onewesong is attempting to deploy a commit to the chico-projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify

netlify Bot commented Apr 27, 2026

Copy link
Copy Markdown

Deploy Preview for localtools ready!

Name Link
🔨 Latest commit 143c395
🔍 Latest deploy log https://app.netlify.com/projects/localtools/deploys/69ef4ff380c1c70008dd324c
😎 Deploy Preview https://deploy-preview-151--localtools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@onewesong onewesong marked this pull request as ready for review April 27, 2026 12:01
@onewesong

Copy link
Copy Markdown
Author

不错的工具集,但有两个小问题我优化了下
一是返回的时候会直接返回到未筛选的状态(比如选了图片分类,进入后再返回又到了未筛选的类别)
二是收藏多了工具还是不好找,现在 收藏会显示在分类的置顶
image

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.

1 participant