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

Add presentMut lens for always replacing the current history item instead of appending #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

laszlokorte
Copy link

Currently the latest history entry is only replaced if the modification happens inside the globally configured time window.

This PR adds a new H.presentMut lens that always replaces the latest history entry instead of append to the log.

This is useful for temporarily opting out of tracking changes. For example when updating a value based on the mouse position but only storing a new history value once the mouse button is released.

Not sure if is repository is still maintained but I would appreciate if this PR could be merged.

src/core.js Outdated Show resolved Hide resolved
src/core.js Outdated Show resolved Hide resolved
test/tests.js Outdated Show resolved Hide resolved
@polytypic
Copy link
Member

Thanks for the PR!

Hmm... The basic idea and use case sounds reasonable.

I added a few suggested changes.

Mentioning the addition in the README would also be nice.

Not sure if is repository is still maintained

It has been a long time since I last worked on a frontend project (especially using Calmm-js) and I have kind of assumed everyone has already moved on to writing TS using LLM generated code.

@laszlokorte
Copy link
Author

Wow, thanks for your fast response. I agree with your suggestions and applied them.

I did not commit the regenerated docs and dist folder. Should this be done as part of the PR as well?

@laszlokorte
Copy link
Author

It has been a long time since I last worked on a frontend project (especially using Calmm-js) and I have kind of assumed everyone has already moved on to writing TS using LLM generated code.

I am currently working on a frontend project again and remebered your talks on calmmjs and discussion from back in 2016 in the CycleJS chat and at CycleConf. So I thought to give it a try to apply the calmmjs architecture to svelte. So far it works really nice.

@laszlokorte
Copy link
Author

Would this be ready to be merged or anything still to be done?

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.

2 participants