Dialogue Pop-up

A bit of context (because science): I have written a panel gui to reduce data gathered with an instrument, and I am repeating the process for different instrument. However, the new instrument is a bit more complex in terms of its detectors.
Currently I (and other users of the open source program) am able to just import raw data as a pandas dataframe and put it into a param dataframe just fine. However, for the updated version I need to be able to prompt the user to input their analytes and the detector type that measured that particular analyte. I’d like to generate a pop-up upon data upload in order to do this. I looked around a bit but could not find a straightforward way to do this and I’d prefer not to use css. Anyone able to point me in the right direction?

I am looking for something along the lines of:

    @pn.depends('file_path',watch=True)
    def _uploadfile(self):
        if self.file_path != 'Insert File Path':
            df = pd.read_excel(self.file_path,sheet_name='Data')
            self.input_data = df
            self.input_data.drop(self.input_data.index[0:75],axis=0)
            # begin where I am looking for help
            generate pop_up ....
            # end where I'm looking for a solution, continue data wrangling below

A point in the right direction would be greatly appreciated!

https://panel.holoviz.org/how_to/templates/template_modal.html
Likely: modal

As I dig into it more I see that I will need to use a template specifically, which I was attempting to avoid. Nevertheless thanks for the response!

1 Like

No problem. Out of curiosity, is there a specific reason not to use a template? Is it because it’s too bulky?

Hi @Lewisc2

If you need the flexibility of not using a template. For example in a notebook, you can use the panel-modal

panel-modal-intro

As Mark pointed out below, the reason is mainly that I wanted full autonomy. Modal was the answer as it turns out. Thanks a bunch.

2 Likes