suid icon indicating copy to clipboard operation
suid copied to clipboard

Inspector improvements for dynamic <Select> and <Menu> support.

Open Azq2 opened this issue 1 year ago • 6 comments
trafficstars

Fixing issue #223. This done by dynamic linking between HTML nodes and components.

Of course, this is a hacky and bad workaround. But, I think, it is better than, broken <Select> and <Menu> which makes this awesome lib unusable in most cases. :(

Azq2 avatar Apr 26 '24 23:04 Azq2

Demo with fix: https://github.com/Azq2/suid-select-bug

Azq2 avatar Apr 27 '24 07:04 Azq2

@Azq2 does this also fix the issues with ssr though?

BierDav avatar Apr 29 '24 06:04 BierDav

Ok now, I've understood what you are doing here, but for my taste this is a bit too hacky. I would prefer a solution with an excessive use of contexts, because it also would solve the issue with ssr.

BierDav avatar Apr 29 '24 07:04 BierDav

Yes, you are right. This doesn't help with SSR and is too hacky. But I positioned this fix as an intermediate solution before a better variant was implemented.

  • Working CSR is better than broken SSR+CSR.
  • This is only the fix of another existing workaround. The code won't get better or worse at all.

Azq2 avatar Apr 29 '24 15:04 Azq2

If you need a solution to get csr with for working, you may use my implmentation: https://github.com/BierDav/suid-extensions You have to download the code and add it to your codebase. This btw. also supports SSR

BierDav avatar May 01 '24 12:05 BierDav

This PR is not for me, I have already fixed this problem in my project.

This PR is for people who first use this library. They want a working library, not a lot of hours of debugging, because nowhere said about these problems.

And this PR is a first step to fixing that. The next step - reimplementing all the similar code to using contexts instead of hacky inspect().


@juanrgm What you think about this?

I know that open-source is always “as is” and no one is obliged to anyone. But I believe that we all have a responsibility for the future of front-end development. And a broken library of this level will only repel people who decide to try SolidJS.

We must join effort to fix this.

Azq2 avatar May 04 '24 09:05 Azq2

Closed via https://github.com/swordev/suid/commit/b196443f4f0ba0b962ad0438bb1db059b5755d19.

juanrgm avatar Apr 17 '25 19:04 juanrgm