Add a snippet window based on ui