Skip to content

Turn off undo/redo by default in Dash 1.0 #234

Closed

Description

@Moisan

The current solution to remove the undo-redo button is to change the css of the page to hide it while using a hosted css file.

It would be much simpler to have an option that toggles this button, a bit like the graph toolbar.

Activity

  1. charleyferrari commented on Apr 30, 2018

    @charleyferrari

    @Moisan Thanks for writing in. This seems like a good feature to have within Dash. Adding some tags to encourage some discussion and collaboration.

  2. ebber commented on May 16, 2018

    @ebber

    Would very much appreciate this feature as well. I am having trouble using the workaround. While I will be able to do it, it seems like a useful feature to be able to config, rather than making messy code.

  3. radekwlsk commented on Aug 3, 2018

    @radekwlsk

    Is conditionally removing <Toolbar/> from

    function UnconnectedAppContainer() {
        return (
            <Authentication>
                <div>
                    <Toolbar/>
                    <APIController/>
                    <DocumentTitle/>
                    <Loading/>
                </div>
            </Authentication>
        );
    }

    in dash-renderer/src/AppContainer.react.js enough to get rid of it without breaking other things?

  4. Myijin commented on Oct 17, 2018

    @Myijin

    The undo button does not change anything for my dash app, which has input box and button.
    My function looks like this:

    @app.callback(Output('Docs', 'children'),
                  [Input('button', 'n_clicks')],
                  [State('input', 'value')])
    def clean_data(n_clicks, input):
         if n_clicks is not None and input is not None:
                return ...
    

    For example, I enter “A” in the input box and click the button, then enter “B” in the input box and click the button. Then clicking undo nothing is changed. I am hoping that the undo can go back to the result for “A”.

  5. rmarren1 commented on Oct 19, 2018

    @rmarren1
    Contributor

    @Myijin I think this issue describes the behavior you are talking about plotly/dash-renderer#66, does that sound right?

  6. Myijin commented on Oct 19, 2018

    @Myijin

    @rmarren1 That's right. When I only use the input box, the undo can go back to previous input. But it's not working after using button.

  7. rmarren1 commented on Oct 19, 2018

    @rmarren1
    Contributor

    @Myijin Okay, I have a PR to fix this that is ready but have not merged, I'll see if I can expedite that

  8. vanbenschoten commented on Oct 19, 2018

    @vanbenschoten

    Is there any update on an easy option to remove the Undo-Redo button? I'll add my support for an easy toggle option as the button currently gets in the way of our dashboards.

  9. T4rk1n commented on Oct 19, 2018

    @T4rk1n
    Contributor

    Include a css file in the assets folder with this:

    ._dash-undo-redo {
      display: none;
    }
    
  10. vanbenschoten commented on Oct 19, 2018

    @vanbenschoten

    @T4rk1n thanks! That took care of the issue (though I still think a toggle feature would be helpful as well)

  11. eddy-ojb commented on Nov 11, 2018

    @eddy-ojb

    I would like the undo-button but have no control over where it is displayed. For example, I don't want its position fixed but would like it as part of my menu bar as a relative element. A better feature would be to be able to supply positional css straight to the element, including display: none.

  12. Akronix commented on Nov 14, 2018

    @Akronix
    Contributor

    I would like the undo-button but have no control over where it is displayed. For example, I don't want its position fixed but would like it as part of my menu bar as a relative element. A better feature would be to be able to supply positional css straight to the element, including display: none.

    hmm What's wrong with using the ._dash-undo-redo css class and add your desired custom style into your css stylesheet?

  13. self-assigned this
    on Nov 29, 2018
  14. changed the title [-]Add an option to remove the undo-redo button.[/-] [+]Turn off undo/redo by default in Dash 1.0[/+] on Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions