paul-shannon / slexil

Software Linking Elan Xml to Illuminated Language
MIT License
0 stars 1 forks source link

workflow control #29

Closed davidjamesbeck closed 5 years ago

davidjamesbeck commented 5 years ago

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

paul-shannon commented 5 years ago

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 notifications@github.com 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.

paul-shannon commented 5 years ago

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 https://github.com/plotly/dash-html-components/issues/32

Maybe that which works for button also works for the disclosure element?

On May 5, 2019, at 11:07 AM, Paul Shannon notifications@github.com 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 notifications@github.com 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.

davidjamesbeck commented 5 years ago

Unfortunately, the property doesn’t apply to

. 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 notifications@github.com 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 https://github.com/plotly/dash-html-components/issues/32

Maybe that which works for button also works for the disclosure element?

On May 5, 2019, at 11:07 AM, Paul Shannon notifications@github.com 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 notifications@github.com 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 https://github.com/paul-shannon/slexil/issues/29#issuecomment-489450007, or mute the thread https://github.com/notifications/unsubscribe-auth/AKN4HBTR2KB2BKM237Y3Q6LPT4P6HANCNFSM4HK3V2LA.

davidjamesbeck commented 5 years ago

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 dbeck@ualberta.ca wrote:

Unfortunately, the property doesn’t apply to

. 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 <notifications@github.com mailto:notifications@github.com> 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 https://github.com/plotly/dash-html-components/issues/32 https://github.com/plotly/dash-html-components/issues/32

Maybe that which works for button also works for the disclosure element?

On May 5, 2019, at 11:07 AM, Paul Shannon <notifications@github.com mailto:notifications@github.com> 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 <notifications@github.com mailto:notifications@github.com> 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 https://github.com/paul-shannon/slexil/issues/29#issuecomment-489450007, or mute the thread https://github.com/notifications/unsubscribe-auth/AKN4HBTR2KB2BKM237Y3Q6LPT4P6HANCNFSM4HK3V2LA.