Skip to content

Conversation

@hashicc
Copy link
Collaborator

@hashicc hashicc commented Mar 13, 2025

Description

Screenshots (if appropriate)

How to Test

Checklist

  • I have added before and after screenshots for UI changes
  • I have added JSON response output for API changes
  • I have added steps to reproduce and test for bug fixes in the description
  • I have commented on my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

hashicc added 8 commits March 10, 2025 18:34
Sorting will be handled in memory by a custom implementation
Accept a sort key on the object passed to on store.query() which returns
the results sorted in-memory
By default store.query({ sort }) will expect the sort object to have an
attribute specified based on attributes defined by the model. The
sorting will actually happen on "keys" in the json api formatted
"attributes" object, which might contain keys that are not defined as
attr() on the model. This is true for the current default sort of
created_time. Making this distinction will help avoid querying on
insider json api attributes from the payload without a refactor or
some explicit handling. In the case of "created_time", it is identified
as a "universally sortable key" for all models in the code but
currently is not exposed as an option that can be passed via { sort }
since it's the current default.
Use ascending as the default sort direction except in the case that
created_time is used in which case to match the existing default
behavior it should be descending
@vercel
Copy link

vercel bot commented Mar 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
boundary-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 6:54pm
boundary-ui-desktop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 6:54pm

…and sortAttrbute, not custom sort function yet
@hashicc
Copy link
Collaborator Author

hashicc commented Apr 23, 2025

Spike has served its purpose and will be used as an example for the upcoming implementation

@hashicc hashicc closed this Apr 23, 2025
@calcaide calcaide deleted the spike/sorting branch August 26, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant