mikedilger / gossip

Gossip is a nostr client
Other
627 stars 74 forks source link

Show when offline mode is active #751

Closed dtonon closed 6 days ago

dtonon commented 1 month ago

If the user starts in offline mode (it could be also an error or a test), there is not alert about that in the interface. We can add a little badge on the sidebar:

image
bu5hm4nn commented 1 month ago

I think we should put a switch somewhere (like Sparrow wallet)

dtonon commented 1 month ago

Yes, it could be a nice as emergency switch. We can use the same area:

image

The background is reverted to grey when the setting is off

bu5hm4nn commented 1 week ago

What does this look like when we are not offline? What background color?

dtonon commented 1 week ago
image

You can find it in the figma for the details (added right now)

bu5hm4nn commented 1 week ago

Wow that was quick!

bu5hm4nn commented 1 week ago

@dtonon ready for testing on unstable

dtonon commented 1 week ago

Some tweaks:

1) Use the proposed texts ("Offline mode disabled/enabled"), since it is a switch and not a button 2) When the offline mode is active the top border in not necessary 3) When the offline mode is deactivate the text should be dimmed 4) In dark mode, the top line should be barely darker than the background

Result:

image

image

Applied in 42130dc5

dtonon commented 1 week ago

@bu5hm4nn I also fixed in 6a7fe30d the vertical alignment of the label in the switch component, it was too hight. It is a nasty hack but it should work, please take a look at it.

mikedilger commented 1 week ago

github autoclosed this when I pushed the branch with a commit referencing this. I'm reopening it so you two can decide if that was correct.

bu5hm4nn commented 6 days ago

@dtonon I'll let you decide if this is complete

dtonon commented 6 days ago

I would like to reduce the length of the text to make the sidebar narrower, but this would involve working on the font size and the space of the counters below. Since we have more urgent things to worry about, for now let's close it.

mikedilger commented 6 days ago

"offline mode disabled" is a quite verbose way to say "online", so if you wanted a narrower sidebar, there is a way.

dtonon commented 6 days ago

I agree, it is too verbose. But the focus is on the offline possible status, and usually switches have a fixed label, so It should not be changed (too much) when changing state. Maybe "Offline mode" is sufficient, adding an "ON" when active:

image

Is this ok for you?

mikedilger commented 5 days ago

I think it is even ok to say "__O Online" by default and "O__ Offline" if they switch it. But if you think "Offline mode" with the switch sense the other way is easier for users to understand, go for it. I'm not bothered either way.

dtonon commented 3 days ago

I think it is even ok to say "O Online" by default and "O Offline" if they switch it.

This would mean having the active status of the switch on online, but we want to highlight the offline one, because is the "expecption". Then I would prefer a slightly longer text, it is more visible and has a better graphical impact. I pushed my proposal, let's see how it works.