-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Change layout depending on available space #454
Conversation
Hi @crswll , you can provide a gif to demonstrate the behavior? |
Thanks for your PR @crswll 👍 |
No problem! I'm happy to help. I didn't do it with media queries out of personal preference. There's was too many times in devtools I'd want a wide view but then it'll turn into two columns instead of one before i changed the "Panel Layout" setting. I wonder if I can read that setting and honor it and use media queries if it's set to auto. Feel all right about that? |
Why not, we can try a 3-state button with h/v/auto then. It would be auto by default. |
Oh no I meant just getting the setting directly from Chrome devtools so I'd remove the button all together and change a class based on that setting. If it's auto it's responsive, otherwise fixed in one direction or the other. |
Oh okay 👍 |
I gave it a quick look and a long Google but I don't think that setting is exposed like the theme unfortunately. Any of you know if this setting is exposed?
I'll go with the 3-state button if there's no luck here. |
I'm finally getting around to this and not digging a three state button. I'm just going to use a media query and have it work "auto" until I figure out how to read that setting and honor that. |
Ok, now 2 columns when we have over 685px, which is the breakpoint Chrome devtools seems to use. Also using |
src/devtools/App.vue
Outdated
@@ -31,11 +31,10 @@ | |||
<span class="pane-name">Events</span> | |||
<span class="event-count" v-if="newEventCount > 0">{{ newEventCount }}</span> | |||
</a> | |||
<a class="button refresh" | |||
<a class="button refresh icon-only" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why setting icon only here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the button that toggles the layout and that had it as well. I can change this to a specific class and remove this more utilitarian class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, we can make the Refresh button normal (by removing this class) now that you removed the other icon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right. It's been removed along with the extra class.
Adding the ability to split the panes horizontally or vertically based on the users preference.