Comments (2)
Our original plan was to allow you to detect changes just by inspecting the state. So if you're rendering a tree view, you can just retrieve the entries and re-render. If you have 3 buffers open, you can call changesSince
for just those buffers whenever operations get applied to see if any have changed. We're open to iterating on this plan based on feedback. Definitely would be interested in what might work better for you in your use case.
from xray.
I think the changesSince
API is good for buffers. Could something similar be added to work_tree to report file changes in the work tree?
It's true I can just determine this all by inspecting state. But if I want to update the view in an animated fashion then I need to know which exact files were inserted/removed/etc. I could do that by diffing states, but it gets expensive and complicated. Especially when all the information is already known by memo, seems like just exposing exactly what's changed would be nicer.
My use case is that I'm building a macOS file tree view as a learning project. The view can be updated in two ways. Simple way is to just reloadData
... which reloads the entire view. Works, but it's somewhat expensive and doesn't provide any animation. On the other hand if I know exactly which files are removed/inserted/changed then I can just reload those portions of the view that have changed. It's faster and you get animation.
from xray.
Related Issues (20)
- Electron version HOT 1
- IMHO, if you call it experimental, you had better not call it "next-generation".
- memo_core filesystem sync status? HOT 3
- Memo: include `path` in Entry
- [Memo] Adding a file to a subdirectory works, but reading it fails HOT 2
- [Memo] There is no API to undelete a file. HOT 3
- [Memo] Adding a `Changed` file status. HOT 3
- [Memo] `parentId` could be hidden from the user-facing API HOT 3
- Xray panics when scrolling too fast while editing README.md HOT 7
- [Memo] There isn't an API call to verify a path's existence
- [memo] There is no way to stop listening to buffer changes
- [memo] Extra methods for Buffers
- [Memo] Confusing error message about ReplicaId HOT 1
- panic at index out of bounds HOT 1
- Question: Can we potentially use x-ray on a thin-client while the x-ray core server could be installed remotely? (Hackable Cloud IDE?) HOT 1
- Is it dead? HOT 12
- Missing XRAY_SERVER_PATH environment variable HOT 4
- 此项目停了吗? HOT 2
- Future plans for xray? HOT 2
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 xray.