roovo / obsidian-card-board

An Obsidian plugin to make working with tasks a pleasure (hopefully anyway).
MIT License
494 stars 21 forks source link

Obsidian Stacked Tabs effects Cardboard Tabs -> makes them hard to read! #186

Open dixonge opened 9 months ago

dixonge commented 9 months ago

I'm not sure what happened, but the tabs of different cardboard boards have minimized and the only thing visible is the first letter of the name. How can I expand these back to the default view?

SCR-20231212-fwav

roovo commented 9 months ago

hmm, the only thing I can think of that may be causing this is a theme which has some effect on how tabs are displayed in obsidian - or I guess a css snippet could be the cause too. It looks like whatever it is that is doing this has rotated the text in the tab header by 90°.

So, do you have any css snippets enabled, are you using a theme and if so does this problem persist if you enable/disable these?

dixonge commented 9 months ago

No snippets or themes installed, all are at default settings. I have turned off all community plugins and nothing changes.

dixonge commented 9 months ago

Obsidian v 1.4.16 if that helps

roovo commented 9 months ago

still none the wiser I'm afraid - just tried with v 1.4.16 and all looks fine for me. Are you on windows ? (I'm mac based...)

Next thing I can think of -> could you make a minimal vault which has this issue, zip the vault and add it to this Issue? ...so I can see if it happens for me too using the same vault file....

dixonge commented 9 months ago

I'm on a Mac. Switched to a different 'folder as vault' and added plugins one-by-one, matching my MacBook Air. Could never get the tabs to collapse like they were!

Current Plugins (on a computer that has the problem)

CORE:

Backlinks Canfas Command palette Daily notes File recovery Note composer Page preview Quick switcher Templates

COMMUNITY:

Advanced URI Buttons CardBoard Consistent Attachments and Links DataLoom Dataview Homepage Icon Shortcodes Importer Obsidian Git Obsidian Tabs Pane Relief Templater TimeStamper Unique attachments

roovo commented 9 months ago

Arggghhh, I guess you could try a bit of detective work if you know your way around css and brower developer tools....

If you toggle the developer tools in the obsidian view menu (or use Option-Command-i ) for the problem vault you should be able to see what it is that is styling the tab item. There has to be some css somewhere that it doing something like transforming the text in the header as it looks to be rotated through 90°. Screenshot 2023-12-30 at 21 51 04

dixonge commented 9 months ago

coming from here it looks like:

.workspace .mod-root .workspace-tabs.mod-stacked .workspace-tab-container .workspace-tab-header { width: var(--tab-stacked-header-width); writing-mode: var(--tab-stacked-text-writing-mode); text-orientation: sideways; background-color: var(--background-primary); padding: 0; border-radius: 0; box-shadow: -1px 0 0 0 var(--tab-outline-color), var(--tab-stacked-shadow); --no-tooltip: true; }

If you uncheck writing-mode and width items it fixes the orientation. Coming from app.css file.

dixonge commented 9 months ago

OK NEVER MIND! The clue is right there in the CSS.

SCR-20231230-rysl

That was it. Sorry!

roovo commented 9 months ago

Thanks for the updates and great to know what it actually was!

I've never used stacked tabs so didn't realise it would have the effect that it does. It is happening as I am using the same styling for tabs as Obsidian does for it's main tabs, but only at a basic level - so there is no concept of stacked tabs within Cardboard - hence it doing a half baked job which results in what you have seen/experienced.

It is definately something to ponder - should I support tab stacking within the cardboard window or should I ensure that the styling within it isn't affected by using stacked tabs in Obsidian itself?

I will re-open this to keep it in the backlog as it is undesirable behaviour - perhaps I'll rename it to reflect that it is a stacked tab related issue.

Really appreciate you spending the time to look at this. Have a good 2024!