obsidian-git icon indicating copy to clipboard operation
obsidian-git copied to clipboard

[Bug]: Source control view is broken on mobile

Open NomarCub opened this issue 3 years ago • 2 comments

Describe the bug

When I open up changes sometimes all, sometimes half the buttons are covered. The thing next to the refresh button looks and behaves weirdly (I have commit message set to {{date}}, that shows up there in desktop.) image

Relevant errors (if available)

No response

Steps to reproduce

Have varying amount of changes, open source control view, fold folders.

Expected Behavior

No response

Addition context

No response

Operating system

Android

Plugin version

2.0.3

NomarCub avatar Sep 06 '22 23:09 NomarCub

The view design should be improved on desktop as well and will fix issues on mobile too then.

Vinzent03 avatar Sep 07 '22 06:09 Vinzent03

Is there a general source view ticket?

Some nice to haves for that:

  • the add + buttons on files are really small on Android.
  • a stage and unstage button for folders, and a stage and unstage all button, like in VSCode image
  • indentation guides that are styleable with the new CSS variables
  • collapse nested folders if there are no files in their siblings, like it is in VSCode image

NomarCub avatar Sep 07 '22 15:09 NomarCub

I've done all these features now locally. I've aligned it to the file view in Obsidian and used their css classes etc. But it's looks weird on < v0.16 of Obsidian. And I don't want to make all future releases 0.16 only, so I'll wait until Obsidian 0.16 is public.

Vinzent03 avatar Sep 30 '22 19:09 Vinzent03

I just published the redesign. It's not focused on mobile, but I think it still got easier to press the buttons.

Vinzent03 avatar Oct 13 '22 15:10 Vinzent03

Thanks! My existing CSS customizations work right out of the box 😁 image

I found some hitches however.

  • The corner of the commit message input box thing looks weird on mobile. It has a scrollbar when there's only one line. And there's that thing in the corner. I have no idea what it does and it looks uglier than on PC. image

  • There's this jittering when refreshing on mobile.

https://user-images.githubusercontent.com/5298006/195646178-2e8f2741-1483-40f1-9556-958bfe30c15b.mp4

  • "nesting" folders misbehaves, doesn't go as deep as it could image image

  • and with the plus buttons on folders, it would make sense to have an add all, discard all button for the root on the fold of "changes" and "staged changes", like there is in VSCode image

NomarCub avatar Oct 13 '22 16:10 NomarCub

I've changed the height of the textarea to behave like in vscode. So you can't resize it manually anymore, just by adding/removing a line. Looks like I only tested 2 depth folders. Both not released yet.

I thought about adding the stage/unstage button to the category as well, but I thought it would make the ui cleaner not adding another button there, but keeping it at the top. What do you think?

Vinzent03 avatar Oct 13 '22 19:10 Vinzent03

If files and folders have the button, I think the root (changes, staged changed) should have it too. There's nothing else where it would go anyway, I don't think it would be cluttered. But don't base this just on me.

NomarCub avatar Oct 13 '22 23:10 NomarCub

Also, I just noticed, there's no discard button on folders under changes, which would also be handy.

NomarCub avatar Oct 14 '22 09:10 NomarCub

Oh true. Will add that as well.

Vinzent03 avatar Oct 14 '22 10:10 Vinzent03