Unified filter standard for listing and answer-browsing views
Use one filter vocabulary, one set of defaults, one reset action, and one URL encoding rule on every list a reader can browse. A shared link restores the same list, Clear does the same thing on every page, and device-only data is never mistaken for a public filter.
Comparison of filter sets, defaults, and persistence in this pack
Read this table before changing any facet. Each row states a surface documented in this pack, what it filters today, where the state lives, and the inconsistency this standard closes. No row adds a new permission or a new workspace record.
| Surface | Filter set today | Defaults and persistence today | Reset and URL state today | Inconsistency to close |
|---|---|---|---|---|
| Guides index | Search words q plus role, stage, and topic facets over guide cards only, by title, description, and link text | All roles, stages, and topics, with empty q. Search words kept in the page address as q | Clear filters removes q and restores the full card list. Empty state is No guides match those filters, with up to three suggested guides as plain links outside the empty state | Closest to the standard. Its facet names and Clear filters label are kept as the canonical form |
| Terminology page | Search words only, over entries on that page. No role, stage, or topic facet | Empty q shows all entries. Word start matches at any length, unlike the guides index minimum of two letters | Clear search restores the full list. Empty title is No entries match that wording | Same q word means different matching, and the reset label differs from Clear filters, with no scope label stating entries only |
| My Answers on this device | Search words plus collection and sort, over answers saved in this browser only, by title, question, answer, and source title | Unfiled collection and saved order. Saved items persist in localStorage under campus-answers:my-answers:v1 on this device only. Matching is plain substring with no fuzzy match and no synonym list | Clearing the search restores saved items on this device. No filter state is written to the page address | A shared link cannot restore the list, and device persistence looks like URL persistence. Word matching differs from both public filters |
| Weekly quality rate search on this page | Search words over a short list of public guide titles only. No facet | Empty search records nothing. The search is kept in the page address fragment | Clear search empties the field and removes the fragment. A checked search writes q as #q= in the hash, while Search scope requires q in the query string | The same q is encoded in the hash here and in the query string on the guides index, so one link format does not restore both, and a hash value can be confused with the #share= and #rf= tool payloads |
| Role first-run checklist | College name plus role, over checklist steps for one role for one college. This is progress state, not a listing facet | Student role with an empty college name. Progress persists in localStorage keyed by college and role, and a copy link carries #rf=college:role:steps | Clear saved progress removes only that college and role key. Mark setup complete and Dismiss for now hide the panel for seven days or until reopened | Progress state must not be read as a public filter. It stays device-only, labeled as such, and is never merged with q or facet parameters |
| Work unanswered questions queue and Reports scope | Assistant, theme, and owner office in the queue. College workspace, assistant, channel, and date range as scope filters in Reports | One college workspace at a time, with test and staff preview sessions labeled as test and excluded from counts. Definitions live in the signed-in app, not in a public URL | No public URL encoding is defined for these scope filters in this pack. The list behind a number opens with the same scope filters applied | Scope filters are described with the same words as public facets but have no shared names, defaults, or reset rule, so a count can be read without its scope |
Tool payloads such as the share link on Share an answer, #share=, and the canonical eligibility record on Mark an answer as checked are not filters. They stay in the hash, carry their own payload, and are never parsed as q or as a facet.
The unified filter standard
Apply every rule below on every listing and answer-browsing view, public and signed-in. A view that cannot meet a rule changes in the same release that adds it.
Rule 1: One facet vocabulary with fixed parameter names
Use only these parameter names, spelled exactly as shown. q means search words. role, stage, and topic are the public guide facets. collection and sort are the My Answers facets. assistant, channel, from, and to are scope filters for a signed-in list. workspace is signed-in only and is never a public parameter. Do not add a synonym parameter for the same facet, and do not reuse a name for a different facet on another page.
Rule 2: Defaults are the empty state, and defaults stay out of the URL
The default for q is empty. The default for every facet is all, meaning no facet value is selected. The default sort is the saved or published order stated on the page. A parameter at its default is omitted from the URL, so the bare page address always means the full list. A non-default value is always present in the URL, so a copied link restores the filtered list.
Rule 3: One reset action on every list, called Clear filters
Every list shows one primary reset action labeled Clear filters, placed after the count status. Clear filters removes q and every facet parameter, restores every default, removes q from the page address, restores the full list, moves focus to the search field, and shows a count of the full list. Clear search is retired as a label. Clearing device data, such as saved answers or checklist progress, is a separate labeled action and is never the same control as Clear filters.
Rule 4: One URL encoding for filter state, using the query string
Encode filter state as ?q= plus facet parameters, built with URLSearchParams so spaces, punctuation, and accented letters are encoded once. While a person types, update the address with replaceState after a 120 millisecond pause, with no new history entry per keystroke. On an explicit apply, such as Check search or a sort change, write one history entry with pushState. Back and Forward restore the facets and the result count from the address without recording a new outcome. The hash is reserved for in-page anchors and for tool payloads such as #share= and #rf=. A legacy #q= link is read once on load, its value is moved to ?q=, and the hash is removed, so old links keep working and new links use one format.
Rule 5: One matching rule for q on every public list
Every typed word must match. A word matches when it is exact, when it starts a word of two letters or more, when it appears inside a word of three letters or more, or when it is one letter off a word of four letters or more. A single letter matches nothing. Either publish one synonym list and use it on every public list, or use no synonyms on any public list, and state the rule in the search hint. My Answers either adopts the same rule or states plainly in its hint that it searches saved titles, questions, answers, and source titles on this device only, with the rule it actually uses.
Rule 6: Persistence has exactly two homes, and each is labeled
Public and signed-in filter state persists only in the page address. Device-owned data persists only in localStorage under its own versioned key, labeled on screen as saved on this device, and never written to the address. Checklist progress, saved answers, and stored campaign values are device data. A Clear filters action never deletes device data, and a device data action never changes the address. Session-only mode keeps no device data after the session ends, and the screen states that rule instead of claiming a filter was saved.
Rule 7: Count, empty state, and scope stay visible together
Show Showing X of Y beside the list, with Y the full list under the current scope. Keep the page heading and every facet control visible when the list is empty. Show one empty state per list, with an icon, one title naming the empty list, one line naming the filter that caused it, and the single primary Clear filters action. Keep suggested entries as plain links outside the empty state, never counted as results. State the scope label beside the search field, word for word, as listed in Search scope, so a reader knows the corpus before typing.
Rule 8: Keyboard, touch, and focus behavior do not change by page
Every control is at least 44 pixels high, focus stays visible by keyboard, and focus returns to the search field after Clear filters and after an empty state appears. The icon stacks above the text on a phone. A role that cannot view a signed-in list sees the role that can do the step and a link to the guide, never a facet control that does nothing, and the server checks permission again on every request.
Parameter table to copy onto every list
Copy this table into the build record for each list. A parameter not in this table is not a filter.
| Parameter | Use | Values | Default, omitted from the URL |
|---|---|---|---|
| q | Search words on any public or device list | Free text, encoded with URLSearchParams | Empty, omitted |
| role | Guides index facet, discovery only. It does not grant access in the app | One role value from the guide cards, or all | All, omitted |
| stage | Guides index facet | One stage value from the guide cards, or all | All, omitted |
| topic | Guides index facet | One topic value from the guide cards, or all | All, omitted |
| collection | My Answers facet over saved answers on this device | One collection name, or Unfiled, or all | All, omitted. Unfiled is a value, not a default |
| sort | Saved answers and queue lists | The sort values stated on the page, such as newest saved or most recently opened | The stated default sort, omitted |
| assistant | Signed-in scope filter for queues and reports only | One published assistant in this college workspace, or all | All, omitted |
| channel | Signed-in scope filter for reports only | One channel value stated in Reports, or all | All, omitted |
| from and to | Date range scope filter for reports and queues, in college local time | ISO dates in YYYY-MM-DD form | The stated range, omitted when a range is not set |
- Public lists use q, role, stage, and topic only. Public search returns no question text, no saved item, and no workspace source record.
- Signed-in lists add assistant, channel, from, and to inside one college workspace at a time. System view shows counts grouped by college only, with no question text.
- Every parameter value is trimmed, is at most 120 characters for q, and is validated against the stated values on the server. An unknown value is dropped and the full list is shown.
Checks before you ship a filter change
Run each check on a phone and on a desktop with keyboard and screen reader before you publish.
- Copy the address of a filtered list, open it in a new tab, and confirm the same list, the same count, and the same facets are restored, with no device data required
- Open a legacy link with #q= and confirm the search word appears in the field, the address now shows ?q=, and the hash is gone
- Choose Clear filters on the guides index, on terminology, and on My Answers, and confirm each page restores its full list, removes q from the address, shows the full count, and moves focus to the search field
- Clear device data and confirm the address and the filter state do not change, then choose Clear filters and confirm the device data still exists
- Type a single letter and confirm no result on every public list, then type the same two words on every public list and confirm the matching rule behaves the same way
- Press Back and Forward through a typed search and confirm the facets and the count are restored with no new outcome recorded
- Confirm an empty list keeps the heading and facets visible, shows one empty state with one Clear filters action, and keeps suggested entries outside the count
- Confirm a signed-in list stays in one college, a person in another college cannot open a result, and test sessions are labeled as test and excluded from counts
Follow Search scope for corpus labels and permission-aware results, Search indexing gaps for the surface inventory, Unified form layout for field order and the primary action, and Work unanswered questions for queue scope filters.
Next guide
Keep empty states consistent wherever a list can be empty.