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

Set presence on window focus #77

Closed
singpolyma opened this issue Jan 22, 2023 · 9 comments
Closed

Set presence on window focus #77

singpolyma opened this issue Jan 22, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@singpolyma
Copy link

Describe the solution you'd like

On window blur, set to away ("Window not active") on window focus set to online.

@singpolyma singpolyma added the enhancement New feature or request label Jan 22, 2023
@nioc
Copy link
Owner

nioc commented Jan 22, 2023

Hello, may be a good idea.
I am not sure we should set away status immediately or after a timer (which is more complex to implement)?

What is the behavior of others XMPP client?

@nioc nioc added the question Further information is requested label Jan 23, 2023
@nioc
Copy link
Owner

nioc commented Jan 29, 2023

@Ppjet6 what do you think about this?

@Ppjet6
Copy link
Contributor

Ppjet6 commented Jan 29, 2023

I don't know if I would personally want this kind of feature for privacy reasons, but let me not stop you if that's something you want for your client. I won't be of much help here as I generally try to stay available always. I have poked people here and there to get an idea.

@Ppjet6
Copy link
Contributor

Ppjet6 commented Jan 29, 2023

From a first glance:

  • Gajim uses a configurable timer after which away/xa is set
  • Conversations has the following options: [ ] Set manually / [ ] Away when device is locked / [ ] Busy in silent mode. All unchecked by default and tucked in expect settings
  • poezio (console) doesn't have any timer, status can be changed manually
  • Dino only ever does available presence and no status text

@nioc
Copy link
Owner

nioc commented Jan 31, 2023

I propose we could have a specific "auto" value which automatically set away/online presence based on the window focus.
In order to respect user privacy, he/she will have to set manually this value.

image

Does it sounds good for everyone?

@singpolyma
Copy link
Author

@nioc that's probably a good step yeah. Then we can probably override for guests with smaller local edits if we need to

@nioc nioc self-assigned this Feb 1, 2023
@nioc
Copy link
Owner

nioc commented Feb 1, 2023

I've found a better UI using a switch:

image

Looking for add it to guest to.

@nioc
Copy link
Owner

nioc commented Feb 1, 2023

Not so easy... presence is build with as navbar item, without navbar (guest) rendering is broken. I have to think about it.

@nioc nioc added this to the 0.9.7 milestone Feb 1, 2023
@nioc
Copy link
Owner

nioc commented Feb 1, 2023

Done!
I needed to refactor presence dropdown in a dedicated component and juggle with two kind of Bulma components (dropdown and navbar item).

@nioc nioc closed this as completed in 181c30a Feb 2, 2023
@nioc nioc removed the question Further information is requested label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants