AllYourBot / hostedgpt

An open version of ChatGPT you can host anywhere or run locally.
MIT License
362 stars 199 forks source link

Allow messages to be tapped for the hover controls #473

Open krschacht opened 2 months ago

krschacht commented 2 months ago

We disabled the sticky hover situation that was tailwind falls back to on mobile in PR #371. It was creating a bad experience all around, and I still think this is the right default behavior.

The config flag was introduced by tailwind in this PR: https://github.com/tailwindlabs/tailwindcss/pull/8394

And the PR explains that enabling sticky hover for a single element (the message, in our case) should be possible with the variant: [&:group-hover]:visible. However, when I tried this simple fix it didn't work.

I need to do more testing, but it may be because we aren't on the version of tailwind that supports variants (or one-off variants). More is explained:

The tl;dr is — figure out how to make it possible for messages to be tapped to reveal their message controls, and ideally get variant's working generally since those would be nice to use (e.g. to implement a better relationship class within the app)