Identity is some defining characteristic--it can be a big thing or a little one, though I suspect its importance to one's sense of self or to others is a matter of how important that characteristic is to society as a whole. Ours is a society in which gender is a hugely defining characteristic, along with parenthood, and age. Sharing any of these characteristics, though, doesn't make for a community. It makes for an affinity group.
Affinity groups do not assume that each person present has had the same experiences around the shared identity. Likewise, they do not assume that each person will feel the same level of comfort, pride, or acceptance of that identity, particularly if the identity is one which is targeted by society for violence, the deprivation of civil rights, and other types of oppression.
So what is community, then? Community is intentional. Community is built and requires work on the part of its members for its growth and healthiness.
To be continued.