For our project requirement we need to overlay experience fragment(/libs/cq/experience-fragments/editor/components/experiencefragment) component. Now when we add this experience fragment component on the page and author experience fragment variation path which is not published, it should open a popup which displays the fragment which are not published same as dam assets when referred on the page(as shown in below screenshot). But in our case, page is published without popup.
What code changes have you tried. Can you post the starting point of the changes you have implemented so community can suggest how best to implement. This is a very specific customization (without any docs) and in order for members to understand what you are trying to do - the code should be posted too.