-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
uk-icon duplication #31
Comments
Hello, I do not know fasthtml and know just the basics of HTMX. AFAIK, HTMX works like turbolinks where we click/trigger on something, target something and replaced it with a new response. So, I do not know what's causing the duplication. |
Hello @Isaac-Flath This is indeed a bug and I may have found a fix. I have attached the HTML files together with the "patched" icon script. You can use that instead for now just to see if it fixes the problem for fasthtml. If it worked, then we may have found a fix and will be included in the next version. I also attached a short video that reproduces the problem and it fixes mine. 2024-11-02.09-31-10.mp4 |
Thank you @sveltecult , this is fantastic! I've tested it in some of my apps as well and it seems to resolve the issue. I will use this script until the next release :) |
Hello @Isaac-Flath, Great that it worked. I see you're currently working on the fasthtml wrapper. Just a heads up, though - I'll be away for the next two weeks or so. By then, I assume you'll have made a lot of progress. To ensure we're on the same page, I'm working on the next version, which drops several components (since they can be done with Tailwind alone, and some are done better that way). To save you some time, I don't want you to spend time on something that might get dropped by the time I return. So, here's the list of components that will surely make it to the next version. I've made a lot of changes and improvements, and I don't have a changelog yet, so I thought I'd just share the code with you. This should give you an idea of what's coming and help you avoid wasting time.
|
This is very helpful @sveltecult , thank you! I'll make sure to focus my efforts on things on this list :) |
If there is any other information that'd be helpful please let me know. I'd also love to collaborate if helpful, though I do not know the best fix to the problem.
Problem
When
uk-icon
is used in conjunction withhx-push-url
this results in duplicated Icons with back navigation. The situation where you'd want to push the URL is when you want to return HTML partials to swap content from the server (such as a sidebar + content layout where you just replace the content), but also have back button capability.What I am using this for
I'm working on building a wrapper around frankenui to be used with fasthtml, which is a framework for building hypermedia applications built on top of HTMX, Starlette, and Uvicorn. Here are the docs page I am working on for the frankenui wrapper (still early days/unreleased).
Fix/workaround
The workaround I have to prevent icon duplications is to use this
Minimal Repro
The text was updated successfully, but these errors were encountered: