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

Fix list widget bug with counter-last when appending items #7712

Merged
merged 4 commits into from Sep 24, 2023

Conversation

rmunn
Copy link
Contributor

@rmunn rmunn commented Sep 2, 2023

This PR contains just the bugfix from #7694 with no new features added to the list widget.

Fixes #7693.

The failing test appends a value to a list without changing the rest of
the list, and the counter-last value doesn't get updated correctly when
that happens. Also added another test, which passes, testing removing
the last item of the list, just in case of a regression.
The unit tests were looking very similar to each other, so I factored
out the common code and made them into simple data-driven tests.
The only scenario that was failing was when counter-last was used, but
the list was strictly appended to with no other changes made. The one
unit test that was failing now passes with this fix.
Now we only refresh the last item if it was truly necessary.
@vercel
Copy link

vercel bot commented Sep 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Sep 2, 2023 6:33am

rmunn added a commit to rmunn/TiddlyWiki5 that referenced this pull request Sep 5, 2023
The bugfix in this PR is now identical to the bugfix from PR Jermolene#7712 so
that we won't get merge conflicts no matter whether that PR or this one
is merged first.
@Jermolene
Copy link
Owner

Thanks @rmunn

@Jermolene Jermolene merged commit 8effb3f into Jermolene:master Sep 24, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

[BUG] List widget counter-last not updated correctly when items added to list
2 participants