format sidebar active state