RocketChat / Apps.Notion

Integrating Notion with Rocket.Chat
https://github.com/Nabhag8848/Google-Summer-Of-Code
10 stars 18 forks source link

[Feat]: Adding a modal to allow users to add content to the Notion page. #60

Open Spiral-Memory opened 7 months ago

Spiral-Memory commented 7 months ago

What do we need?

I believe it would be beneficial to implement a feature where users can utilize a '/notion append' command, triggering a modal. Within this modal, users can select pages and find a text area field to add their content, allowing them to save content it directly to Notion without the need to send a message to any channel in Rocket Chat. They could optionally add heading as well to their page. Currently, users have to send a message first before and then send it to page.

Acceptance Criteria

Relevant ScreenShots

The current screenshot was created by editing elements in the inspect element tool to illustrate how it might appear. The same design can be implemented in reality.

image

Expected Output on Notion Page:

image

Further Comments

No response

Spiral-Memory commented 7 months ago

@Nabhag8848 , I think this feature would be useful for adding content directly to the Notion page, optimizing the use case of the Notion RC app integration. I have started looking into the issue. Please let me know if this would be a good feature to have. What are your thoughts on this? Can I proceed with the implementation?

Spiral-Memory commented 7 months ago

Hey @Nabhag8848 , I have implemented the prototype for the raised issue. Please check out the demo video and let me know your thoughts. If it looks good, I will refactor the code and raise a PR.

https://github.com/RocketChat/Apps.Notion/assets/78961432/cbea07e8-189b-4104-8626-a2f6e99d1578

Nabhag8848 commented 7 months ago

This looks cool, Amazing. but lets think in perspective of user, would they ever prefer to feel a form to add content to their page, chances are less and its tedious task for users to add content like this, isn't it ? we want to make their life easier not harder + Adding Content to the Notion from RocketChat would be cool but not an user-centric in my opinion. Every Integration tries to solve the workflows right not replicate the API and do this xyz from different platform ? I learned this on my later part of gsoc phase, you might see we do have one feature that replicates apis

I had an idea similar idea for have a multiline input in modal and that multiline input supports markdown so we can directly insert in page but his has own problems, we can't write in specific area we want. Comment Multiline input supports markdown if you just want to have fun and learn how it handles markdown, hehehe.

I will open one feature for you to work on, that is challenging but you will able to handle as i feel you will handle that complexity as of what i can see here.

Spiral-Memory commented 7 months ago

Hey @Nabhag8848 , thank you for the appreciation. Yes, you are correct that having a form to add content is a little more tedious than directly going to Notion and adding, but the same is true for adding a record as well. However, I feel that currently, in the integration, there is no way to add content to the body of the page. We only have comments (that are shown at the top of the page) and "send to page" options.

When I first added this integration as a user, after creating a page, my first thought was, "Okay, but how do I add something here?" This was the thought from a user perspective. I also asked my friends about the integration; they also had this thought that it would be better if I could add some custom content to this page.

Even for the sake of completeness of the integration, the two features – adding content to a page and viewing the content from a page (not sure how to implement that, I will research on that) – are necessary, just like we have the option to create a record or view a database, but the same feature with respect to page is missing.

While I respect your experience, I feel the problem will arise when we try to replicate the API for every random thing. However, having a basic feature like the ability to add something on a page is crucial.

There might be many situations where I don't want to leave the workspace to add something. Imagine being in a situation where you are having an important conversation on Rocket Chat with your team regarding a feature implementation. You suddenly get an idea on how this can be implemented, and you want to save it to Notion so that you can brainstorm on it later. You can easily save it directly through Rocket Chat with this feature without leaving your workspace, along with your topic heading.

So, I urge you to reconsider your decision on this feature. If you want something to be added or changed in this feature, I will be happy to do that change.

It won't be tough to add content; the default setting will be no heading, just open the form, add content, and save. Adding a heading can be an optional feature or can be removed, if you think user have to fill a form.

I am raising the PR for now and leave it up to your decision on whether you want to integrate this feature now or later on or if you wish you can close the same.

Also, sure Nabhag, please open the issue you are thinking about. I will try my best to work on it and thank you for thinking that I'm capable of handling the complexity 🚀. Thank you so much.

Spiral-Memory commented 7 months ago

Alternatively, if you find the modal not suitable for the same feature, we can utilize the contextual bar. Similar to how we have commenting on the page, incorporating the same feature that I have implemented in the modal.

image

I have also tried to simulate a use case demonstrating when this feature will be needed for you as part of the demo. Similarly, there can be many useful cases, sir.

https://github.com/RocketChat/Apps.Notion/assets/78961432/bbe3dd1a-f6a0-4071-a986-8b70650dec88