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

Rework add external calendar flow #113

Open
NovaFox161 opened this issue Aug 30, 2021 · 1 comment
Open

Rework add external calendar flow #113

NovaFox161 opened this issue Aug 30, 2021 · 1 comment
Assignees
Labels
enhancement work in progress Any changes that are currently being worked on

Comments

@NovaFox161
Copy link
Member

I was working on converting the existing !addCal command to a slash command, and in the process realized trying to shoehorn this in as a command just isn't going to work, especially with WIP features such as supporting other hosting providers.

Due to the fact that in order to authorize the bot to a 3rd party website, the user would have to leave the discord client anyway, so having this done through the discal website completely would be more optimal than going back and force between the discord client and one (or multiple) websites.

The process I believe would be best is as follows:

A user with elevated permissions runs the /addcal command, if the server can add a new calendar, it will send an ephemeral message to the user with a link to discal's site; something like https://www.discalbot.com/dashboard/$guild-id/calendar/new?type=external&step=0
On that page, it will prompt the user to login to the discal site through their discord account (to verify their permission status among other things). After logging in, they will be redirected back to the page, where it will show buttons for authorizing access to the different hosts (google/apple/outlook/etc). They will be sent to the respective oauth2 pages to authorize discal access, and will once again be redirected back to discal's site at https://www.discalbot.com/dashboard/$guild-id/calendar/new?type=external&step=1 where they will be presented with a selection for all of the calendars on the account that have correct permissions for discal to work with. They can select the calendar they wish to add, and the page will confirm the selection and once the backend does its checks, tell the user that the process is complete.

If there's an error, it will be shown to the user in an alert or similar fashion to tell them what may have gone wrong.

This solves the problem of trying to stick all this logic inside of a command system and how to handle displaying calendar choices in an understandable fashion while keeping things somewhat simple.

Opinions please? Thanks~

@NovaFox161 NovaFox161 added enhancement Frontend work in progress Any changes that are currently being worked on labels Aug 30, 2021
@NovaFox161 NovaFox161 added this to the v4.1.2 milestone Aug 30, 2021
@NovaFox161 NovaFox161 self-assigned this Aug 30, 2021
@NovaFox161 NovaFox161 mentioned this issue Aug 30, 2021
12 tasks
@smnc
Copy link
Collaborator

smnc commented Aug 30, 2021

Makes a lot of sense and would probably make for a simpler flow for users. I like it.

NovaFox161 added a commit that referenced this issue Aug 30, 2021
This is locked to devs only for right now until I finish the full flow that is planned in #113

I also cleaned up some code in a few places while I was messing with some stuff
@NovaFox161 NovaFox161 pinned this issue Aug 30, 2021
@NovaFox161 NovaFox161 modified the milestones: v4.1.2, v4.2.0 Sep 28, 2021
@NovaFox161 NovaFox161 modified the milestones: v4.2.0, v4.2.0 Backlog Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement work in progress Any changes that are currently being worked on
Projects
None yet
Development

No branches or pull requests

2 participants