extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Update: Slack: Adding more info to Slack Open Channel command

Open RobErskine opened this issue 1 year ago • 7 comments

Description

Hi there! I updated the Slack Search Command to pull more data from Slack, like the user's Title (if it exists), their current status in Slack, when they will be back, their timezone location, as well as their current local time.

Current Search Command UI

Arc-_2024-07-05 at 17 07@2x

New Search Command UI

Arc-_2024-07-05 at 17 12@2x

Screencast

https://github.com/raycast/extensions/assets/1895120/77361592-390b-4574-8afa-ad8da58e9c06

Bonus

Adds Emojify to Unread Messages as well to help make messages with emojis more readable: Code-unread-messages tsx — slack_2024-07-05 at 17 20@2x

Checklist

RobErskine avatar Jul 05 '24 21:07 RobErskine

Thank you for your contribution! :tada:

🔔 @momme-rtf @Elliot67 @jfkisafk you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

You can expect an initial review within five business days.

raycastbot avatar Jul 05 '24 21:07 raycastbot

Hi @RobErskine Thanks for your contribution! I like your change for displaying the emojis properly. Regarding the search: I personally like to have the list more focused and less overloaded with infos. Especially when working within a small team I rather do not care about titles and locations of team members. Within a bigger company I see that it can be helpful. Maybe we could make it configurable somehow what we show. But I'd also like to hear the opinion of other contributers. What do you think?

momme-rtf avatar Jul 05 '24 23:07 momme-rtf

Hi @momme-rtf, thanks for your thoughts. I can see your point about keeping it uncluttered. Personally my org on Slack is over 700 people all over the world, so looking people up and understanding where they are and what time it is for them is crazy useful for me.

I do like your suggestion of adding in a Preference for this though to keep this simple for folks that like the way it is currently. I was already thinking in the shower that I should probably add in a preference for how the time should be displayed (am/pm or 24 hour).

How about this:

  • Add in a Preference for whether to show time in am/pm or 24 hour
  • Add in a Preference on whether or not to show the Timezone / current time for that team member
  • I think it's useful to show the Slack status emoji, the message, and when the status expires. Do you think that would be a good addition to keep in, without a Preference to toggle on/off?

RobErskine avatar Jul 06 '24 01:07 RobErskine

👋🏼 hey @jfkisafk @momme-rtf,

I went ahead and added two additional preferences to the extension for Time Format as well as Displaying Additional Metadata in the Search Command: Raycast-Settings_2024-07-07 at 14 28@2x

I also added in HH:MM to the Slack Status Tooltip so if someone is grabbing lunch, or at a doctor's appt on the same day, the return time will be displayed. This screenshot also has the "Show Extra Metadata" option turned off (which is the default). Raycast-Settings_2024-07-07 at 14 29@2x

Here is what it looks like with the extra metadata turned on, as well as the 24 hour time format. Arc-_2024-07-07 at 14 43@2x

Let me know if you have any other feedback!

RobErskine avatar Jul 07 '24 18:07 RobErskine

Awesome @RobErskine The preferences that you've added look good to me :)

momme-rtf avatar Jul 07 '24 19:07 momme-rtf

Please rebase on top of https://github.com/raycast/extensions/pull/13039 and see if everything works as before? This will add a new command and the previous Search command name has changed.

jfkisafk avatar Jul 08 '24 09:07 jfkisafk

👋🏼 hi there.

This is pretty poor (or good?) timing on my end but I was working on an update to the ~Search~ Open Channel command just as @thomaslombart published the latest Slack extension updates.

This PR adds Metadata to the Open Channel command to show Slack member's job title, current status, timezone, as well as their current time. Also added in the option to display time in AM/PM or 24 hour time.

With the Metadata set to false (this is the default to keep functionality as close to what it is now): Arc-_2024-07-08 at 12 34@2x

With the Metadata turned on (with 24 hour time): Arc-_2024-07-07 at 14 43@2x

RobErskine avatar Jul 08 '24 17:07 RobErskine

Hey Rob, I'll review the PR next week 🙂

thomaslombart avatar Jul 11 '24 07:07 thomaslombart

It seems other extension changes have slipped in while merging/rebasing. Could you fix it before I review your PR? 🙂

thomaslombart avatar Jul 15 '24 08:07 thomaslombart

@thomaslombart sorry about that; not sure how that happened while I was rebasing. I have merged main back in and all looks correct now. Mind giving it a look now?

RobErskine avatar Jul 15 '24 20:07 RobErskine

@thomaslombart thanks for the feedback. I've incorporated your feedback and I think it's better for it. Please take a look when you have the time

RobErskine avatar Jul 19 '24 02:07 RobErskine

I'm traveling for work but will be able to get to these last pieces of feedback tonight or tomorrow!

RobErskine avatar Jul 23 '24 19:07 RobErskine

@thomaslombart @jfkisafk Thanks for the feedback and apologies on the delay. I have updated the getCoworkerTime function to use date-fnsand date-fns-tz to eliminate the need for an additional setting.

search tsx — slack-2024-07-26-23 35 42@2x

search tsx — slack-2024-07-26-23 36 05@2x

Now it only the time difference shows up if the there is an actual time difference. All time is also shown in hours as -1h, +3h, +9.5h, etc. This keeps the UI ubiquitous and simple.

Let me know if you have any other questions or concerns!

RobErskine avatar Jul 27 '24 03:07 RobErskine

Published to the Raycast Store: https://raycast.com/mommertf/slack

github-actions[bot] avatar Jul 30 '24 08:07 github-actions[bot]

:tada: :tada: :tada:

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

raycastbot avatar Jul 30 '24 08:07 raycastbot