feat(input): update mobile component - #769
Conversation
BREAKING CHANGE: Replace blue and white appearances with primary and secondary; replace normal and large shapes with sm, md, and lg; move Input style APIs from input.style to input.styles and InputPlaceholder to the input package. Use InputLayout instead of InputContainer for custom layouts.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0d224a065
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab16e9b9f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
BREAKING CHANGE: InputLayout is no longer public and does not replace InputContainer. Use Input with its supported customization parameters. InputState, LocalState, and InputAppearance.getColorsFromState are now internal.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c88e15e1d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
TorinAsakura
left a comment
There was a problem hiding this comment.
В #751 типизированные Input-сценарии должны быть либо реализованы, либо явно вынесены из объёма. В полном diff есть только общий Input: отсутствуют password, email, phone, numeric и search-сценарии, а в описании PR не зафиксирован их перенос и не указана связанная следующая задача.
Поэтому Close #751 сейчас не соответствует критериям задачи. Нужно либо реализовать и проверить согласованный набор typed inputs, либо до поставки явно изменить границу scope и зафиксировать дальнейшую работу.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be50e16a51
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
добавила typed и пруф |
| value = value, | ||
| onValueChange = onValueChange, | ||
| interactionSource = interactionSource, | ||
| isError = isError || validator?.invoke(value.text) == false, |
There was a problem hiding this comment.
Встроенный validator меняет только isError поля, но не состояние supporting message. Базовый Input считает сообщение ошибкой только при наличии errorText, поэтому невалидный email получает красную рамку, а переданный helperText остаётся нейтральным. Та же проблема есть в PhoneInput — она уже видна в iOS-примере с красным телефоном и серой подписью Phone.
Сейчас вызывающему коду придётся повторно вычислять тот же validator, чтобы вручную сформировать errorText. Тогда встроенная валидация typed input не закрывает собственный error-сценарий.
Нужно один раз вычислять результат валидации внутри компонента и использовать его и для состояния поля, и для error content. Нужны проверки состояний valid, invalid, invalid + focused и возврата из invalid в valid.
| Box( | ||
| modifier = Modifier | ||
| .size(addonSize) | ||
| .action(addon), |
There was a problem hiding this comment.
enabled = false отключает ввод и меняет визуальное состояние поля, но не отключает пользовательские ActionAddon. Доступность поля не передаётся в InputContent и Addons, поэтому здесь учитывается только ActionAddon.enabled, который по умолчанию равен true.
В результате disabled-поле всё ещё вызывает onClick пользовательского addon. Встроенные clear/password actions компенсируют это вручную, но базовый публичный Input оставляет действие активным.
Нужно передать доступность поля в рендеринг addons и применять inputEnabled && addon.enabled. Проверка должна вызывать action через touch и semantics: при disabled callback не вызывается, при enabled вызывается ровно один раз.
| } | ||
| Box( | ||
| modifier = Modifier | ||
| .size(addonSize) |
There was a problem hiding this comment.
Clickable применяется к wrapper размером с визуальную иконку: 16/20/24dp, при этом gaps равны 8/12/16dp. Центры двух соседних actions оказываются на расстоянии 24/32/40dp.
Compose автоматически расширяет маленький clickable до минимального touch target за пределами его layout bounds, но текущий layout не резервирует место под это расширение. Поэтому интерактивные области соседних actions пересекаются. Это воспроизводится через публичный список addons; ClearableInput и PasswordInput дополнительно добавляют встроенное действие после пользовательских.
Визуальные размеры иконок можно сохранить, но каждому действию нужна собственная неперекрывающаяся область не меньше 48×48dp. Нужна UI/accessibility-проверка двух соседних actions: каждый tap должен вызывать только свой callback, а их touch bounds не должны пересекаться. Описание поведения minimum touch target в Compose: https://developer.android.com/develop/ui/compose/accessibility/api-defaults.
Таска
Как проверять
InputДействие: переключить
Dark theme,EnabledиError, ввести текст вPrimaryиSecondaryдля размеровSm,MdиLgОжидаемый результат: все Input редактируются; состояния
enabled,disabledиerrorотображаются корректно; при смене темы фон, текст и поля переключаются на соответствующие цвета, в тёмной теме нет чёрного текста.Пруфы
Details
FILE.2026-09-03.20.28.11.mp4
ScreenRecording_09-10-2026.01-01-04_1.MP4