Create a new popup widget
To be able to replace the find/replace dialog, the first step is to have a new widget, something similar to this:
Let's explore the Builder code, https://gitlab.gnome.org/GNOME/gnome-builder, and see if we can copy that widget to our source code base.