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

[FIX] version update messages #8

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added CONTRIBUTORS.MD
Empty file.
20 changes: 11 additions & 9 deletions FigmaApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ export class FigmaApp extends App {
persistence: IPersistence,
modify: IModify
) {
console.log(
'modal title - ',
context.getInteractionData().view.title.text
);
const user: IUser = context.getInteractionData().user;
const room = await getRoom(read, user);
if (room) {
Expand All @@ -85,7 +81,7 @@ export class FigmaApp extends App {
return await handler
.run(context, room)
.catch((err) =>
console.log('error: submitting 2nd modal', err)
console.log('error: submitting Events modal', err)
);
} else if (
context.getInteractionData().view.title.text ===
Expand All @@ -107,7 +103,6 @@ export class FigmaApp extends App {
context.getInteractionData().view.title.text ===
modalTitle.REPLY_MODAL
) {
console.log('inside reply modal');
const handler = new ExecuteReplyHandler(
this,
read,
Expand All @@ -120,7 +115,6 @@ export class FigmaApp extends App {
context.getInteractionData().view.title.text ===
modalTitle.CREATE_COMMENT_MODAL
) {
console.log('inside create comment modal');
const handler = new CommentModalHandler(
this,
read,
Expand Down Expand Up @@ -228,18 +222,26 @@ export class FigmaApp extends App {
modify: IModify
): Promise<void> {
const user = context.user;
const welcomeMessage = `You’ve successfully installed Figma Rocket.Chat app! Now your Figma comments and notifications will show up here. :tada:
const welcomeMessage = `You’ve successfully installed Figma Rocket.Chat app! Now the admin of the server has to create an app on figma.com and add the figma client id and client secret to the app settings in order to connect the server with figma.
1. Go to https://www.figma.com/developers/apps and create a new app.
2. Get the callback url from the app settings page ( -> admin panel -> apps) in rocket.chat and add it to the figma app.
3. Copy the client id and client secret and paste it in the app settings ( don't forget to click on save button )
:tada: You are all set!

Now your Figma comments and notifications will show up in the rocket chat server.
With Figma App, you can reply to file comments directly in a rocket chat channel. You will get notified when:
\xa0\xa0 • A new comment is added to a file you are collaborating on.
\xa0\xa0 • Someone replies to a comment you made.
\xa0\xa0 • You are tagged in a file.
\xa0\xa0 • You are invited to a file.
\xa0\xa0 • A file you are collaborating on is updated.
\xa0\xa0 • Notifications on Branches ( for organizations only ).

Some tips:
\xa0\xa0 • When you reply to a Figma comment here, your reply will automatically be added to the Figma file.
\xa0\xa0 • Type \` /figma connect \` to connect your figma account to the rocket.chat server.
\xa0\xa0 • Type \` /figma help \` for command. `;
\xa0\xa0 • Type \` /figma help \` for all the commands command.
\xa0\xa0 • Subscribe a file, team, or project in a channel using \` /figma subscribe \` and notify all the users that they will have to authenticate their figma accounts using \` /figma connect \`. `;
await sendDMToUser(read, modify, user, welcomeMessage, persistence);
}

Expand Down
43 changes: 21 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
## Getting Started
Now that you have generated a blank default Rocket.Chat App, what are you supposed to do next?
Start developing! Open up your favorite editor, our recommended one is Visual Studio code,
and start working on your App. Once you have something ready to test, you can either
package it up and manually deploy it to your test instance or you can use the CLI to do so.
Here are some commands to get started:
- `rc-apps package`: this command will generate a packaged app file (zip) which can be installed **if** it compiles with TypeScript
- `rc-apps deploy`: this will do what `package` does but will then ask you for your server url, username, and password to deploy it for you
# Figma Notification now in Rocket.Chat

## Documentation
Here are some links to examples and documentation:
- [Rocket.Chat Apps TypeScript Definitions Documentation](https://rocketchat.github.io/Rocket.Chat.Apps-engine/)
- [Rocket.Chat Apps TypeScript Definitions Repository](https://github.com/RocketChat/Rocket.Chat.Apps-engine)
- [Example Rocket.Chat Apps](https://github.com/graywolf336/RocketChatApps)
- Community Forums
- [App Requests](https://forums.rocket.chat/c/rocket-chat-apps/requests)
- [App Guides](https://forums.rocket.chat/c/rocket-chat-apps/guides)
- [Top View of Both Categories](https://forums.rocket.chat/c/rocket-chat-apps)
- [#rocketchat-apps on Open.Rocket.Chat](https://open.rocket.chat/channel/rocketchat-apps)
![Horizontal Banner](https://github.com/irffanasiff/Apps.Figma/blob/versions_delete_notifications/assets/FigmaAppCover.png)

## Figma App
Rocket.Chat and Figma integration offers figma notifications directly inside rocket.chat channels. Teams/individuals will receive personalized updates for different events from figma for a project, file or a team they have subscribed to. This will improve workflow and the functionality of design teams so that teams can deliver better products faster.

- User can subscribe to only those files which are available under a team
- Users will be notified for files that are available to everyone on the team, or are in view-only projects.
- Users will not be notified for files in invite-only projects.
<h2>App Features</h2>
<ul>
<li>Customize your Rocket.Chat channel to recieve notifications on specific files, projects, and teams</li>
<li>Get notification in DM when you are tagged in figma</li>
<li>Reply to comments and create new comments directly from Rocket.Chat</li>
<li>Get notified when a file is updated or deleted</li>
<li>Get notified when a new version of file is created or a new component is published inside a library</li>
<li>Notifications on branch updates coming soon </li>
</ul>


<h2>Setting up Figma App</h2>

1. Install the app from the [marketplace](https://www.rocket.chat/marketplace) or clone the repository and add the zip file manually to your rocket.chat server.</br>
2. Go to [figma api](https://www.figma.com/developers/apps) and create a figma app. </br>
![Figma app registration](https://github.com/irffanasiff/Apps.Figma/blob/versions_delete_notifications/assets/NewFigmaAppSS.png)
3. Get the callback url from the app settings page in rocket.chat and add it to the figma app. </br>
4. Copy the client id and client secret and paste it in the app settings ( don't forget to click on save button ) </br>
5. You are all set to go now. use `/figma connect` command to connect your figma account with rocket.chat. </br>
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"homepage": "https://irfanasif.me",
"support": "https://github.com/demonicirfan"
},
"name": "Figma",
"name": "Figma Notifications (Beta)",
"nameSlug": "figma",
"classFile": "FigmaApp.ts",
"description": "Integrates Figma into Rocket.Chat. Users and Teams are directly notified in the chat about comments and updates in the Figma project.",
Expand Down
Binary file added assets/AppsDetailsSS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/AuthSS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/FigmaAppCover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/NewFigmaAppSS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/SettingsSS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 0 additions & 39 deletions command/Connect.ts

This file was deleted.

114 changes: 0 additions & 114 deletions command/FigmaCommand.ts

This file was deleted.

Loading