Skip to content

Conversation

@LZRS
Copy link
Collaborator

@LZRS LZRS commented Sep 9, 2025

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #2860

Description
Clear and concise code change description.

Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type
Choose one: (Bug fix | Feature | Documentation | Testing | Code health | Builds | Releases | Other)

Screenshots (if applicable)

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@LZRS LZRS force-pushed the sdc-compose-date-view branch 2 times, most recently from 682f16e to 5488bfd Compare September 16, 2025 01:10
@LZRS LZRS force-pushed the sdc-compose-date-view branch from 9eb5df4 to 1c0bb48 Compare September 27, 2025 00:03
@LZRS LZRS force-pushed the sdc-compose-date-view branch 5 times, most recently from d527337 to 3b05b71 Compare October 14, 2025 00:01
@LZRS LZRS force-pushed the sdc-compose-date-view branch 2 times, most recently from 3f5c7a9 to 708c675 Compare October 15, 2025 23:53
@LZRS LZRS force-pushed the sdc-compose-date-view branch from 708c675 to 76c76f5 Compare November 4, 2025 23:27
@LZRS LZRS marked this pull request as ready for review November 4, 2025 23:28
@LZRS LZRS requested a review from a team as a code owner November 4, 2025 23:28
@LZRS LZRS requested a review from ktarasenko November 4, 2025 23:28
@LZRS LZRS force-pushed the sdc-compose-date-view branch from 76c76f5 to 25bb605 Compare November 5, 2025 08:50
import androidx.compose.ui.text.input.TransformedText
import androidx.compose.ui.text.input.VisualTransformation

class DateVisualTransformation(
Copy link
Collaborator

Choose a reason for hiding this comment

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

add doc

Comment on lines 65 to 68
var transformedText = ""
trimmedText.forEachIndexed { index, char ->
transformedText += char
if (index + 1 == firstDelimiterOffset || index + 2 == secondDelimiterOffset) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add documentation

LZRS added 3 commits November 11, 2025 01:16
To note; the ExposedDropdownMenuBox is specifically designed
for displaying a list of selectable items within a menu,
and not for triggering dialogs
@LZRS LZRS force-pushed the sdc-compose-date-view branch 2 times, most recently from 3589d01 to 2fc8e63 Compare November 21, 2025 15:00
To simplify date formatting visualization and synchronization
@LZRS LZRS force-pushed the sdc-compose-date-view branch from 2fc8e63 to 268a71d Compare November 21, 2025 22:07
@LZRS LZRS force-pushed the sdc-compose-date-view branch from 48f8fe4 to 5d3fe12 Compare November 24, 2025 09:52
@LZRS LZRS force-pushed the sdc-compose-date-view branch from 5d3fe12 to 4fcf123 Compare November 24, 2025 11:21
@LZRS
Copy link
Collaborator Author

LZRS commented Nov 25, 2025

Date Widget

Screen_recording_20251125_025409.mp4

@LZRS
Copy link
Collaborator Author

LZRS commented Nov 25, 2025

Time widget

Screen_recording_20251125_025448.mp4

@LZRS
Copy link
Collaborator Author

LZRS commented Nov 25, 2025

DateTime Widget

Screen_recording_20251125_161625.mp4

Comment on lines +267 to +268
val delimiterFirstIndex: Int = pattern.indexOf(delimiter)
val delimiterLastIndex: Int = pattern.lastIndexOf(delimiter)
Copy link
Collaborator

Choose a reason for hiding this comment

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

just have a function that checks if a certain index is a delimiter?


val delimiterFirstIndex: Int = pattern.indexOf(delimiter)
val delimiterLastIndex: Int = pattern.lastIndexOf(delimiter)
val delimiterExistsInPattern = delimiterFirstIndex != -1 && delimiterLastIndex != -1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
val delimiterExistsInPattern = delimiterFirstIndex != -1 && delimiterLastIndex != -1
val delimiterExistsInPattern = pattern.indexOf(delimiter) != -1

Comment on lines +132 to +138
if (
this.length > dateInputFormat.delimiterFirstIndex &&
get(dateInputFormat.delimiterFirstIndex) != dateInputFormat.delimiter
) {
insert(dateInputFormat.delimiterFirstIndex, dateInputFormat.delimiter)
}
if (
Copy link
Collaborator

Choose a reason for hiding this comment

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

should these 2 ifs collapse into 1? there's no difference between the first and last delimiters, just treat them the same way.

@github-project-automation github-project-automation bot moved this from New to PR under Review in Android FHIR SDK Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: PR under Review

Development

Successfully merging this pull request may close these issues.

Migrate DatePickerViewHolderFactory, TimePickerViewHolderFactory and DateTimePickerViewHolderFactory to compose

2 participants