I am struggling with this same issue. I'd prefer no to rewrite the identify logic, as there are many layer types already supported by the default behavior. There must be a mechanism for changing this so the popup respects it but I have yet to find it. I will post here if I stumble across a solution.