-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added standalone multisort implementation to file_browser example #31
base: master
Are you sure you want to change the base?
Conversation
Multicolumn sort now tree-aware:
Cleanup done. Tree-aware multisort implementation still significantly more complex than multisort implementation for flat lists. The sort-in-place pattern becomes impractical, and you need a touch of recursion to deal gracefully with the arbitrary depth tree. Which made me consider: does V8 do tail call optimization? |
57ad18b
to
4aab87e
Compare
86cc6c2
to
2de7f2a
Compare
2de7f2a
to
a96d846
Compare
const offsets = [200, 106, 12]; | ||
for (const offset of offsets) { | ||
const vals = []; | ||
for (let i = 6 + offset; i < 16 + offset; i++) { | ||
const cell_values = await cell_values_at(0, i, 4, 300); | ||
vals.push(cell_values[0]); | ||
} | ||
expect(vals).toEqual([ | ||
"add dog/", | ||
"add charlie/", | ||
"add baker/", | ||
"add able/", | ||
"file_89.txt", | ||
"file_88.txt", | ||
"file_87.txt", | ||
"file_86.txt", | ||
"file_85.txt", | ||
"file_84.txt", | ||
]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is valid, but runs into some kind of issue with scrollTo
when offset === 12
. Basically, the failure seems to occur due to the fact that scrollTo(0, 24, 4, 300)
scrolls to the same row as scrollTo(0, 25, 4, 300)
:
● file_browser.html › sorts tree filebrowser › uses same sort at all levels, sort then expand tree
expect(received).toEqual(expected) // deep equality
- Expected - 1
+ Received + 1
@@ -3,10 +3,10 @@
"add charlie/",
"add baker/",
"add able/",
"file_89.txt",
"file_88.txt",
- "file_87.txt",
+ "file_86.txt",
"file_86.txt",
"file_85.txt",
"file_84.txt",
]
I added sorting tests to @texodus Not sure exactly what the problem is, but the |
Adds a standalone implementation of multisort to the
file_browser.html
example. Slightly simplified, but mostly equivalent to the one recently removed fromevents.js
: