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

Added values in dimens.xml #2937

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

anandwana001
Copy link
Collaborator

Fixes #2913

@gino-m PTAL?

Can we generalize the values or should we go feature by feature?

ground/src/main/res/values/dimens.xml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 82.60870% with 4 lines in your changes missing coverage. Please review.

Project coverage is 63.50%. Comparing base (4a5d796) to head (a8e7ab6).

Files with missing lines Patch % Lines
...roid/ground/ui/offlineareas/OfflineAreaListItem.kt 80.00% 0 Missing and 3 partials ⚠️
...datacollection/DataSubmissionConfirmationDialog.kt 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #2937   +/-   ##
=========================================
  Coverage     63.49%   63.50%           
  Complexity     1241     1241           
=========================================
  Files           267      267           
  Lines          6509     6519   +10     
  Branches        911      914    +3     
=========================================
+ Hits           4133     4140    +7     
  Misses         1790     1790           
- Partials        586      589    +3     
Files with missing lines Coverage Δ
...datacollection/DataSubmissionConfirmationDialog.kt 56.41% <87.50%> (+1.74%) ⬆️
...roid/ground/ui/offlineareas/OfflineAreaListItem.kt 75.00% <80.00%> (-2.78%) ⬇️

@anandwana001
Copy link
Collaborator Author

@shobhitagarwal1612 keeping the name as dimen_Xdp to be used as the generic one wherever required.

@shobhitagarwal1612
Copy link
Member

@shobhitagarwal1612 keeping the name as dimen_Xdp to be used as the generic one wherever required.

But how is this going to be provide any value? This is as good as hardcoding the value in the code. Before we make any more changes, can we discuss this further in the bug regarding which approach should be undertaken?

Possible options:

  1. Current approach i.e. use generic dimen_Xdp
  2. Creating a new dimen based on the type of usage e.g. spacing_{small|medium|large}, image_size_{small|medium|large}, etc.

We should also clearly mention in the bug why we are doing this refactor and the potential benefits of it.

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.

[Code health] Ensure all UI sizes and dimensions are defined in dimens.xml
3 participants