question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

toggle display instead of show + hide display

See original GitHub issue

May i make a quick suggestion about a design choice I’ve seen in the repo? I’ve noticed that whenever we need to show/hide some gui, the interface has tended to use two commands, e.g. show formatters and hide formatters. May i suggest that we try to use just one command instead, e.g., toggle formatters (or formatter display etc)?

The main reason is that the fewer the number of voice commands one has to remember, the better. But this may just be a purely stylistic preference.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
knausj85commented, Sep 7, 2020

I’ve moved everything I can to this approach. I chose not to use toggle here since I personally find “toggle” tiresome.

running list: user.switcher_toggle_running()
format help: user.formatters_help_toggle()
format recent: user.formatters_recent_toggle()
command history: user.history_toggle()
``
0reactions
knausj85commented, Jun 12, 2020

Fwiw I do hesitate to support both in any single app, at least in my depot, just so the grammar is kept small.

Read more comments on GitHub >

github_iconTop Results From Across the Web

button toggle display show hide - javascript - Stack Overflow
Try with the following code: #first{ display: block; /* <--- change */ } #second { display: none; } const firstDiv = document.
Read more >
How To Toggle Between Hiding And Showing an Element
Toggle between hiding and showing an element with JavaScript. Toggle Hide and Show. Click the button! Toggle (Hide/Show) an Element. Step 1) Add...
Read more >
Toggle (Show/Hide) Element - JavaScript - CSS-Tricks
Instead of using visibility:hidden, use display:none; so this by default hide you'r element, and create such animation that can slideToggle ...
Read more >
Hide and Show Div / Element using JavaScript Css - YouTube
Web/Fullstack Development Tutorial: Hide and Show Div using JavaScript & Css#hideshow #javascript # toggle ...
Read more >
jQuery using the show, hide and toggle effects - YouTube
The show and hide effects allow you to quickly control the CSS display property on elements using jQuery, this allows you to tie...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found