fix(lemon-ui): LemonInputSelect 2.1
Changes
#24321 improved LemonInputSelect, but it remained buggy around removing and editing the already-selected options, which users rightly point out. This resolves #24317, resolves #23832, makes the input itself autosized, and revamps the editing experience to avoid the value shifting around in a surprising way:
Before
After
πΈ UI snapshots have been updated
58 snapshot changes in total. 0 added, 58 modified, 0 deleted:
chromium: 0 added, 56 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 2 modified, 0 deleted (diff for shard 2)
Triggered by this commit.
πΈ UI snapshots have been updated
6 snapshot changes in total. 0 added, 6 modified, 0 deleted:
chromium: 0 added, 6 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
Actually also really liked the idea from https://github.com/PostHog/posthog/issues/24317#issuecomment-2296435385 to make clicking on the text initiate editing. This in fact simplifies things. Here's the final iteration up for review:
πΈ UI snapshots have been updated
56 snapshot changes in total. 0 added, 56 modified, 0 deleted:
chromium: 0 added, 54 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 2 modified, 0 deleted (diff for shard 2)
Triggered by this commit.
πΈ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
chromium: 0 added, 4 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
9 snapshot changes in total. 0 added, 9 modified, 0 deleted:
chromium: 0 added, 9 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
chromium: 0 added, 4 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
That's odd @skoob13, I can't reproduce the Backspace behaviorβ¦
πΈ UI snapshots have been updated
6 snapshot changes in total. 0 added, 6 modified, 0 deleted:
chromium: 0 added, 6 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
chromium: 0 added, 3 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
This works so much better now!
Just a small thing with highlighting what's selected, when you type a substring what's already selected, it highlights multiple rows.
@anirudhpillai Good point, that's something I was unsure about, as I carried over this way of highlighting selected items from the original LemonInputSelect βΒ but now it's redundant. Will rely on the checkbox only, so that keyboard navigation is obvious.
It's probably unrelated, but it's a very annoying behavior. When I paste a long string like:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.6167.57 Safari/537.36
The input splits it into two options.
Repro:
Yeah, it's been that way since the beginning @skoob13. That's handy if you have multiple values you'd like to add at once, but annoying in cases like the one you recorded. Will leave that as is in this PR though
πΈ UI snapshots have been updated
9 snapshot changes in total. 0 added, 9 modified, 0 deleted:
chromium: 0 added, 9 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
Size Change: +549 B (+0.03%)
Total Size: 2.06 MB
βΉοΈ View Unchanged
| Filename | Size | Change |
|---|---|---|
frontend/dist/toolbar.js |
2.06 MB | +549 B (+0.03%) |
πΈ UI snapshots have been updated
2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label β otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.
πΈ UI snapshots have been updated
6 snapshot changes in total. 0 added, 6 modified, 0 deleted:
chromium: 0 added, 6 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
chromium: 0 added, 4 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
22 snapshot changes in total. 0 added, 22 modified, 0 deleted:
chromium: 0 added, 22 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
20 snapshot changes in total. 0 added, 20 modified, 0 deleted:
chromium: 0 added, 20 modified, 0 deleted (diff for shard 1, diff for shard 2)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
πΈ UI snapshots have been updated
2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.