add centralized view size config with default and custom rules #410

Merged
c24elipe merged 2 commits from 252-enforce-view-settings-in-grid into team_2_week_2 2026-04-20 12:09:31 +00:00
Collaborator

Implemented centralized configuration for view size settings in the grid.
What was done
Added a default configuration (DEFAULT_VIEW_CONFIG) for consistent sizing across all views
Added custom configurations for specific views that require different size constraints
Implemented responsive breakpoints (lg, md, sm, xs, xxs) based on container width
Created a helper function (getViewSizeConfig) to dynamically apply the correct configuration
Integrated the configuration system into Dashboard when adding new views

Result
All views now receive size constraints automatically
Specific views can override default behavior when needed
Improved consistency and maintainability of grid layout

Notes
Views that do not have custom config fall back to default settings
No manual size configuration is required when adding new views

Implemented centralized configuration for view size settings in the grid. What was done Added a default configuration (DEFAULT_VIEW_CONFIG) for consistent sizing across all views Added custom configurations for specific views that require different size constraints Implemented responsive breakpoints (lg, md, sm, xs, xxs) based on container width Created a helper function (getViewSizeConfig) to dynamically apply the correct configuration Integrated the configuration system into Dashboard when adding new views Result All views now receive size constraints automatically Specific views can override default behavior when needed Improved consistency and maintainability of grid layout Notes Views that do not have custom config fall back to default settings No manual size configuration is required when adding new views
Collaborator

Review on #252

Whats done

I checked that the code follows the standards and that the addition of of view config did not break any part of the application.

Tested on ubuntu using firefox

  • App starts
    • Tested so that most basic functionality is intact (adding views, moving, resizing, etc.)
    • For the most part, everything works as intended, but it seems like if you move a card before resizing it, it falls back to the default size config, which is really noticeable with map and parking view, as the content overflows out of the card. If you resize the card first, you can move it without affecting the view config, as long as you do not add other cards. However, I suspect that this issue occurs since the cards variables (h, w and such) are not updated when changed, something addressed in pr #398.
      image

(Top card was moved before resized and can not be changed to have the same hight as the bottom card, which leads me to believe that this is caused by it having a different size config)

Inspected following files

  • frontend/src/viewConfig.js
    • Indentation/code styling is ok
    • Naming convention is ok
    • Comments
      • There are no comments in the file, but I have no problem with this, as the code is clear nonetheless.

What needs to be done

  • I think the issue that occurs when a card is moved might need to be looked at, but as stated earlier, it could already be solved in team 1's branch. If this persists after the weekly merge, I think it should be added as it's own issue.

Conclusion

  • I think this ready to be merged
# Review on #252 ## Whats done I checked that the code follows the standards and that the addition of of view config did not break any part of the application. ### Tested on ubuntu using firefox + App starts + Tested so that most basic functionality is intact (adding views, moving, resizing, etc.) + For the most part, everything works as intended, but it seems like if you move a card before resizing it, it falls back to the default size config, which is really noticeable with map and parking view, as the content overflows out of the card. If you resize the card first, you can move it without affecting the view config, as long as you do not add other cards. However, I suspect that this issue occurs since the cards variables (h, w and such) are not updated when changed, something addressed in pr #398. ![image](/attachments/6504e66d-71c6-4ce3-a061-79fa95a0a5f4) (Top card was moved before resized and can not be changed to have the same hight as the bottom card, which leads me to believe that this is caused by it having a different size config) ### Inspected following files + frontend/src/viewConfig.js + Indentation/code styling is ok + Naming convention is ok + Comments + There are no comments in the file, but I have no problem with this, as the code is clear nonetheless. ## What needs to be done + I think the issue that occurs when a card is moved might need to be looked at, but as stated earlier, it could already be solved in team 1's branch. If this persists after the weekly merge, I think it should be added as it's own issue. ## Conclusion + I think this ready to be merged
Collaborator

Fixed merge conflict.

The fixes discussed need to be revisited after Wednesday's merge.

Fixed merge conflict. The fixes discussed need to be revisited after Wednesday's merge.
c24elipe merged commit f375045750 into team_2_week_2 2026-04-20 12:09:31 +00:00
c24elipe deleted branch 252-enforce-view-settings-in-grid 2026-04-20 12:09:32 +00:00
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!410
No description provided.