Comments (5)
@julen please have a look into this.
from zing.
Quick update: I've looked through this today, and making the returned stats a list is straightforward.
But there is a caveat. The client needs to merge the new stats data with existing UI data (there are some properties which are irrelevant to stats and are not part of the /xhr/stats/
payload), and this exhibits a mismatch in the ordering of the children elements that have been provided. The effect is that stats are updated, but the displayed data is incorrect because merging happens for items which are not in the same order. I tried to sort all children elements as returned by all users of TreeItem
, and while it works, it quickly becomes unwieldy and I would prefer not to resource to this.
Another option I'm thinking about would be to make /xhr/stats/
return the entire UI properties as returned to templates. This would include extra properties which are irrelevant when stats are dirty (e.g. pootlePath
, itemType
...), so the response payload is unnecessarily bigger. It also requires some extra plumbing to be able to return exactly the same data as in browsing views.
from zing.
I'd just return exactly the same format of data as we do in browsing views. This should ideally simplify the code and help in the future to get rid of browser page reloads. That'd be step one.
Step two is an ability to get short patch updates (in the future, via websockets), so we will need a mechanism to push partial data for specific keys.
from zing.
Okay, I'll try to match the format we use in browsing views. We'll need to have some plumbing code to be able to get all the context-relevant data. At the same time, I'm thinking that this won't be stats anymore, but rather something like browsing data, so we should probably rename /xhr/stats/
to something more relevant.
from zing.
Agree on renaming this to browsing data.
from zing.
Related Issues (20)
- In admin mode, filter out disabled projects from counters / translation views
- Avoid zero carry-overs
- Quality checks page requires help/_ttk_quality_checks.html
- Use Prettier for formatting frontend code
- Use Prettier for CSS formatting
- Upgrade Webpack
- Upgrade to latest React
- Make emojis work as placeables HOT 3
- Placeables should be inactive in read-only editor
- Editing a project fails source language validation
- Handle the case of an empty rendered string in Plurr preview HOT 5
- Support Plurr preview for simple {FOO}-style placeholders HOT 7
- Plurr preview pane to support empty parameters
- Visually identify LS Unicode symbol (U+2028) in the editor
- No module named 'syspath_override' HOT 2
- Incorrect number with the word count tracker HOT 3
- Issue building with python 3.7 HOT 4
- UI hangs indefinitely when attempt to translate a .po file with <= 10 entries HOT 5
- Exception in manage.py build_assets: 'gyp==0.1' distribution was not found
- UI hangs with spinner "Uncaught TypeError: this.unit is undefined" HOT 3
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 zing.