Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Right Sidebar - Recent tab - shows long lists of imported tiddlers created the same day #8127

Open
pmario opened this issue Apr 1, 2024 · 3 comments

Comments

@pmario
Copy link
Contributor

pmario commented Apr 1, 2024

If a user creates a lot (1000+) of tiddlers, that are imported into TW, all of them will show up in the Recent tab.

The Recent tab uses the timeline-macro which has a limit parameter -- But

limit

The maximum number of tiddlers to include, defaulting to 100. But if any tiddlers are included for a particular day, all of the other tiddlers for that day will also be included – even if this exceeds the limit

So this can be a problem, if we have a lot of imported tiddlers for 1 day

We should investigate that problem and modify the timeline macro accordingly.

@pmario
Copy link
Contributor Author

pmario commented Apr 1, 2024

@ericshulman
Copy link

One possible "fix" is to compute the list of tiddlers and apply the limit[...] filter before the $list widgets are processed (i.e., before the eachday[...] filter is applied), using something like this:

<$set name="tids"
   filter="[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]]">

Then, in the $list filters, use enlist<tids>, like this:

<$list filter="[enlist<tids>eachday[$dateField$]]">

and

<$list filter="[enlist<tids>sameday:$dateField${!!$dateField$}]">

This ensures that the desired limit (default=100) is never exceeded, regardless of how many tiddlers share the same date.

@pmario
Copy link
Contributor Author

pmario commented Apr 5, 2024

I do get the idea, but with new code, we need to make sure, that we also use the new text substitution syntax. Especially the subfilter parameter is problematic here, if we want to be backwards compatible: https://tiddlywiki.com/#timeline%20Macro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants