WIP: support popup from top and bottom