Repository navigation
Extend user-local-time to user profiles - #5779
Conversation
|
The structure looks about right. If we had something like Preact it’d be presumably easier to handle this sort of content. I wonder if attachElement would make this somewhat easier, where you have an intermediary function which calls attachElement with the time-getter logic inside the getNewElement callback. onHovercardOpen
append(user, hovercardLocation)
onProfileLoad
append(user, profileLocation)
append
attachElement(
append: location
getNewElement
all creation and update logic |
Or SolidJS, which uses native DOM that maybe interesting for our use case. (Not trying to stir up another UI library war, just mentioning 😂) I don't know about the Unless someone find a nice way to avoid duplicating these, I think this PR is done. refined-github/source/features/user-local-time.tsx Lines 174 to 179 in 72613c7 |
|
The problem is that we can’t use JSX (due to the issues described in my last attempt PR) and Solid.js has some footguns when used without it: https://www.solidjs.com/guides/getting-started#buildless-options Preact doesn’t appear to have this issue. I’m not attached to any library but anything that makes it easy, painfree and is under 5kb would be great. |
|
I think this would be the correct solution: https://lit.dev/ Unlike most other libraries, these elements are regular dom elements that can be created and appended even with our JSX setup because they’re triggered by a basic Any custom-element-based library should work though. |
|
Would like to evaluate which features will benefit from using a UI library first. |
|
It’s probably not a whole lot, that’s why library size is important. But if it’s available we’ll surely come up with more. The options page would also definitely benefit from dynamic components, we have a lot of dynamic code in it |
Resolve #5775
A lot of dup code, get this thing out first
Test URLs
https://github.com/fregante
Screenshot