Richer Slack Notifications

Scope

1. Clearer notifications

Put link to note over the note title and remove "See in Slite button". The link should also contain UTM parameters so we can track how much people are navigating to notes from Slack.
 utm_source  should be  slack  and  utm_campaign  should be the notification type like we do for email.
Replace Slite usernames in notification text by Slack usernames (use mention link) when possible. Otherwise, display Slite username.


2. Make some notifications richer

Add thread, reply to comment, add discussion, reply to discussion

Show comment content formatted with Slack markdown in a block looking like the Slack quote block. See resources bellow:
Format that should be kept: bold, italic, strikethrough, links, lists, code blocks, inline code, quotes.
Headers should be converted to simple bold.
Tables should not be displayed (because is just a nice to have).
Embeds and uploaded files should be displayed as plain links.
Convert hints to quote with emoji corresponding to type of hint
Information for info hint
Warning for warning hint
Check Mark Button for green hint
Cross Mark for red hint
Mentions to Slite users in comment content should be converted to Slack mentions when possible.
Add inline thread notification displays also the portion of text that was originally selected


Request access to channel or note

Add action buttons  Allow  and  Deny  to quickly allow or deny the request without having to go to Slite.
When clicking on  Allow  or  Deny  , edit the message to remove the action and add a line with the result of the action
Check Mark Button Granted access
Cross Mark Denied access


Share channel or note

Option 1 - Show a preview (X first lines or blocks) of note content that was shared by using the same content conversion we do for comment content.
Smart tables, doc cards, separators, list of doc, etc should be ignored like tables.
Option 2 - Embed PDF export like we do with Share to Slack feature.
Option 3 - Plain text extract of the X first lines or blocks.


Automated doc creation

Show the message attached to the note creation
List users (with avatars) of people that were targeted for this doc creation
Action button to turn off the automation
Upon clicking the action button, replace with message "Sleeping Face Automation turned off"

Flow

I tried to figure out how the UX could look like.

Designs and assets

@C@Charley started adding some inspirations from Figma
Great to see that I can reply from here. If I know what she's talking about without having to open the doc, this saves a lot of time
It's also good that you see a preview, even if you can't really zoom in to see the details, you can remember or have an idea of what this is about


Open questions Speech Balloon

Are there still unanswered questions? Any blind spots remaining?


Technical factoring

Current state of integration locking

frontend:  isSlack  // integration !==  true 
backend: mostly none


What we should do? — Use  Organization.features 

Like for permissions, we move increasingly complexe business logic to the backend. Instead of doing stuff like `if(isTrue) then` to handle feature locks:  organization.features .

type OrganizationFeatures {
openId: Boolean!
enforcedOAuth: Boolean!
integrations: Boolean!
userGroups: Boolean!
granularPermissions: Boolean!
readerRole: Boolean!
restrictInviteFromMembers: Boolean!
editProtection: Boolean!
unlimitedHistory: Boolean!
automatedBackups: Boolean!
managePublicSharingNeededRole: Boolean!
teamInsights: Boolean!
publishedDocFooter: Boolean!
publishedDocCopyButton: Boolean!
sharedDocCountLimit: Boolean!
}

This assert function may resolve permissions based on complexe rules base on  slack.product  mixed with feature flags, user roles etc...

Resolving these permissions with combinations of flags and product allows us to easilly implement both Slack and Asana integrations:
- Slack is a simple integration check
- Asana is product integration + feature flag checks