pjeby / pane-relief

Obsidian plugin for per-pane history, pane movement/navigation hotkeys, and more
232 stars 6 forks source link

Trying to use pane-relief on my phone #49

Closed May2002 closed 1 year ago

May2002 commented 1 year ago

Hi, I tried to install this plugin on my android phone (so as to get sliding panes again), but all I got from the market is "this plug in does not support your device". I tried to install it from Github, but then I can't enable it (though the manifest states "isDesktopOnly": false). I tried to use the mobile logging plugin that was used last year on an Iphone to give you more details but I did not manage to use it. I don't know if it is still working and it is not just me or not.

I was so happy to get my panes sliding again :,( Is there something that can be done to make it work? Thanks for your attention...

May2002 commented 1 year ago

I tried with the 0.4.1 too, since it seemed to work in the #40 issue, but it still doen't work. I use obsidian 1.4.6 (105), which is the latest one.

pjeby commented 1 year ago

If the issue is that enabling the plugin says "failed to load", then there is likely an error in the console and I'd need to see that. If there is some other message, I need to know what it says.

May2002 commented 1 year ago

Thank you for your answer. No, I just can't push the toggle. There is no message at all when I try to enable it. The only message I get is from the marketplace, where it reads "this plugin does not support your device", and it repeats it on top when I try to install it. Sorry, but do you know how I can access the console to get the information? (I will try the Mobile Logging plugin again tomorrow)

pjeby commented 1 year ago

If the toggle is disabled then perhaps Obsidian is disallowing it. I don't know what you mean by "marketplace", though - I do not use Obsidian on any mobile device and have no idea how to do anything with it.

My suggestion would be to ask around on Discord (e.g. in a mobile-related channel) to see if anyone else has or has solved this problem or can help, as I cannot without additional information even know what is causing the problem.

Based on the available data, I would guess something has changed about Obsidian Mobile since the plugin itself has hardly changed at all. But what that something is or what needs to be done about it, I have no idea.

May2002 commented 1 year ago

Hi again, by "marketplace" I meant the community plugins store.

The obsidian console plugins seem out of reach for me (obsidian-mobile-console) or deprecated (obsidian-dev-tools).

I ended using this.app.emulateMobile(!this.app.isMobile); in the console in the windows desktop version with your plugin installed so as to emulate a mobile device. This is the error message I got when I tried to enable the plugin (and was successful doing so):

screenshot

Then I toggled the sliding panes. It visually worked but threw errors too, for a window larger than 600 pixels:

screenshot2 screenshot3

(and the sliding panes did not work at all if lower; I suppose this is the intended behavior).

Uninstalling and installing the plugin again without error, so maybe the emulation only concerns the .css layers.

I don't know if it helps or if I still have to go to the discord channel.

May2002 commented 1 year ago

(Maybe the emulator is lacking information on the device and these error are normal)

pjeby commented 1 year ago

So I've added a fix for the specific error above. Don't know if it'll do anything else, but you can see if it helps.

May2002 commented 1 year ago

Hi, thank you. I installed the new version, it fixes what showed in the desktop console during mobile app emulation. But it doesn't solve the can't install/can't enable issue on mobile. Somebody on Discord said it was the same for IOS. It will wait to see if I get a hint. Fingers crossed...

May2002 commented 1 year ago

I uninstalled the Obsidian app and installed the 1.4.2 (from Febrary 2023) and then even the 1.3.0 (from August 2022), hoping that I could enable the plugin and then update Obsidian... but it didn't work.

I went back to the current version, checked the manifest.json and found out that "isDesktopOnly": true so obviously it couldn't work. I had already checked this but it appears I got confused then. With the plugin manually installed and the line corrected I could enable it easily. Maybe it is the intended behavior and I should have known that.

Anyway, now it seems that the simple sliding panes feature doesn't work on a phone: I have 5 tab groups, some of them with several tabs, and with sliding panes enabled nothing seems to change, even with the default theme. :cry: Anyway, thank you for your attention.

pjeby commented 1 year ago

I'm not aware of anyone using sliding panes on a phone; to my knowledge the people interested in Pane Relief on mobile have mainly been tablet users. But in any case I have never used it there, so couldn't tell you if or how it works.

My guess though would be that the main issue is being able to scroll the groups - scrollbars on phones are tiny and it might not be obvious where the scroll thumb is. For sliding panes, it should be at the bottom of the workspace area though.

May2002 commented 1 year ago

The other day I saw the scrollbar disappear as soon as the window was less than 600 pix large when testing through mobile emulation on desktop. Obsidian itself might treat tabs differently then. As my screen is 1040 pixel large I was hoping it would work somehow (I'm just a naive user without any technical knowledge).

Apart from that I thickened the scrollbars via a .css snippet to be able to grab them despite the protecting case, so I'm quite sure there is no scroll thumb at all.

On the original sliding panes plugin I usually just swiped from one pane to another, that could have worked too. I'm very surprised to be the only one trying these things, that was so convenient for me!!!

pjeby commented 1 year ago

Well, if it works in the mobile emulation with the same screen size, but not on the phone, I'm not sure what to tell you. Did you try resizing to the same dimensions as your phone screen? Also, if you have css snippets active, are they the same snippets on phone and desktop?

pjeby commented 1 year ago

Btw, pixel sizes on phones and desktop may be different -- your 1040 may be treated as a smaller number for CSS purposes, if those are "retina" pixels (i.e. extra small). So if the 600px limit is relevant, your 1040 may actually be undersized for that.

Some further investigation of the 35 bits of code and 122 styles that are different when Obsidian believes it's on a "phone", reveals that there is styling that hides all the non-"visible" tab groups. It looks like you can override it with a CSS snippet like this:

.is-phone .mod-root.is-sliding .workspace-split:not(.mod-visible),
.is-phone .mod-root.is-sliding .workspace-tabs:not(.mod-visible) {
    display: flex;
}

This should force all tab groups to be displayed if the workspace is in sliding mode.

May2002 commented 1 year ago

Wow, it works, I AM SO HAPPY!!!!!!!!!!!! Thank you sooooo much! :heart::heart::heart::trophy::fireworks: Seriously, THANK YOU!!!!!

pjeby commented 1 year ago

Ok, I will probably add this to Pane Relief's Style Settings options so that people can force sliding panes to be active on phones and other sufficiently-small screens. I don't think it should be active by default, but having an option seems good.

May2002 commented 1 year ago

That seems great. If I may, it would be coherent if the plugin was not set as desktop only anymore (since this setting would seem be a little weird for a desktop-only plugin). I can try to test the other functionalities if it helps. Thank you again!! And sorry for my bad english.

May2002 commented 1 year ago

One more thing (sorry): with the snippet the scroll thumb is still not there, and it gets tricky to swipe through tab groups and stacked tabs, depending on how everything is positioned, --but it works--. If it's OK for you, could you please see if I/we could get the scroll thumb again? That would be totally amazing. (That's because on a phone it is easier to open new tabs than to open new tab groups).

pjeby commented 1 year ago

In mobile emulation, I saw a scrollbar, so I'm not sure why you're not seeing one.

May2002 commented 1 year ago

After further testing, with new vaults with only the plugin and the snippet and 3 to 4 tab groups (without stacking tabs):

Untitled

Source mode or live preview seem to give the same results. The same kind of things happen with stacked tabs.

With this scrollbar problem + the fact that, as far as I know, only bookmarks can be opened "to the right" (without an external keyboard) -and we don't know for how long-, make the functionality a bit hard to use for the general public.

pjeby commented 1 year ago

Ok, so it sounds like sliding panes is DOA on devices Obsidian considers phones, but usable on tablets.

May2002 commented 1 year ago

Not really (for the phones part).

For reference:

I don't think that anything could replace it if one wants to quickly swipe back and forth through several reference notes. On the phone it is still very usable without stacking tabs (swiping through the tab groups); with stacked tabs (or notes with large tables) one can survive by grabbing the tab bar when stuck, while minding not to hit the "close tab" button.

Plus it appears that one can use the Commander plugin to create "split right", "create note to the right" (and even "toggle stacked tabs", why not) to the ribbon, allowing to create easily a mostly "flat" layout with lots of tab groups and few tabs per group. I tried to put a "split right" button on the tab bar, it makes things even more fluid. I'm not sure I will keep it though. One could probably save the result as a workspace; one workspace for each group of notes that one wishes to display side by side? (I'll have to try that)

Side notes:

TL; DR: I'm still very happy. And thank you again.