Replies: 1 comment 1 reply
-
I think it's a good suggestion. I think the cell navigation, storage, etc are already pretty decoupled, as it uses callbacks to delegate the data storage (or at least it was like that, before the last commits). Let me know if I can help related to the task I have done. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to share an idea that might help us solve some of the main issues we're facing with implementing some of the key features of our project. I would love for other suggestions if anyone wants to share. This will be based on my understanding how the app is supposed to work, so please correct me if I'm wrong:
Function writing in Code Editor:
Function Storage and Retrieval:
Separation from HTML Elements:
Multiple Spreadsheets:
Suggested Approach:
Individually, these issues could be solved with our current approach, but this would involve storing too much information directly in the HTML elements (like each cell), which can get messy and is probably not a good approach in general. Additionally, it will be challenging to manage and implement new functionalities without a clear approach and with all the functions being spread.
I suggest creating a JavaScript class to represent the whole spreadsheet(s), with each cell being a separate JS class (similar to an object if you haven't seen it before, but with added structure and methods). This way, whenever we want to update a cell or anything in the spreadsheet, we add the changes to the JS class. This class would then update the spreadsheet, code editor, and save any updates to IndexedDB.
Some of the benefits:
Let me know what you think or if there are any corrections or additional suggestions!
Beta Was this translation helpful? Give feedback.
All reactions