I’m thinking it would make sense to put the icon in the lower right, exactly where it is when the sidebar is open. EDIT: That might be a problem when the keyboard is open.
(When the keyboard is closed, the status stripe is at the bottom edge of the app.)
It’s a bit janky (and missing the error state) but it gets the job done.
/* Add color stripe to indicate Sync status when right sidebar is closed.
A stopgap for https://forum.obsidian.md/t/mobile-make-sync-icon-always-visible/31780 until we repair the status-icon–moving snippet that Obsidian v1.11's new mobile design broke.
Selectors courtesy of AForAnglerFishRights (@honeydewmelonbordercollie) https://discord.com/channels/686053708261228577/702656734631821413/1414345624983179304 and @Ariehen https://forum.obsidian.md/t/mobile-make-sync-icon-always-visible/31780/61?u=cawlinteffid
*/
.app-container:has(.plugin-sync[aria-label="Fully synced"]) {
border-bottom: 4px solid var(--color-green);
}
.app-container:has(.mod-working) {
border-bottom: 4px dotted var(--color-yellow);
}
.app-container:has(.plugin-sync[aria-label="Paused"]) {
border-bottom: 4px dashed var(--color-orange);
}
/*
TODO: Get selector for the error state.
*/
Ooh, a better way might be to use Ariehen’s way paired with the same thing applied to the mobile toolbar (and its keyboard dismissal button). But the navbar doesn’t appear on tablets, so they would need something when the keyboard is closed. Or maybe not, since if the keyboard is closed you’re probably not changing the file.
I happened across the selector for the main part of the toolbar, so here’s a version using its border (I don’t have the one for the keyboard button yet), plus side borders for “paused”. EDIT: The selector for the keyboard dismissal button is .mobile-toolbar-floating-options. (It’s not incorporated into this snippet.)
purple penguin / mx_emoji on Discord: Discord (You can get recreations of the actual Sync icons here; I didn’t use them because I kept thinking I could tap them to open the Sync menu.)
Oof, thanks! I think it’s .mobile-toolbar-floating-options, as commented a bit before that. And the stray bracket is the one after the border, not the last one. But that whole bottom block seems to be an accidental partial duplicate, so I can just delete it. Thanks again! EDIT: Updated to my current version, which removes the extra effect for paused state (belongs in its own snippet) and reorganizes the code a bit.
After trying a few different options over the past weeks, I’ve settled on this version for now. I wanted success and syncing to be fairly subtle; something glanceable but not really drawing my attention or taking up space. Paused and error more noticeable, of course, to make me look.
Unfortunately Sync doesn’t have a status for that. It mentions them in its activity log, and the log has a tab so you can see just those, but checking it all the time is a hassle, and the log is cleared when the app restarts.
What I’ve done for now is changed Sync’s settings so it creates conflict files instead of trying to automatically merge, and I’ve bookmarked a search for File:"conflicted copy". It still has to be checked manually (I guess on desktop you could keep it open), but it’s easier than checking the logs. I’ve also embedded the search on my home page (tho I don’t actually use my home page much).
Thanks for the tip. Somehow I’d overlooked that Sync can make conflict files rather than (poorly) merging. I’ve lost data a number of times to bad merges, so this is much better.
Now to figure out a way to generate an alert or UI change when conflict files exist. I’m sure a plugin could do it, but maybe there’s a simpler method before resorting to plugin authoring.
Thanks for clarifying this. I already set things to create conflict files and periodically searched manually for them. But I forgot about bookmarking searches! I’ll do that for now.
Just want to say THANK YOU for your work and contribution! This CSS snippet saves me a lot of headache (sync conflicts) every day. Kind greetings from Sweden
The discussion here inspired me to start using my daily note (which is actually a weekly note) as a homepage with the conflict file search embedded in it, and have it open when the app starts. That should bring them to my attention relatively quickly (at least on mobile, where the app reloads often).
When replacing some home network gear, I remembered there’s another state: for the first time in a while or for when Obsidian is trying to connect to the sync server but can’t (usually when you have no connection): “Connecting to server”
Decided to have some fun, but will need to disable it for extended out of network/wi-fi situations.
I’ll be interested if you find something! Despite the log message, visually Sync’s icon just looks like it’s syncing when it can’t connect (and my snippet does the same). It’d be nicer to have something distinct for that case. I have an error state and have seen it occasionally but don’t recall under what circumstances.