-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workflow control #29
Comments
maybe this will help? I’ve used it often with buttons:
https://stackoverflow.com/questions/3710114/jquery-enabling-and-disabling-dom-elements-without-removing
… On May 5, 2019, at 9:56 AM, David Beck ***@***.***> wrote:
Hi, Paul
So I've figured out how to write a callback that can check the hidden storage for a given disclosure element and see how the callbacks to each disclosure element could be made to change the value of the hidden storage element in the next disclosure element in the workflow sequence. What I haven't been able to figure out is how to disable the expansion of an element that the user isn't ready to access. There seems to be no "disabled" property for these things and doing something like closing the off-limits elements when the user tries to open them seems awkward (and setting the "open" attribute via the callback doesn't seem to have any effect, anyhow, so maybe the callback passes the signal on to whatever toggles the element?).
The solution that I can think of would be to defer constructing the contents of the disclosure elements until they are ready to be used, something like what already happens with the tier mapping. I wanted to check with you though, before undertaking something like that. I seems to me it might be a major restructuring of the app.
David
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
sorry - I forgot Dash does not give easy means to run javascript in the client.
How about this?
https://community.plot.ly/t/how-to-disable-html-button/9859
https://community.plot.ly/t/disable-a-component/9437
plotly/dash-html-components#32
Maybe that which works for button also works for the disclosure element?
… On May 5, 2019, at 11:07 AM, Paul Shannon ***@***.***> wrote:
maybe this will help? I’ve used it often with buttons:
https://stackoverflow.com/questions/3710114/jquery-enabling-and-disabling-dom-elements-without-removing
> On May 5, 2019, at 9:56 AM, David Beck ***@***.***> wrote:
>
> Hi, Paul
>
> So I've figured out how to write a callback that can check the hidden storage for a given disclosure element and see how the callbacks to each disclosure element could be made to change the value of the hidden storage element in the next disclosure element in the workflow sequence. What I haven't been able to figure out is how to disable the expansion of an element that the user isn't ready to access. There seems to be no "disabled" property for these things and doing something like closing the off-limits elements when the user tries to open them seems awkward (and setting the "open" attribute via the callback doesn't seem to have any effect, anyhow, so maybe the callback passes the signal on to whatever toggles the element?).
>
> The solution that I can think of would be to defer constructing the contents of the disclosure elements until they are ready to be used, something like what already happens with the tier mapping. I wanted to check with you though, before undertaking something like that. I seems to me it might be a major restructuring of the app.
>
> David
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Unfortunately, the <disabled> property doesn’t apply to <details>. I’ve managed to plug an eternal javascript into a baby Dash app, but I can’t seem to make it add an event listener to a details component, let alone change that component’s properties. As you say, there isn’t a easy way to run the javascript in the Dash app, other than when the window loads.
David
… On May 5, 2019, at 12:16 PM, Paul Shannon ***@***.***> wrote:
sorry - I forgot Dash does not give easy means to run javascript in the client.
How about this?
https://community.plot.ly/t/how-to-disable-html-button/9859
https://community.plot.ly/t/disable-a-component/9437
plotly/dash-html-components#32
Maybe that which works for button also works for the disclosure element?
> On May 5, 2019, at 11:07 AM, Paul Shannon ***@***.***> wrote:
>
> maybe this will help? I’ve used it often with buttons:
>
>
> https://stackoverflow.com/questions/3710114/jquery-enabling-and-disabling-dom-elements-without-removing
>
>
> > On May 5, 2019, at 9:56 AM, David Beck ***@***.***> wrote:
> >
> > Hi, Paul
> >
> > So I've figured out how to write a callback that can check the hidden storage for a given disclosure element and see how the callbacks to each disclosure element could be made to change the value of the hidden storage element in the next disclosure element in the workflow sequence. What I haven't been able to figure out is how to disable the expansion of an element that the user isn't ready to access. There seems to be no "disabled" property for these things and doing something like closing the off-limits elements when the user tries to open them seems awkward (and setting the "open" attribute via the callback doesn't seem to have any effect, anyhow, so maybe the callback passes the signal on to whatever toggles the element?).
> >
> > The solution that I can think of would be to defer constructing the contents of the disclosure elements until they are ready to be used, something like what already happens with the tier mapping. I wanted to check with you though, before undertaking something like that. I seems to me it might be a major restructuring of the app.
> >
> > David
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub, or mute the thread.
> >
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#29 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AKN4HBTR2KB2BKM237Y3Q6LPT4P6HANCNFSM4HK3V2LA>.
|
I think maybe I’ll just work on enabling buttons in the correct sequence instead of messing around with the disclosures. Even if we figure it out, it’s a lot of head-banging-against-the-wall time for relatively little return.
David
… On May 5, 2019, at 2:36 PM, David Beck ***@***.***> wrote:
Unfortunately, the <disabled> property doesn’t apply to <details>. I’ve managed to plug an eternal javascript into a baby Dash app, but I can’t seem to make it add an event listener to a details component, let alone change that component’s properties. As you say, there isn’t a easy way to run the javascript in the Dash app, other than when the window loads.
David
> On May 5, 2019, at 12:16 PM, Paul Shannon ***@***.*** ***@***.***>> wrote:
>
> sorry - I forgot Dash does not give easy means to run javascript in the client.
>
> How about this?
>
> https://community.plot.ly/t/how-to-disable-html-button/9859 <https://community.plot.ly/t/how-to-disable-html-button/9859>
> https://community.plot.ly/t/disable-a-component/9437 <https://community.plot.ly/t/disable-a-component/9437>
> plotly/dash-html-components#32 <plotly/dash-html-components#32>
>
> Maybe that which works for button also works for the disclosure element?
>
> > On May 5, 2019, at 11:07 AM, Paul Shannon ***@***.*** ***@***.***>> wrote:
> >
> > maybe this will help? I’ve used it often with buttons:
> >
> >
> > https://stackoverflow.com/questions/3710114/jquery-enabling-and-disabling-dom-elements-without-removing <https://stackoverflow.com/questions/3710114/jquery-enabling-and-disabling-dom-elements-without-removing>
> >
> >
> > > On May 5, 2019, at 9:56 AM, David Beck ***@***.*** ***@***.***>> wrote:
> > >
> > > Hi, Paul
> > >
> > > So I've figured out how to write a callback that can check the hidden storage for a given disclosure element and see how the callbacks to each disclosure element could be made to change the value of the hidden storage element in the next disclosure element in the workflow sequence. What I haven't been able to figure out is how to disable the expansion of an element that the user isn't ready to access. There seems to be no "disabled" property for these things and doing something like closing the off-limits elements when the user tries to open them seems awkward (and setting the "open" attribute via the callback doesn't seem to have any effect, anyhow, so maybe the callback passes the signal on to whatever toggles the element?).
> > >
> > > The solution that I can think of would be to defer constructing the contents of the disclosure elements until they are ready to be used, something like what already happens with the tier mapping. I wanted to check with you though, before undertaking something like that. I seems to me it might be a major restructuring of the app.
> > >
> > > David
> > >
> > > —
> > > You are receiving this because you are subscribed to this thread.
> > > Reply to this email directly, view it on GitHub, or mute the thread.
> > >
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub, or mute the thread.
> >
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub <#29 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AKN4HBTR2KB2BKM237Y3Q6LPT4P6HANCNFSM4HK3V2LA>.
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, Paul
So I've figured out how to write a callback that can check the hidden storage for a given disclosure element and see how the callbacks to each disclosure element could be made to change the value of the hidden storage element in the next disclosure element in the workflow sequence. What I haven't been able to figure out is how to disable the expansion of an element that the user isn't ready to access. There seems to be no "disabled" property for these things and doing something like closing the off-limits elements when the user tries to open them seems awkward (and setting the "open" attribute via the callback doesn't seem to have any effect, anyhow, so maybe the callback passes the signal on to whatever toggles the element?).
The solution that I can think of would be to defer constructing the contents of the disclosure elements until they are ready to be used, something like what already happens with the tier mapping. I wanted to check with you though, before undertaking something like that. I seems to me it might be a major restructuring of the app.
David
The text was updated successfully, but these errors were encountered: