posthog icon indicating copy to clipboard operation
posthog copied to clipboard

refactor: Preventing mousewheel from altering port value in batch export form

Open slshults opened this issue 1 year ago • 3 comments

Problem

A user pointed out (in ZenDesk ticket 11999) that the value in the port number field, in the batch export config screen, can be changed unintentionally by scrolling with the mouse wheel. This PR is to prevent that by changing the field type from number to tel.

Changes

Changed field type from number to tel on line 371 of frontend/src/scenes/batch_exports/BatchExportEditForm.tsx

Before: before-number

After: CleanShot 2024-05-02 at 14 21 16

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Tested on my local (see the 'after' gif above)

Note

Codespaces became displeased with the branch I used for PR https://github.com/PostHog/posthog/pull/22051, hence this new PR from a new branch.

slshults avatar May 10 '24 22:05 slshults

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.

posthog-bot avatar May 20 '24 07:05 posthog-bot

@slshults

Twixes avatar May 20 '24 19:05 Twixes

@slshults

Thanks for the ping @Twixes . this is still on my radar, but I am currently prioritizing responding to support tickets which have been waiting too long for replies since we were on our offsite.

slshults avatar May 20 '24 19:05 slshults

Size Change: -14.6 kB (-1.39%)

Total Size: 1.03 MB

Filename Size Change
frontend/dist/toolbar.js 1.03 MB -14.6 kB (-1.39%)

compressed-size-action

github-actions[bot] avatar May 23 '24 23:05 github-actions[bot]

This PR caused the port number to now be sent as a string, which means batch exports for postgres are failing to create as they expect an int. Typescript is fun!

tomasfarias avatar May 31 '24 15:05 tomasfarias