Comments (8)
Redo body pane file provider to be able to give out stats from any gnx in the leo document., as timing from vscode can be tricky if user expands notes or polls leo from some info to show parts of the tree that were refreshed from an earlier refresh call.
Might have to answer from other opened documents than the currently selected one, for example, if just switched from one document to the other.
from leointeg.
Note: The node' id could be a double murmurhash of the "ap" json string, https://github.com/garycourt/murmurhash-js, doubled means 64 bit instead of 32. this would maintain node identity and replace the decorated incremented number used as of now... see https://security.stackexchange.com/questions/209882/can-a-32-bit-hash-be-made-into-a-64-bit-hash-by-calling-it-twice-with-different/210049#210049
function hash64(str) {
var h1 = hash32(str); // returns 32 bit (as 8 byte hex string)
return h1 + hash32(h1 + str); // 64 bit (as 16 byte hex string)
}
from leointeg.
By using a double murmurhash of the "ap" json string, as id for outline nodes, and only refreshing them (by changing salt used with hash) when operations do actually change the tree (opposite of just navigating the tree) This will prevent refreshes and flashing/redraw.
from leointeg.
@boltex Never heard of a murmurhash until just now. Google enlightened me. The general idea seems good.
from leointeg.
Actually salt might be needed (see below)
Actually no need for 'Salt' at all: if the collaped state is part of the json data, the 64 (or whatever lenght) key will be different, thus refreshing the collapsed state if it changed.
from leointeg.
Important: When browsing tree without changing it (navigating) having hashes for IDs will allow to use only 'reveal' method without any 'refreshes' needed at all! This will greatly benefit navigation experience!
from leointeg.
Implementation Revision:
Salt is incremented with tree-changing operations , but stays the same when only navigating the tree. (up down, left right,..pgup/pgdn)
Salt is also needed, depending of navigation mode, when simply navigating the tree:
1- "Standard vscode" tree navigation mode
- change salt when collapsing / expanding, to change collapsed-state and set selection
(consider expand/collapse to be tree changing)
2- "Leo" tree navigation mode
- dont change salt, just use reveal with the newly selected node as parameter.
from leointeg.
@boltex Imo, this issue does not affect leoserver.py. I have removed the comment in leoserver.py.
from leointeg.
Related Issues (20)
- Implement '@chapter' support
- Add go-back and go-forward history in menu over the goto-panel.
- Home / End (goto first/last visible) collapse the model of the tree! HOT 1
- unknown reasons for version mismatch HOT 7
- Allow multiple Body panes from different nodes, other than the selected one. HOT 4
- Start Server button fails HOT 8
- Support leoserver 'warning(s)' on startup: don't cancel auto-connect after only warnings.
- Allow actions to keep focus on current pane, to keep focus on refresh/changed, and enable Goto Pane 'keyboard' navigation HOT 1
- Re-do webviews (config pane and find-panel) and their key capture behaviors HOT 1
- Add commodity keybindings Ctrl+Shift+L for revealing the LeoInteg view, with option to turn commodity keybindings off
- Offer to override CTRL+P to goto any node (by headline search) when leo pane focused HOT 3
- The Leo-Integ Extension Should Be Able To Run On The In-Browser Version Of VSC HOT 2
- add leointeg to Open-VSX for Theia, VSCodium and other alternate editors HOT 4
- Implement @killColor, @nocolor & @noColorNode on the server-side HOT 2
- Search strings with backslashes seem to fail
- Using 'Close Leo File' from the command palette instead of using the X in the document pane is buggy. HOT 1
- Error - Cannot start server: Cannot find server script HOT 4
- Leo Integration Settings: hangs on "Saving..." when entering "Python Command" HOT 4
- LeoInteg should support connecting to Leo running in a venv HOT 2
- Add tabs to the find pane for a proper 'nav' pane, combining it with the goto pane.
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 leointeg.