posthog icon indicating copy to clipboard operation
posthog copied to clipboard

User properties table malformed

Open corywatilo opened this issue 3 years ago • 8 comments

There seems to be an issue with some nesting when viewing a user's properties.

Here's the example shown below

image

corywatilo avatar Jul 01 '22 03:07 corywatilo

It's "correct" in that all "key" columns are horizontally left-aligned & vertically middle-aligned. The fix is to top-align all the columns.

It's also not a CSS oneliner (vertical-align: top) since there will be some spacing inconsistencies when you compare properties that are tables or properties that are values.

Should definitely be fixed :)

mariusandra avatar Jul 01 '22 07:07 mariusandra

Is there any reason we wouldn't use nested tables for this scenario? In other similar scenarios, we use a table within a table to ensure that headers are shown and that each value is clearly labeled and understandable. As an example, data management does this for showing properties seen with an event.

clarkus avatar Jul 05 '22 17:07 clarkus

The columns are always key and value, so sub-tables might look very repetitive. I might give it a try as part of support later, but I'm afraid it's going to look visually messy... 🤔

mariusandra avatar Jul 06 '22 16:07 mariusandra

OK let me know if you want support on that. I was looking at this a bit yesterday and the vertical alignment will help a ton, but I also feel like the table row borders are a factor. This isn't a case handled in the lemon table components we have now, so I'm happy to draw some ideas for that if you think it's a good use of time.

clarkus avatar Jul 06 '22 16:07 clarkus

Here are some attempts at improving these tables without a lot of changes to the markup:

@clarkus are any of those worth implementing?

  1. How it is now localhost_8000_events_eventFilter=package json (5)

  2. Borders around tables localhost_8000_events_eventFilter=package json

  3. Borders around tables, header on subtables localhost_8000_events_eventFilter=package json (4)

  4. Borders and header on tables localhost_8000_events_eventFilter=package json (3)

I tried vertically top-aligning keys columns, but not sure if that improves anything:

  1. Top aligned headerful table localhost_8000_events_eventFilter=package json (6)

  2. Top aligned headerless table localhost_8000_events_eventFilter=package json (7)

mariusandra avatar Aug 25 '22 14:08 mariusandra

@mariusandra I think top-aligning the property key is worth trying. The other thing that makes this harder to scan is that amount of horizontal space between the key and the value. I've been working through some similar patterns for other more compact views. I did a quick redraw to illustrate what I'm trying to describe.

Generally what I'm proposing is:

  • Size the key column to be just wide enough to contain the largest string value in this column.
  • That will give most of the space in the table to the values, and in the case of nested key:value pairs, lots of space to show all that detail
  • Top-align the key to line up with the first value, or the first nested key:value sets.
  • I've also been using monospace fonts for the nested sets
Screen Shot 2022-08-25 at 10 45 45 AM

https://www.figma.com/file/rnaKSVMfWTcpX4cmDbvWsi/Data-Management-%26-Live-Events?node-id=13%3A1947

Thoughts?

clarkus avatar Aug 25 '22 17:08 clarkus

Seems like this can be improved mostly just by setting the horizontal padding for leftmost/rightmost columns to zero in those embedded tables.

Twixes avatar Aug 25 '22 18:08 Twixes

This issue hasn't seen activity in two years! If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in two weeks.

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

This issue was closed due to lack of activity. Feel free to reopen if it's still relevant.

posthog-bot avatar Sep 09 '24 07:09 posthog-bot