Skip to content

[RUM-11291][FO][Part1/2]: Sample app integration - vitals screen refactoring#2820

Merged
satween merged 1 commit into
feature/featureoperationsfrom
tvaleev/feature/RUM-11291-fo-sampleapp
Aug 18, 2025
Merged

[RUM-11291][FO][Part1/2]: Sample app integration - vitals screen refactoring#2820
satween merged 1 commit into
feature/featureoperationsfrom
tvaleev/feature/RUM-11291-fo-sampleapp

Conversation

@satween

@satween satween commented Aug 14, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

Making sample app's vital screen more compact in order to free up some space for FO buttons

image

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@satween
satween requested review from a team as code owners August 14, 2025 17:05
@satween satween changed the title RUM-11291: Refactor vitals screen [RUM-11291][Part1] FO Sample app integration - vitals screen refactoring Aug 14, 2025
@satween satween changed the title [RUM-11291][Part1] FO Sample app integration - vitals screen refactoring [RUM-11291][Part1/2] FO Sample app integration - vitals screen refactoring Aug 14, 2025
mariusc83
mariusc83 previously approved these changes Aug 18, 2025
jonathanmos
jonathanmos previously approved these changes Aug 18, 2025
}

@Suppress("MemberVisibilityCanBePrivate")
var lineOffset: Float = DEFAULT_LINE_OFFSET_DP.px

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we need the explicit types?

@satween satween Aug 18, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think for at least for the properties it's much easier to read such variables(primitives initialized from constants) inside non IDE environment (like on github). For the cases like with new object initialization it's okay to avoid explicit types IMO.


init {
if (attrs != null) {
val a = context.obtainStyledAttributes(attrs, R.styleable.DividerView, 0, 0)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: should we make this variable name more descriptive? same for w and h later on

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed a -> attributes, for w and h in onMeasure I think it's pretty clear what they mean

0xnm
0xnm previously approved these changes Aug 18, 2025
Comment thread sample/kotlin/src/main/kotlin/com/datadog/android/sample/widget/DividerView.kt Outdated
Comment thread sample/kotlin/src/main/kotlin/com/datadog/android/sample/widget/DividerView.kt Outdated
Comment on lines +33 to +50
var lineOffset: Float = DEFAULT_LINE_OFFSET_DP.px
set(value) {
field = value
invalidate()
}

@Suppress("MemberVisibilityCanBePrivate")
var textOffset: Float = DEFAULT_TEXT_OFFSET_DP.px
set(value) {
field = value
invalidate()
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

since those are changing the position, shouldn't requestLayout be called as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

invalidate should be enough here, as text offset doesn't change view bounds and DividerView is not a ViewGroup

Comment thread sample/kotlin/src/main/res/values/styles.xml Outdated
ambushwork
ambushwork previously approved these changes Aug 18, 2025
@satween
satween dismissed stale reviews from ambushwork, 0xnm, jonathanmos, and mariusc83 via ffbbe64 August 18, 2025 10:49
@satween
satween force-pushed the tvaleev/feature/RUM-11291-fo-sampleapp branch from c286ec8 to ffbbe64 Compare August 18, 2025 10:49
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.10%. Comparing base (49f23a5) to head (ffbbe64).
⚠️ Report is 1 commits behind head on feature/featureoperations.

Additional details and impacted files
@@                      Coverage Diff                      @@
##           feature/featureoperations    #2820      +/-   ##
=============================================================
- Coverage                      70.11%   70.10%   -0.01%     
=============================================================
  Files                            835      835              
  Lines                          31418    31418              
  Branches                        5272     5272              
=============================================================
- Hits                           22027    22025       -2     
  Misses                          7916     7916              
- Partials                        1475     1477       +2     

see 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@satween
satween merged commit 670dfbb into feature/featureoperations Aug 18, 2025
25 checks passed
@satween
satween deleted the tvaleev/feature/RUM-11291-fo-sampleapp branch August 18, 2025 13:16
@satween satween changed the title [RUM-11291][Part1/2] FO Sample app integration - vitals screen refactoring [RUM-11291][FO][Part1/2] Sample app integration - vitals screen refactoring Aug 25, 2025
@satween satween changed the title [RUM-11291][FO][Part1/2] Sample app integration - vitals screen refactoring [RUM-11291][FO][Part1/2]: Sample app integration - vitals screen refactoring Aug 25, 2025
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.

6 participants