Skip to content
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

Add ability to define different widget layouts for different screen sizes #545

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from

Conversation

oxixes
Copy link
Contributor

@oxixes oxixes commented Jun 17, 2024

Proposed changes

Allows to define different widget configurations for different screen sizes, so that a phone can have a different view than a PC. You can define the boundaries in the workspace configuration, and these can also be different by tab if the user wants to.

Their position and size are adjusted dynamically when the window size changes.

Types of changes

What types of changes does your code introduce to the project: Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

To do this, widgets now store their position for each different screen size. All widgets must have one and only one defined position for every screen size possible, so the boundaries must cover the whole range of possible screen sizes (from 0 to infinity) without gaps or overlaps.

One current limitation is that the layout (column, free, sidebars...) is stored at the widget level, meaning that a widget can only belong to a single layout, and therefore if you change the layout of a widget in one screen size, it will change in every screen size. This limitation can be solved in the future, but this PR is long enough, so it will be part of a different one.

Moreover, all widgets have to be visible in every layout configuration, so in the future we could add the ability to hide widgets in a specific screen size, so one could effectively design completely different layouts (with different widgets) for each screen size.

@coveralls
Copy link

Coverage Status

coverage: 87.701%. first build
when pulling d063cb6 on oxixes:screen-sizes
into b197d37 on Wirecloud:develop.

@coveralls
Copy link

Coverage Status

coverage: 87.886% (-0.3%) from 88.21%
when pulling 71a2b6c on oxixes:screen-sizes
into 2a25766 on Wirecloud:develop.

@coveralls
Copy link

Coverage Status

coverage: 87.891% (-0.3%) from 88.21%
when pulling 3a58927 on oxixes:screen-sizes
into 2a25766 on Wirecloud:develop.

@coveralls
Copy link

Coverage Status

coverage: 88.179% (-0.03%) from 88.21%
when pulling 3a18c75 on oxixes:screen-sizes
into 2a25766 on Wirecloud:develop.

@coveralls
Copy link

Coverage Status

coverage: 88.256% (+0.05%) from 88.21%
when pulling 1cb100b on oxixes:screen-sizes
into 2a25766 on Wirecloud:develop.

@coveralls
Copy link

Coverage Status

coverage: 88.256% (+0.05%) from 88.21%
when pulling ece1ade on oxixes:screen-sizes
into 2a25766 on Wirecloud:develop.

@coveralls
Copy link

Coverage Status

coverage: 88.263% (+0.05%) from 88.21%
when pulling 20e3c80 on oxixes:screen-sizes
into 2a25766 on Wirecloud:develop.

@coveralls
Copy link

Coverage Status

coverage: 88.257% (+0.05%) from 88.21%
when pulling f9702d0 on oxixes:screen-sizes
into 2a25766 on Wirecloud:develop.

@coveralls
Copy link

Coverage Status

coverage: 88.229% (+0.02%) from 88.21%
when pulling 196f94e on oxixes:screen-sizes
into 2a25766 on Wirecloud:develop.

@oxixes oxixes marked this pull request as ready for review July 2, 2024 14:57
@oxixes
Copy link
Contributor Author

oxixes commented Jul 2, 2024

This should be ready, although any further testing is highly appreciated.

@coveralls
Copy link

coveralls commented Jul 8, 2024

Coverage Status

coverage: 88.223% (+0.01%) from 88.21%
when pulling 9ee4e0d on oxixes:screen-sizes
into 2a25766 on Wirecloud:develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants