Skip to content
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

add minimizable console #330

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Ben-Owen-3183
Copy link

@Ben-Owen-3183 Ben-Owen-3183 commented Aug 3, 2023

Aug-08-2023 17-28-00

The web console should offer the option to be minimized, as its current placement obstructs the user interface. The need to repeatedly close the console upon each page reload is frustrating. Similarly, commenting it out proves to be a hassle, especially when it's required later, necessitating a the user to work to get the page to state in which they want to use the console.

  • Simple miniizable console that can be toggle on and off.
  • Uses cookies to remember after a page refresh.
  • changed the z-index of the console so that it is the highest possible value. As this is a dev tool, it surely should sit above anything else on the site. In the event that it blocks something it can always be minimized or closed completly.

@rafaelfranca
Copy link
Member

Could you post why this feature it needed and a GIF on how it works?

var isMinimized = container.style.display === 'none'
container.style.display = isMinimized ? 'block' : 'none';
minimizedConsole.style.display = isMinimized ? 'none' : 'block';
_this.setCookie('console_minimized', isMinimized ? 'false' : 'true', 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use this.commandStorage (a Local Storage backed store) instead of a cookie?

Copy link
Author

@Ben-Owen-3183 Ben-Owen-3183 Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I am honest, I am not sure without looking into how it works in full. It clearly persists as the console remembers stuff after a page refresh, I just don't know if I can wack anything into it.

Also, If this pr gets accepted, I actually would like to do more with the front end regarding remembering console height. position, text size and perhaps even some simple styling options such as opacity to see behind the console. If command storage can support that then I don't see why not.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, it's a wrapper for the native LocalStorage browser API. All modern browsers supports it.

To be even more honest, our frontend has been neglected for years, a clean slate rewrite can be the best thing I do. There is no need on the Action View dependency as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants