Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Full-blown pinning #43

Open
brettz9 opened this issue Dec 11, 2017 · 9 comments
Open

Full-blown pinning #43

brettz9 opened this issue Dec 11, 2017 · 9 comments

Comments

@brettz9
Copy link

brettz9 commented Dec 11, 2017

When I have a lot of tabs open, the "pinned" tabs go out of view. It'd be nice if some fixed styling could be applied to ensure the pinned ones always stay in view (as in the browser)...

@ericcornelissen
Copy link
Owner

Interesting 🤔 I've never run into a situation where I had that many tabs open, good suggestion tho!

@ericcornelissen
Copy link
Owner

ericcornelissen commented Dec 19, 2017

@brettz9, what theme (or maybe packages/config) are you using? I'm not able to replicate the issue with the theme One Dark/Light, Atom Material nor Atom Dark/Light. At least, that is for the default pinning, for the Visual Studio style pinning I can replicate the issue

@brettz9
Copy link
Author

brettz9 commented Dec 19, 2017

I'm using One Dark for both UI Theme and Syntax Theme. (I just have one other non-core theme, a syntax theme, cake-syntax). I do also have my custom stylesheet: https://gist.github.com/brettz9/40539d3feff7ee81126a

@ericcornelissen
Copy link
Owner

Alright 🤔 Just to be clear, are you using Visual Studio style pinned tabs?

@brettz9
Copy link
Author

brettz9 commented Dec 19, 2017

Nope.

@ericcornelissen
Copy link
Owner

I managed to reproduce it now (although I needed more tabs then there are files in this project 😅)

The first thing I would like to note is that One Dark itself does not even seem to have a good solution for this, tabs are just pushed outside of the window and you can only get them back by opening the file again...


But on topic, I'm not yet sure how this should be implemented. I guess you imagined something like the image ⬇️?

I don't think using position: absolute; for pinned tabs is going to work out in a nice way. Another possible solution could be to insert a grouping div in (or possible before) the .tab-bar and let the pinned tabs life there, but I'm not sure if that is compatible with Atom 🤔

image

Do you have any ideas/suggestions @brettz9 ?

@brettz9
Copy link
Author

brettz9 commented Dec 20, 2017

Yes, like that image, if the mail icon on the left is a pinned tab.

In the developer tools, I got something roughly working. I didn't get it exactly working, as I don't know how it fits in with your extension and maybe you have reasons this kind of approach wouldn't work.

For the tab-bar <ul>, I put the following style attribute:

position: fixed; left: 400px; top: 25px; z-index: 1; overflow: auto; width: 700px;

For a pinned tab, I added:

position: fixed; left: 335px; top: 25px; z-index: 1; background-color: red;

I don't know if this can practically be computed with getComputedStyles or what not, fixed is I think more of what I think is needed here... (though I could be wrong as CSS is not my forte)

ericcornelissen added a commit that referenced this issue Dec 20, 2017
Related to #43. When using VS style pinned tabs, the pinned tabs now
have a (configurable) minimum width, so they maintain a certain
precedence when there is an overflow of tabs in the tab-bar.
@ericcornelissen
Copy link
Owner

That doesn't look very much like it is easily compatible with different setups 😅 I will see if I can get anything working though 👍

@brettz9
Copy link
Author

brettz9 commented Dec 26, 2017

Thanks... But please don't exert too much over this. Tab overflow doesn't happen that frequently for me. It will happen even less if I can use Save Workspace, but there is currently some kind of conflict with your extension which I've reported at denieler/save-workspace-atom-plugin#23 (and it also doesn't remember the pinned state).

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

No branches or pull requests

2 participants