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 VisualDensitySetting class. #624

Merged
merged 2 commits into from
Apr 23, 2023

Conversation

Jonas-Sander
Copy link
Collaborator

This class is a prerequisite for #79.

With this class we can track if the user has manually chosen a specific VisualDensity or if they use the default VisualDensity.adaptivePlatformDensity (one can't tell by looking just at the VisualDensity class).

@docs-page
Copy link

docs-page bot commented Apr 19, 2023

To view this pull requests documentation preview, visit the following URL:

docs.page/sharezoneapp/sharezone-app~624

Documentation is deployed and generated using docs.page.

Comment on lines 133 to 138
data: {
'visual_density': {
'horizontal': value.horizontal,
'vertical': value.vertical
}
// bool is not allowed in firebase_analytics so we use `toString`.
'isAdaptivePlatformDensity': value.isAdaptivePlatformDensity.toString(),
'horizontal': value.visualDensity.horizontal,
'vertical': value.visualDensity.vertical
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old code would have always thrown an error here since the map inside map ('data:': { 'visual_density': {...}}) is not allowed by firebase_analytics.

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit a94fa0f):

https://sharezone-test--pr624-theme-settings-visua-n7iwvicu.web.app

(expires Wed, 26 Apr 2023 19:30:29 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4cb3ae61e1e018abfd9841fd3239f5b49ccc034b

Copy link
Member

@nilsreichardt nilsreichardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jonas-Sander Jonas-Sander added this pull request to the merge queue Apr 23, 2023
Merged via the queue into main with commit 839e495 Apr 23, 2023
@Jonas-Sander Jonas-Sander deleted the theme-settings-visual-density-class branch April 23, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants