PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
21.26k stars 1.26k forks source link

[Bug] Page doesn't jump to error when an error is encountered during saving (cohorts) #18620

Open annikaschmid opened 10 months ago

annikaschmid commented 10 months ago

How to replicate:

  1. Make a mistake below the fold of the cohort page, e.g. create a criteria group that only includes the criteria 'is not in cohort'
  2. Click save
  3. The site feels like it didn't react at all, if you scroll further down you can see that there is an inline error
sksDonni commented 10 months ago

@annikaschmid, wanted to see if I can take this up and help out here

neilkakkar commented 10 months ago

Hey @sksDonni , no need to ask, just go for it :)

sksDonni commented 10 months ago

Thanks @neilkakkar! @annikaschmid, wanted to know if this here is fine or would you like the screen to scroll to the error?

https://github.com/PostHog/posthog/assets/53624363/054c12e3-6978-4743-8413-5d94bc8be9b7

neilkakkar commented 10 months ago

scrolling is ideal :) - also if you click the 'save' button again, it does nothing (no toast either), which makes it seem like nothing is happening

neilkakkar commented 10 months ago

oh wait, you added the toast, this is good enough for a start I'd say :) toast is better than no response

sksDonni commented 10 months ago

Yeah I added the toast. Should I raise a PR then?

neilkakkar commented 10 months ago

yep