#217 & #218 Card layout config #240

Closed
b24idalu wants to merge 5 commits from Issue#217-Card-layout-config into team_1_week_1
Collaborator

Problems: 1. Save grid data when reloading browser, 2. Create a format on how the data could look when saved to DB (JSON format), 3. Create a way to easily work with grid data later on.

Issues: #217 Card layout config, #218 Load grid layout using config

Solution: 1. Added a way to store grid data through local storage, which is like a file system for the browser. Right now there are two functions that retrieves and stores data to it. Code bits inspired by: local storage example.
2. There is already a default gridsystem, see issue 189. The format will follow that, but have the key "layout" (can be changed to be clearer).
3. Following solution 1, the data stored in the local storage is in json string. Through the function, it is returned as a json object which is the goal.

Possible ToDos:

  • In the future it could be good to add a user key parameter to some function/s.
  • Could be a good idea to move the grid stuff to a separate file and keep the app file clean.
Problems: 1. Save grid data when reloading browser, 2. Create a format on how the data could look when saved to DB (JSON format), 3. Create a way to easily work with grid data later on. Issues: [#217 Card layout config](https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/217), [#218 Load grid layout using config](https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/218) Solution: 1. Added a way to store grid data through local storage, which is like a file system for the browser. Right now there are two functions that retrieves and stores data to it. Code bits inspired by: [local storage example](https://github.com/react-grid-layout/react-grid-layout/blob/master/test/examples/07-localstorage.jsx). 2. There is already a default gridsystem, see [issue 189](https://git.webug.se/Andras/BoundlessFlowCampus2K/pulls/210). The format will follow that, but have the key "layout" (can be changed to be clearer). 3. Following solution 1, the data stored in the local storage is in json string. Through the function, it is returned as a json object which is the goal. Possible ToDos: - In the future it could be good to add a user key parameter to some function/s. - Could be a good idea to move the grid stuff to a separate file and keep the app file clean.
Added three functions to save card data to the local storage so that page can be refreshed and data will be saved. Also added a function to create json files but it is commented since it will not work through browser.
Removed previous json file function.
added the last function that will take a layout from the local storage and return a json string.
Since functions were similar, combined them.
Made code cleaner and commented more.
Collaborator

Unable fix merge conflicts. After consulting @a24vinla the decision was made to abort merge attempt. The reason given it that @b24idalu currently working with the code that would resolve some of the conflicts.

Unable fix merge conflicts. After consulting @a24vinla the decision was made to abort merge attempt. The reason given it that @b24idalu currently working with the code that would resolve some of the conflicts.
a24timsv closed this pull request 2026-04-15 06:38:32 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!240
No description provided.