-
Notifications
You must be signed in to change notification settings - Fork 97
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
Reading user "do not disturb" status #60
Reading user "do not disturb" status #60
Conversation
Can you take a look on this, @duynguyenhoang? |
Let me check it |
sclack/components.py
Outdated
else: | ||
return '' | ||
|
||
def change_snooze_indicator(self, is_snoozed=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is_snoozed=False
, am I correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also change status indicator icon when is_snoozed is changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
is_snoozed=False
, am I correct?
I meant to set a snooze to True
or False
only if someone explicitly said so. It was just a (dumb) semantic idea. But yeah, it could be only is_snooze=False
(and then I'd remove the if
below)!
Also change status indicator icon when is_snoozed is changed
That led me to the other thread's question: should this snooze be a separated indicator or just be the same as presence_icon
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this indicator should be only one, but we have some statuses
- Snooze
- Online
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to update it slightly, please check https://i.imgur.com/at0XuwE.png
sclack/components.py
Outdated
if is_online: | ||
presence_icon = ('presence_active', ' {} '.format(get_icon('online'))) | ||
self.presence_icon = ('presence_active', ' {} '.format(get_icon('online'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we should add snooze icon like:
if is_snoozed:
self.presence_icon = ('presence_active', ' {} '.format(get_icon('snooze')))
I have checked https://nerdfonts.com/ and see we can use "snooze": "\uF9B1",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the presence_icon
should indicate snooze too? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it should be snooze icon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, then, I'll do it this evening!
@duynguyenhoang I updated the code applying your reviews. Also removed the (snoozed) string as it seems not needed anymore, and the display string for snooze is set as "presence_snooze". All good with that? I have a problem, however. I don't know what triggered this, but my icon has a black background: |
sclack/components.py
Outdated
@property | ||
def body(self): | ||
if self.is_snoozed: | ||
presence_icon = ('presence_snooze', ' {} '.format(get_icon('snooze'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaaah, got it, thanks. will do.
Should this 'snoozed' string be there too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think yes, good to have, because not everyone use the icon so the text should be helpful
Also, I saw a Todo at #64 that's related to this snooze feature. I left the |
Please rebase your branch, I am going to merge it then. |
@duynguyenhoang did it! |
I mean rebase your branch, merge your commits into one commit.
|
Oh, I thought you were going to "squash and merge" via GitHub, so I just used |
Is there any icon that should be used for this "snooze"? That's how it looks currently:
