#279-Grid-layout-breakout #384

Closed
b24idalu wants to merge 0 commits from #279-Grid-layout-breakout into team_2_week_2
Collaborator

Regarding issues #217 and #218 and #279.

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, 4. Put everything in a separate file.

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.
4. Everything regarding the issues, are located in a seperate Grid.js file located in /components/grid.

Regarding issues [#217 and #218](https://git.webug.se/Andras/BoundlessFlowCampus2K/pulls/240) and [#279](https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/279). 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, 4. Put everything in a separate file. 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. 4. Everything regarding the issues, are located in a seperate Grid.js file located in /components/grid.
Updated and added grid saving so that when one reloads the cards will remain in the same position
Added grid file, will add code later
Havent tested the code yet but need to save the progress
Broke out grid saving stuff, also modified some other layout stuff regarding new views to make it possible to save in localstorage.
c22abdal approved these changes 2026-04-17 09:06:49 +00:00
c22abdal left a comment
Collaborator

Great work!
Everything works as expected. Good cleanup in the Dashboard.js file and good structure in SaveGrid.js.

Great work! Everything works as expected. Good cleanup in the Dashboard.js file and good structure in SaveGrid.js.
Collaborator

Merged!

Merged!
a24vinla closed this pull request 2026-04-20 07:11:59 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!384
No description provided.