Comments (5)
I've started to have a look into this and integrating my library in now, and the first issue I've hit is that it looks like the full list isn't being passed into the sort?
That is, I've added some logic inside of Filter.re
and the sorting wasn't changing, nor does it seem to change with the existing filter logic.
If I throw in a Console.log(List.length(items))
in there, it seems to vary every time I open the menu, which implies that the streaming of the results could be the issue?
In the image I'm opening the menu 5 times and searching for R
and getting different list lengths every time. It doesn't seem to change if I wait for a second or so either.
I think this would be why @bryphe was seeing the list not changing since only part of it is being updated.
EDIT: Actually, if I log the QuickOpen.re
file, I can see what is happening and only the final streaming bit is sorted:
from oni2.
@CrossR each time you add a letter in the quick open you will be filtering against a potentially ongoing streaming in of results
The screenshot shows the incremental accumulation of results, regarding the results not changing, I haven't been able to reproduce this locally but the current mechanism is very fussy i.e. it expects an exact match i.e. if you want to match on Filter.re
you have to type that string in exactly it cant be Fltr
that will get no results.
from oni2.
As you say I wouldn't expect a consistent number when re-opening the list as it could be some arbitrary amount being streamed in at a time.
The filter is being passed a command
type which is a record
type command = {
name: string,
command: unit => unit,
icons: option(string)
}
so you have to filter on name
.
I don't think it should matter what state the streaming is at, since ideally the strategy ought to take a list of commands of any length and a query and filter it
from oni2.
One thing to note @CrossR is that the sequence of events is
-
type a key ->
MenuQuery(userQueryString)
->Filter.menu(queryAtTheTime, CommandsAtTheTime)
-
Meanwhile open quickOpen -> stream begins -> intermittently calls ->
MenuUpdate(newCommands)
the above flows are separate i.e. the filter is currently only called when a user hits a key not when the content of the list changes (I didn't forsee us using a streaming pattern), it might be that in the reducer in Menu.re
when an update comes in you should also check if String.length(query) > 0
if so append the commands but also, re-run Filter.menu(existingQuery, newlyUpdatedCommands)
from oni2.
I think we can close this out, and make any follow up issues if we hit any performance issues or scoring issues.
Implemented over in #204.
from oni2.
Related Issues (20)
- Failed to compile on Ubuntu20.04 with Clang14 due to skia HOT 2
- Demo the app. HOT 4
- packaging: `.desktop` does not have a proper vendor prefix
- Release does not run on Fedora 35 HOT 1
- Wakatime not installing: (Failure "Unable to locate extension after install")
- open onivim2 from the terminal HOT 2
- Tab consistency
- Where can i find an app image for onivim2
- Please update Docker build in user manual HOT 2
- How can I help? HOT 3
- Has the dev stopped? HOT 13
- Build error
- start onivim as daemon
- Docker build: `No package git222 available` HOT 11
- AppImage fails to open at all HOT 1
- Neo2 keyboard layout, some keys not working
- Cannot Download appimg HOT 7
- Pain
- Status of the project? HOT 2
- Unable to download via license key "An expiration date cannot be in the past."
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oni2.