Repository navigation
fix: Send the name of the default filter sort option - #41
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe filter now uses a stable name for its default sort option and uses an option’s text content as the fallback sort value when no name is set. Tests cover the sort values passed to ChangesFilter sort values
Bin subproject reference
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The filter now sends a stable "default" sort value and uses an option's plain text, not its markup, when no name is set. This prevents translated markup from breaking list loading. The bundled binaries already include the fix. No merge-blocking risk remains. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change stabilizes sorting without showing a new security boundary or privilege expansion. Verification remains incomplete for the published browser files and server-side handling. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
- The default sort option now has a name, sent whatever its contents - Options without a name fall back to their text, never to their markup - Pages translated by the browser no longer send markup as the sort value - Tests cover the default, translated, named and unnamed sort options
81ecd60 to
43cfa2b
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closes #40, the server side being hivesolutions/colony-plugins#48, with the binaries in hivesolutions/uxf-bin#10.
Description
The filter adds a default sort option without a
data-name(js/ui/filter.part.js), and the sort value of the query falls back to the HTML of the selected option when it has nodata-name. When the browser translates the page (eg: Chrome page translation) the text of the option is wrapped in<font>elements, so the filter sends the translated markup as the sort value instead ofdefault(seen in production in OMNI-LDJ-15,<font dir="auto" style="vertical-align: inherit;">...</font>:descending), which the server fails to handle.Changes
uxfilter(js/ui/filter.part.js): the default sort option hasdata-name="default", so that its name is sent whatever its contents, and the options without adata-namefall back to their text instead of their HTML.test/ui/filter.js, with 6 tests.binupdated to 9be03c81 of chore: New binaries sending the name of the default filter sort option uxf-bin#10.Tests
test/ui/filter.js(mocha, on Node 20 as in CI), 6 new tests: the name of the default sort option, the query with the default sort option (before and after its contents are translated), the query with named sort options (including the toggling of their order) and the query with an option without a name wrapped in translation markup. The data query is replaced by a stub that records the queries, and thedocumentandwindowof jsdom are exposed as globals (as intest/gateway/print.js), as the filter uses them. 3 of them fail againstmaster(the translated one with the exact markup of the event), and the 47 tests pass.eslintpasses (npm run lint).master, so the changes of the new ones are only the ones of the filter (see chore: New binaries sending the name of the default filter sort option uxf-bin#10).Merge
Merge after hivesolutions/uxf-bin#10. A squash (or rebase) merge of it changes 9be03c81, requiring the
binpointer of this branch to be re-pointed before merging.