Skip to content

Non-expandable shared preferences items have misleading indentation #2

Description

@vanlooverenkoen

In the shared preferences viewer, non-expandable items visually appear to be at a different hierarchy level than expandable ones.

Current behaviour

The expand/collapse arrow on expandable items pushes their label to the right, while non-expandable items start at the left edge. This makes them look like they're at different hierarchy levels.

Example with this JSON:

{
  "user": { "name": "John", "age": 30 },
  "scheduledTrackAndTrace": "abc123",
  "settings": { "theme": "dark" },
  "trackAndTraceSchedule": "def456"
}

Current display:

▶ user                          <- expandable, indented by arrow
scheduledTrackAndTrace           <- no arrow, starts at left edge
▶ settings                      <- expandable, indented by arrow
trackAndTraceSchedule            <- no arrow, starts at left edge

It looks like scheduledTrackAndTrace and trackAndTraceSchedule are at a different nesting level than user and settings, even though they're all top-level keys.

Expected behaviour

Add consistent spacing for non-expandable items so all items at the same level are visually aligned:

▶ user                          <- expandable
   scheduledTrackAndTrace        <- aligned with expandable labels
▶ settings                      <- expandable
   trackAndTraceSchedule         <- aligned with expandable labels

Github reporter

@dumazy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions