core-4212 refactor sharing dialog