-
Notifications
You must be signed in to change notification settings - Fork 22
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
[Feat] Update Record in Notion Database #69
Comments
@Spiral-Memory Created this issue, and lemme know what are some issues we will we facing and edge cases i may have missed.
|
Sure, @Nabhag8848 , I've reviewed the issue, and it seems interesting yet tricky to implement. I'll begin working on it soon and will keep you updated. Currently, I am building some prototypes to showcase for GSoC, and then I have to write proposals, so I might feel a bit slow. I will do my best to manage both. As you suggested, I will raise a PR and make incremental additions to it. |
Would it be an appropriate approach? I mean, suppose an organization created multiple records or performed other actions and every action will trigger notion to send some notification. Now, that particular message will be on top, and one has to scroll up and find that message to update it. What if the messages are pruned? A better approach, I think, would be to have some ID for each record, and one has to provide the ID for that command or consider some other approach. What do you think? |
Apart from that, I understand the rest of the requirements, and I am fine with them. |
1
2
ps: this will make this feature more complex |
Hey @Nabhag8848 , I have one doubt. Suppose I made a modal where we have the option to choose a database to update. Now, consider that the user chose that database. Next, we have to show another dropdown to choose from all the records. Once that is chosen, we will fetch all the values in that record and then provide an option to update it. Is that the correct flow, right? I have added the code to choose till database, will start working on fetching records and populating the dropdown dynamically soon. |
I think, I will prefer to go with approach 1 or maybe later to make it more accessible we can implement approach 2 sparingly |
@Spiral-Memory can we have a first version without this complexity ? Just don't handle any of 2. Just have a message box action and open the modal having that record info directly with elements - No db and record selection.
|
Actually @Nabhag8848 I have already made it till this point of selecting DB then updating that modal for record, it wasn't very complex.. Since we have time, I will go slowly and commit in the draft. Later we can do iterations to rather focus on improving it. N no worries, I'm working in small chunks only 😃.. |
|
Yes for sure ! 😃 |
Started working on this again ... |
What do we need?
Currently Once the Record is created using
/notion create
we don't have anyway to update that record from rc. lets say org is keeping track of project they are working on - in Notion Database and there is extension of project deadline, or it needs to assign to different person, xyz, etc. we can't do it currently which is needed and happens often.we want to implement a button on the message that has been send on creation - update record particularly a message box action button which exist on every message. This button should only exist on that creation message.
Open the Modal (Similar to Creation Record Modal particular when database is selected that view) with All the input Elements with initial value which is part of that record, Every Creation Message would have one particular record attached from database right, get that values through api first and open the modal with elements you need and give the current value of record to default value to elements, have the elements according to type of value, for reference use the code we already have for creation record.
similar modal we already have in create record feature right ? and update those fields which needed to be in one go in input elements the one which are not updated in the input fields doesn't matter cause we can make the request of changed value and default which wasn't changed and update the fields through API. This allows to make multiple fields change in one go.
Once the fields are filled, and updated through api when from modal the user presses Update (SubmitAction - BlueButton) We need to Update the Creation Message Particular from where the MessageBox Action was initiated, we need to update the message with new fields which were updated during the updation.
Also Make sure We handle ViewErrors,
Also Handle If when the there is update action button pressed the user is connected to workspace in which that database exist if not notify user you are connected to different workspace.
In this case, We currently don't have goal for menu actions: But make sure its scalable if we might need to include OverFlowAction Menu which is create database + create page or record which we should be able to do.
For Reference Check the Create Record Codebase you can find lot of code which will help you, you will need to know in depth things about how we are caching data with persistance storage.
Acceptance Criteria
update record
.Relevant ScreenShots
Update Record
in Message Box Action of Creation MessageFurther Comments
The text was updated successfully, but these errors were encountered: