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

Remove multi-swap extension (OR modify documentation) since by now (almost) everything can be done with hx-select-oob #124

Open
oliverhaas opened this issue Dec 21, 2024 · 1 comment

Comments

@oliverhaas
Copy link

oliverhaas commented Dec 21, 2024

See my comment here bigskysoftware/htmx#1512 (comment).

Since 1.0.2 the multi-swap extensions became redundant, since hx-swap-oob and hx-select-oob started supporting nested swaps (see https://github.com/bigskysoftware/htmx/blob/master/CHANGELOG.md#102---2020-12-12).

This means the documentation of multi-swap (which says oob swaps can't handle nested swaps), as well as the actual existence of the extension itself, is misleading. I certainly used multi swap when I did not need to.

If there is anything I'm missing, let me know. Otherwise I'm open to making a PR.

@oliverhaas oliverhaas changed the title Remove multi-swap extension since by now everything can be done with hx-select-oob Remove multi-swap extension (OR modify documentation) since by now (almost) everything can be done with hx-select-oob Dec 22, 2024
@oliverhaas
Copy link
Author

I've actually found reasons what multi-swap can do that hx-select-oob can't:

Since there is not Hx-Reselect-Oob response header, one has to use mutli-swap if one wants that functionality with response headers.

Same goes for htmx.ajax: Since there is not selectOobOverride (yet?) or similar, multi-swap here has some niche where one might want to use it.

So I would probably reduce the scope of this issue to modifying the docs so it's reflecting the information given here.

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

1 participant