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

feat: HtmxLazy component #34

Merged
merged 2 commits into from
May 5, 2024
Merged

feat: HtmxLazy component #34

merged 2 commits into from
May 5, 2024

Conversation

egil
Copy link
Owner

@egil egil commented May 3, 2024

@tanczosm this works, but is this a valuable component?

I dislike the hidden magic of Weather.razor not rendering its elements on an hx-request. Not that it works this way, but that it is not obvious to the developer.

@tanczosm
Copy link
Collaborator

tanczosm commented May 3, 2024

This component has value, but probably not as written at the present time.

In trying to document rules for HtmxSwappable I think HtmxSwappable and HtmxLazy should probably be two components so you are on the right path. HtmxSwappable is meant to act as a container for content you may individually swap into in the future. The lazy loading logic in HtmxSwappable complicates it's usage and is trying to do too much at once.

Let's strip HtmxSwappable of lazy loading and put HtmxLazy on hold for a bit to focus first on what HtmxSwappable would be. Give me a moment to play around with the code and I'll report back.

@egil egil force-pushed the feat/swappable branch 3 times, most recently from 765d4a4 to 3dd149d Compare May 5, 2024 09:14
@egil egil marked this pull request as ready for review May 5, 2024 10:36
@egil egil merged commit 6de4e20 into main May 5, 2024
8 checks passed
@egil egil deleted the feat/swappable branch May 5, 2024 10:36
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.

None yet

2 participants