Skip to content

Commit

Permalink
fix: changed URL to /raven
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkothari22 committed Jun 22, 2023
1 parent 5ba92de commit 04609ae
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
tags
node_modules

raven/public/raven-app
raven/public/raven
raven/public/node_modules
raven/www/raven-app.html
raven/www/raven.html
49 changes: 3 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,46 +114,6 @@ The mobile app is built using [Ionic](https://ionicframework.com), [Tailwind CSS

</details>

<br/>

#### Work in progress 🚧

The mobile app was set up using Capacitor, Ionic and React:
1. Set up authentication on the mobile app
2. View all channels, private messages and profile on mobile app
3. View a channel's messages (text, images and files) on the mobile app
4. Send a message on a channel.

New features were added to the web app:
1. Ability to create an "Open" channel - where all users are members by default.
2. Ability to delete a message previously sent
3. Ability to edit a message
4. Ability to send images and files by clicking on the file "plus" button
5. Ability to send images and files by dragging and dropping them into the chat interface
6. Image previews in the chat interface
7. Ability to download files from the chat interface
8. Styling improvements: dark mode for emoji picker, highlight for mentions in messages (@user), dark mode support for Quill mentions menu
9. General channel is created when app is installed.
10. Bug fix: empty messages cannot be sent
11. Bug fix: duplicate channel names cannot be created (added validation)
12. Bug fix: design issues fixed on the chat interface to make the chat messages responsive according to height of input.

<hr>

#### What's not working (yet)

Mobile app:
1. Channels cannot be created and channel details cannot be viewed
2. Members cannot be added to or removed from channels
3. Files and images cannot be sent.

Moreover, the mobile app authentication needs to be updated to use Bearer tokens because of a cookie issue on iOS. The mobile app works on Android.

Web app:
1. Improvements to be made on direct message listing.
2. Lazy loading and scroll to load for older messages.

<hr>


## Installation
Expand All @@ -167,9 +127,7 @@ bench get-app https://github.com/The-Commit-Company/Raven.git
bench --site yoursite.name install-app raven
```

Post this, you can access Raven on your Frappe site at the `/raven-app` endpoint (e.g. https://yoursite.com/raven-app).

We plan to publish Raven to the [Frappe Cloud Marketplace](https://frappecloud.com/marketplace/apps) soon.
Post this, you can access Raven on your Frappe site at the `/raven` endpoint (e.g. https://yoursite.com/raven).

### Local development setup

Expand Down Expand Up @@ -202,9 +160,8 @@ yarn dev
We are currently working or will be working on the following features. Please head to our Github issues page and feel free to contribute:

1. Mobile app for Raven
2. Open-graph link previews
3. Push notifications
4. Integration service - allowing other applications to create bots and send messages. Some popular services we are looking at are [Github](https://github.com), [Linear](https://linear.app), [Sentry][https://sentry.io], [Frappe Desk][https://frappedesk.com].
2. Push notifications
3. Integration service - allowing other applications to create bots and send messages. Some popular services we are looking at are [Github](https://github.com), [Linear](https://linear.app), [Sentry][https://sentry.io], [Frappe Desk][https://frappedesk.com].

<hr>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
},
"keywords": [],
"author": "",
"license": "ISC"
"license": "AGPL-3.0"
}
2 changes: 1 addition & 1 deletion raven-app/.env.production
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VITE_BASE_NAME='raven_app'
VITE_BASE_NAME='raven'
6 changes: 3 additions & 3 deletions raven-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build --base=/assets/raven/raven-app/ && yarn copy-html-entry",
"build": "vite build --base=/assets/raven/raven/ && yarn copy-html-entry",
"preview": "vite preview",
"copy-html-entry": "cp ../raven/public/raven-app/index.html ../raven/www/raven_app.html"
"copy-html-entry": "cp ../raven/public/raven/index.html ../raven/www/raven.html"
},
"dependencies": {
"@chakra-ui/icons": "^2.0.17",
Expand Down Expand Up @@ -45,4 +45,4 @@
"typescript": "^4.9.3",
"vite": "^4.1.0"
}
}
}
2 changes: 1 addition & 1 deletion raven-app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default defineConfig({
}
},
build: {
outDir: '../raven/public/raven-app',
outDir: '../raven/public/raven',
emptyOutDir: true,
target: 'es2015',
},
Expand Down
2 changes: 1 addition & 1 deletion raven/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.1'
__version__ = '1.0.0'
8 changes: 4 additions & 4 deletions raven/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

app_name = "raven"
app_title = "Raven"
app_publisher = "Janhvi Patil"
app_publisher = "The Commit Company"
app_description = "Messaging Application"
app_email = "[email protected]"
app_license = "MIT"
app_email = "[email protected]"
app_license = "AGPLv3"

# Includes in <head>
# ------------------
Expand Down Expand Up @@ -191,7 +191,7 @@
# ]

website_route_rules = [
{'from_route': '/raven_app/<path:app_path>', 'to_route': 'raven_app'}, ]
{'from_route': '/raven/<path:app_path>', 'to_route': 'raven'}, ]

has_permission = {
"Raven Channel": "raven.permissions.channel_has_permission",
Expand Down
76 changes: 76 additions & 0 deletions raven/raven/workspace/raven/raven.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"charts": [],
"content": "[{\"id\":\"MKitHAnT4f\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><a href=\\\"/raven\\\">Raven</a></span>\",\"col\":12}},{\"id\":\"_TmvmGAvy7\",\"type\":\"paragraph\",\"data\":{\"text\":\"Click <a href=\\\"/raven\\\">here</a>&nbsp;to visit the Raven app\",\"col\":12}},{\"id\":\"ZcawYU5brv\",\"type\":\"card\",\"data\":{\"card_name\":\"DocTypes\",\"col\":4}}]",
"creation": "2023-06-22 20:12:29.687295",
"docstatus": 0,
"doctype": "Workspace",
"for_user": "",
"hide_custom": 0,
"icon": "message-1",
"idx": 0,
"is_hidden": 0,
"label": "Raven",
"links": [
{
"hidden": 0,
"is_query_report": 0,
"label": "DocTypes",
"link_count": 4,
"onboard": 0,
"type": "Card Break"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Channels",
"link_count": 0,
"link_to": "Raven Channel",
"link_type": "DocType",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Members",
"link_count": 0,
"link_to": "Raven Channel Member",
"link_type": "DocType",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Messages",
"link_count": 0,
"link_to": "Raven Message",
"link_type": "DocType",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Message Reactions",
"link_count": 0,
"link_to": "Raven Message Reaction",
"link_type": "DocType",
"onboard": 0,
"type": "Link"
}
],
"modified": "2023-06-22 20:14:45.643069",
"modified_by": "Administrator",
"module": "Raven",
"name": "Raven",
"number_cards": [],
"owner": "Administrator",
"parent_page": "",
"public": 1,
"quick_lists": [],
"roles": [],
"sequence_id": 30.0,
"shortcuts": [],
"title": "Raven"
}
8 changes: 5 additions & 3 deletions raven/raven_messaging/doctype/raven_message/raven_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ def fetch_recent_files(channel_id):

@frappe.whitelist()
def get_last_channel():
last_message = frappe.get_last_doc('Raven Message', {
'owner': frappe.session.user
})
last_message = None
if frappe.db.exists("Raven Message", {"owner": frappe.session.user}):
last_message = frappe.get_last_doc('Raven Message', {
'owner': frappe.session.user
})
if last_message:
return last_message.channel_id
else:
Expand Down
File renamed without changes.
19 changes: 0 additions & 19 deletions raven/www/raven_app.html

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
name="raven",
version=version,
description="Messaging Application",
author="Janhvi Patil",
author_email="[email protected]",
author="The Commit Company",
author_email="[email protected]",
packages=find_packages(),
zip_safe=False,
include_package_data=True,
Expand Down

0 comments on commit 04609ae

Please sign in to comment.