Comments (8)
There would be an interaction between this and the limit
attribute. Currently even if limit
is present, the list widget calculates the entire list anyway even if it's only going to show, say, the first 3 items. But I have some work planned in #7811 that would allow the list widget to be "lazy" and stop calculating list items once the limit is reached. In order for that to be possible, we'd need to define the interaction between total-count
and limit
to say "If limit
is present, total-count
will never be greater than limit
, though of course it might be less." I.e. if you have five tiddlers tagged with Todo and you do <$list filter="[tag[Todo]]" limit=3 total-count="items">
then the value of items
would become 3, not 5.
I believe this is what you would want anyway: in any scneario I've come up so far, you would want to know how many list items the list is actually going to display, not how many it potentially could have displayed. But it's definitely worth clarifying that iteraction now, before anyone actually encounters it in practice.
from tiddlywiki5.
There are performance considerations to the proposal. See #5867 for a prior discussion that includes implementation ideas.
from tiddlywiki5.
I do not have knowledge of the javascript but the existing feature "<counter-variable-name>-last
is set to yes for the last entry in the list, no for the others" is theoretically already taking this into account.
from tiddlywiki5.
@saqimtiaz I( need to leave performance considerations to others, but I would have thought the logic needed to provide the <counter-variable-name>-last
would already have impacted the performance and making the total items only a matter of returning it.
- To not have this feature, the same filter needs to be run with a count operator to get the total which seems a more costly way
from tiddlywiki5.
@AnthonyMuscio the reason for the performance impact is discussed in the linked issue.
from tiddlywiki5.
@AnthonyMuscio the reason for the performance impact is discussed in the linked issue.
As I said, I looked and cant understand or provide any input.
from tiddlywiki5.
I note that the existing count widget, and count operator may already have code in relation to the total items after the limit[] operator. thus may be related to any resulting fix.
from tiddlywiki5.
I believe what I proposed is correct and I don't understand the arguments at the link I was directed to.
I have since stored the total count in behind a custom widget for list reports.
from tiddlywiki5.
Related Issues (20)
- [BUG] filter prefixes don't properly set currentTiddler, I think HOT 4
- [Bug] getvariable operator does not allow to read the definition of a function
- Tag-pill import (drag and drop) should include the tiddler at tag's home node, if it exists HOT 6
- [BUG] Blockquote parsing fails on example HOT 5
- The latest version of CodeMirror edit box, using textarea HOT 1
- [IDEA] Flex box syntax for in-tiddler multi-column HOT 2
- [BUG] $action-log always evaluates all functions in its context HOT 1
- [BUG] Uncaught TypeError: process.nextTick is not a function HOT 3
- [IDEA] Advanced Search Filter Tab Should Allow Multi-line Input HOT 1
- TW5-Syntax 2.0.0 Released HOT 8
- [BUG] EditTextWidget inserts extra space below content HOT 3
- [BUG] Plugin tests should not be applied to plugins that are loaded via environment variables HOT 5
- [IDEA] Meaningful Notifications for Permalink and Permaview Messages HOT 2
- [TESTS] all tests for a plugin-type "in development" fail, with no possibility to fix it HOT 3
- [IDEA] Allow Comments Inside $let HOT 5
- [BUG] Fix splitregexp operator JavaScript error on matches with undefined capture groups HOT 9
- [BUG] Unavoidable RSOD Caused by RegExp HOT 11
- [BUG] Tiddler editor layout has lost whitespace HOT 1
- [BUG] testcase procedure: "test failed" message displayed even though no ExpectedResult is defined HOT 1
- [IDEA] Store Tags as Displayed 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 tiddlywiki5.