posthog icon indicating copy to clipboard operation
posthog copied to clipboard

fix(lemon-ui): LemonInputSelect 2.1

Open Twixes opened this issue 1 year ago β€’ 22 comments

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

before

After

after

Twixes avatar Aug 20 '24 10:08 Twixes

πŸ“Έ UI snapshots have been updated

58 snapshot changes in total. 0 added, 58 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 10:08 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 10:08 posthog-bot

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:

2024-08-20 13 32 33

Twixes avatar Aug 20 '24 11:08 Twixes

πŸ“Έ UI snapshots have been updated

56 snapshot changes in total. 0 added, 56 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 12:08 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 12:08 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 12:08 posthog-bot

πŸ“Έ UI snapshots have been updated

9 snapshot changes in total. 0 added, 9 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 12:08 posthog-bot

πŸ“Έ UI snapshots have been updated

4 snapshot changes in total. 0 added, 4 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 13:08 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 13:08 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 13:08 posthog-bot

That's odd @skoob13, I can't reproduce the Backspace behavior…

Twixes avatar Aug 20 '24 15:08 Twixes

πŸ“Έ UI snapshots have been updated

6 snapshot changes in total. 0 added, 6 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 16:08 posthog-bot

πŸ“Έ UI snapshots have been updated

3 snapshot changes in total. 0 added, 3 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 20 '24 16:08 posthog-bot

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. image image

anirudhpillai avatar Aug 21 '24 11:08 anirudhpillai

@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.

Twixes avatar Aug 21 '24 11:08 Twixes

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: 2024-08-21 14 04 39

skoob13 avatar Aug 21 '24 12:08 skoob13

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

Twixes avatar Aug 21 '24 12:08 Twixes

πŸ“Έ UI snapshots have been updated

9 snapshot changes in total. 0 added, 9 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 21 '24 19:08 posthog-bot

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%)

compressed-size-action

github-actions[bot] avatar Aug 22 '24 12:08 github-actions[bot]

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 22 '24 12:08 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 22 '24 12:08 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Aug 22 '24 12:08 posthog-bot

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.

posthog-bot avatar Aug 30 '24 07:08 posthog-bot

πŸ“Έ UI snapshots have been updated

6 snapshot changes in total. 0 added, 6 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Sep 02 '24 10:09 posthog-bot

πŸ“Έ UI snapshots have been updated

4 snapshot changes in total. 0 added, 4 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Sep 02 '24 11:09 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Sep 03 '24 12:09 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Sep 03 '24 12:09 posthog-bot

πŸ“Έ UI snapshots have been updated

22 snapshot changes in total. 0 added, 22 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Sep 03 '24 13:09 posthog-bot

πŸ“Έ UI snapshots have been updated

20 snapshot changes in total. 0 added, 20 modified, 0 deleted:

Triggered by this commit.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Sep 03 '24 13:09 posthog-bot

πŸ“Έ 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.

πŸ‘‰ Review this PR's diff of snapshots.

posthog-bot avatar Sep 03 '24 14:09 posthog-bot