Skip to content
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

Trying to use pane-relief on my phone #49

Closed
May2002 opened this issue Jul 17, 2023 · 21 comments
Closed

Trying to use pane-relief on my phone #49

May2002 opened this issue Jul 17, 2023 · 21 comments

Comments

@May2002
Copy link

May2002 commented Jul 17, 2023

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
Copy link
Author

May2002 commented Jul 17, 2023

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
Copy link
Owner

pjeby commented Jul 17, 2023

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
Copy link
Author

May2002 commented Jul 17, 2023

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
Copy link
Owner

pjeby commented Jul 17, 2023

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
Copy link
Author

May2002 commented Jul 18, 2023

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
Copy link
Author

May2002 commented Jul 18, 2023

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

@pjeby
Copy link
Owner

pjeby commented Jul 19, 2023

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
Copy link
Author

May2002 commented Jul 20, 2023

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
Copy link
Author

May2002 commented Jul 21, 2023

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. 😢
Anyway, thank you for your attention.

@pjeby
Copy link
Owner

pjeby commented Jul 21, 2023

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
Copy link
Author

May2002 commented Jul 21, 2023

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
Copy link
Owner

pjeby commented Jul 21, 2023

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
Copy link
Owner

pjeby commented Jul 21, 2023

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
Copy link
Author

May2002 commented Jul 21, 2023

Wow, it works, I AM SO HAPPY!!!!!!!!!!!!
Thank you sooooo much! ❤️❤️❤️🏆🎆
Seriously, THANK YOU!!!!!

@pjeby
Copy link
Owner

pjeby commented Jul 21, 2023

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
Copy link
Author

May2002 commented Jul 21, 2023

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
Copy link
Author

May2002 commented Jul 21, 2023

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
Copy link
Owner

pjeby commented Jul 21, 2023

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

@May2002
Copy link
Author

May2002 commented Jul 22, 2023

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

  • On the phone, at the beginning the bottom toolbar that allows to switch to another tab (let's call it the navigation toolbar) is there, but there is no scrollbar (pic. 1)
    the scrollbar appears when i I switch to editing mode for a note and click on it.
    The soft keyboard and mobile toolbar appear, with a (reasonably thick) scrollbar on top, and the navigation toolbar disappears. (pic 2)
    If I retract the soft keyboard the scrollbar is still there (but very thin) as long the note is selected (pic 3).
    If I tap on the note again, the keyboard reappears but the scrollbar stays very thin (??).
    If I switch back to reading mode it disappears, and the navigation toolbar reappears (pic 1 again).

Untitled

  • On the emulator: I set a "phone" width, then reload.
    I get the same display as on the phone, without scrollbar, and with the selection bottom toolbar.
    I select editing mode for a note and click somewhere in it; the scrollbar appears and stays there, with the mobile toolbar (at first, a least) and without the navigation toolbar, even if I switch to reading mode on all the tabs. It's not the same behavior as on the phone.
    If I reload: the scrollbar goes away and the navigation toolbar comes back.

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
Copy link
Owner

pjeby commented Jul 22, 2023

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

@May2002
Copy link
Author

May2002 commented Jul 23, 2023

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:

  • The "maximize active tab" toggle brings back to the standard display if needed (while the "sliding panes" toggle allows to display only the current tab group, but keeps showing stacks of tabs).

  • When using Obsidian on an external (touch) screen through Samsung Dex one can use the plugin with all its tablet functionalities.

  • One might have to tap twice in order for the left panel to appear; this was already the case with the old Sliding Panes plugin.

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

@May2002 May2002 changed the title Can't be installed nor enabled on my android phone Trying to use pane-relief on my android phone Jul 23, 2023
@May2002 May2002 changed the title Trying to use pane-relief on my android phone Trying to use pane-relief on my phone Jul 23, 2023
@May2002 May2002 closed this as completed Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants