PM-42349: bug: Hide static password mask when field is blank - #7376
PM-42349: bug: Hide static password mask when field is blank#7376david-livefront wants to merge 1 commit into
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This is a single-file bug fix in the shared Code Review Details
|
| import com.bitwarden.ui.platform.base.util.toAnnotatedString | ||
|
|
||
| /** | ||
| * Returns a [VisualTransformation] that masks text with [mask]. When [staticCharacterCount] is |
There was a problem hiding this comment.
♻️ DEBT: KDoc now contradicts the behavior this PR introduces.
Details and fix
The sentence continuing on the next line states that when staticCharacterCount is non-null "the transformed text always contains that number of mask characters." After this change, blank input produces zero mask characters, so a caller of this public :ui API reading the doc would expect the opposite of what happens.
Suggested wording:
/**
* Returns a [VisualTransformation] that masks text with [mask]. When [staticCharacterCount] is
* non-null and the text is non-empty, the transformed text contains that number of mask
* characters. Blank text is never masked.
*/
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7376 +/- ##
==========================================
+ Coverage 85.73% 86.78% +1.04%
==========================================
Files 1056 887 -169
Lines 69016 65838 -3178
Branches 10279 10169 -110
==========================================
- Hits 59170 57136 -2034
+ Misses 6233 5124 -1109
+ Partials 3613 3578 -35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
e2d62f0 to
03eb81e
Compare
🎟️ Tracking
PM-42349
📔 Objective
This PR ensures that an empty password field does not have the mask displayed.