Commit dd152902 authored by Duggan, John's avatar Duggan, John
Browse files

Resolve "RemoteFileInput filtering glitch"

parent e36e7fa7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
### nova-trame, 0.18.2

* Passing a string to the style parameter to GridLayout, HBoxLayout, and VBoxLayout will no longer cause Trame to crash (thanks to John Duggan).
* WebAgg-based Matplotlib figures are no longer automatically scrolled to on page load (thanks to John Duggan).
* RemoteFileInput will no longer attempt to navigate to another directory after the filtering text field loses focus. The compact UI for this widget has also been updated (thanks to John Duggan).

### nova-trame, 0.18.1

+6 −4
Original line number Diff line number Diff line
@@ -100,6 +100,10 @@ class RemoteFileInput:
                **self.input_props,
            ),
        ) as input:
            if isinstance(input.classes, str):
                input.classes += " nova-remote-file-input"
            else:
                input.classes = "nova-remote-file-input"
            self.vm.init_view()

            with vuetify.Template(v_slot_append=True):
@@ -110,13 +114,11 @@ class RemoteFileInput:
                        v_model=self.vm.get_dialog_state_name(), activator="parent", **self.dialog_props
                    ):
                        with vuetify.VCard(classes="pa-4"):
                            vuetify.VCardTitle(input.label)
                            vuetify.VTextField(
                                v_model=self.vm.get_filter_state_name(),
                                classes="mb-4 px-4",
                                label="Current Selection",
                                __events=["change"],
                                change=(self.vm.select_file, "[$event.target.value]"),
                                label=input.label,
                                variant="outlined",
                                update_modelValue=(self.vm.filter_paths, "[$event]"),
                            )

+2 −1
Original line number Diff line number Diff line
@@ -123,7 +123,8 @@ class MatplotlibFigure(matplotlib.Figure):
            with open(Path(css_path, fname)) as css_file:
                content = css_file.read()
                client.Style(content)
        client.Script(FigureManagerWebAgg.get_javascript())
        js = FigureManagerWebAgg.get_javascript()
        client.Script(js.replace("window.setTimeout(set_focus, 100);", "//"))

        MatplotlibFigure.mpl_initialized = True

+10 −0
Original line number Diff line number Diff line
@@ -47,6 +47,16 @@ html {
        border-radius: 4px;
    }

    .nova-remote-file-input {
        .v-input__append {
            margin-left: 0;
        }

        .v-btn {
            height: 30px;
        }
    }

    .v-tab.v-btn {
        height: 30px !important;
        min-width: fit-content !important;