ryanpcmcquen / obsidian-focus-mode

Add focus mode to Obsidian.
Mozilla Public License 2.0
68 stars 7 forks source link

Bug in correlation with ObsidianTabs Plugin #12

Closed tim-hilde closed 3 years ago

tim-hilde commented 3 years ago

Using version 1.4.1 in contrast to 1.4.0 leads to a bug in the tab bar. The video shows it quite nicely.

https://user-images.githubusercontent.com/44113468/119495915-398ebd80-bd63-11eb-8e8b-99fa5f95d440.mov

ryanpcmcquen commented 3 years ago

Darn, the 1.4.1 changes fixed the issues with the California Coast theme. Maybe @AidenLx has some ideas here as well.

aidenlx commented 3 years ago

This may not be an issue with California Coast. What plugin are you using for tab bar?

tim-hilde commented 3 years ago

I'm using the Obsidian Tabs plugin

ryanpcmcquen commented 3 years ago

@tim-hilde have you created an issue against that plugin for this? I think they are doing some weird parsing if our CSS changes are breaking things ...

tim-hilde commented 3 years ago

Not yet, as the bug came up only after your 1.4.1 version

ryanpcmcquen commented 3 years ago

@AidenLx would switching back to the app container break your fixes for California Coast?

shaggyfeng commented 3 years ago

I love Focus Mode. But this is happening in all the Topaz themes as well, when multiple tabs are opened.

ryanpcmcquen commented 3 years ago

The weird thing is that we really only adjust CSS with this plugin. So I'm not sure what the tabs plugin is parsing to produce this ...

aidenlx commented 3 years ago

It seems that the plugin in changing the style of workleaf itself into tab…will have to look into this

ryanpcmcquen commented 3 years ago

Can everyone try 1.5.0?

aidenlx commented 3 years ago

I've tried, not the problem of app container. It still behaves as before.

image

seems that the view-header should not be hidden, and when tab plugin enabled, only activeleaf is shown: image

shaggyfeng commented 3 years ago

It is still happening in 1.5.0

Can everyone try 1.5.0?

ryanpcmcquen commented 3 years ago

It is still happening in 1.5.0

Can everyone try 1.5.0?

Thanks for checking it out. Does 1.4.0 still work as expected? Does it affect 'Focus Mode' and 'Super Focus Mode'?

shaggyfeng commented 3 years ago

It is still happening in 1.5.0

Can everyone try 1.5.0?

Thanks for checking it out. Does 1.4.0 still work as expected? Does it affect 'Focus Mode' and 'Super Focus Mode'?

1.4.0 works without the issue.

aidenlx commented 3 years ago

It is still happening in 1.5.0

Can everyone try 1.5.0?

Thanks for checking it out. Does 1.4.0 still work as expected? Does it affect 'Focus Mode' and 'Super Focus Mode'?

1.4.0 works without the issue.

How does it look like when in 1.4.0?

ryanpcmcquen commented 3 years ago

It is still happening in 1.5.0

Can everyone try 1.5.0?

Thanks for checking it out. Does 1.4.0 still work as expected? Does it affect 'Focus Mode' and 'Super Focus Mode'?

1.4.0 works without the issue.

Is the issue present in Normal and Super modes?

shaggyfeng commented 3 years ago

It is still happening in 1.5.0

Can everyone try 1.5.0?

Thanks for checking it out. Does 1.4.0 still work as expected? Does it affect 'Focus Mode' and 'Super Focus Mode'?

1.4.0 works without the issue.

Is the issue present in Normal and Super modes? 1 4 0-focus mode 1 4 0-focus mode (good)


1 4 0-super fm 1 4 0-super fm (good)


1 5 0-focus mode 1 5 0-focus mode (has issue)


1 5 0-super fm 1 5 0-super fm (good)

ryanpcmcquen commented 3 years ago

So the issue is only present in normal mode. That should help debugging, thanks for checking!

aidenlx commented 3 years ago

It's fixed in #13. for anyone who need to patch themselves, here are the css snippet:

.focus-mode.plugin-tabs .stayopen div.view-header {
  display: none;
}
.focus-mode.plugin-tabs div.view-header {
  display: flex;
}
.focus-mode.plugin-tabs div.view-actions {
  display: none;
}

I personally use the following code in my fork, which will show the title and index for activeLeaf:

.focus-mode.plugin-tabs .stayopen div.view-header > :not(.view-header-title-container) {
  display: none;
}
.focus-mode.plugin-tabs div.view-header {
  display: flex;
}
.focus-mode.plugin-tabs div.view-actions {
  display: none;
}
ryanpcmcquen commented 3 years ago

The fix will land in 1.6.0 tomorrow. Thank you @AidenLx!

ryanpcmcquen commented 3 years ago

Upstream beat me to a fix, but then they reverted. So I re-reverted the revert? Unreverted? I have no idea what I am saying, but 1.6.0 is out now with @AidenLx's awesome fix!

tim-hilde commented 3 years ago

Sad to say it, but the bug is back again in 0.12.5...

ryanpcmcquen commented 3 years ago

I think the Tabs plugin may need to implement their fix too.