Skip to content

feat(input): update mobile component - #769

Open
comfrt1k wants to merge 19 commits into
feat/v2from
feat/mobile-input
Open

feat(input): update mobile component#769
comfrt1k wants to merge 19 commits into
feat/v2from
feat/mobile-input

Conversation

@comfrt1k

@comfrt1k comfrt1k commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Таска

Как проверять

  1. Контекст: мобильный Storybook, story 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

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.
@comfrt1k
comfrt1k marked this pull request as ready for review September 3, 2026 17:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T21:32:10.049481Z d2b3e80 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

@comfrt1k

comfrt1k commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

@comfrt1k

comfrt1k commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 4d5a4b1594

ℹ️ 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".

@comfrt1k

comfrt1k commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: e9a91943b8

ℹ️ 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".

@TorinAsakura TorinAsakura left a comment

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.

В #751 типизированные Input-сценарии должны быть либо реализованы, либо явно вынесены из объёма. В полном diff есть только общий Input: отсутствуют password, email, phone, numeric и search-сценарии, а в описании PR не зафиксирован их перенос и не указана связанная следующая задача.

Поэтому Close #751 сейчас не соответствует критериям задачи. Нужно либо реализовать и проверить согласованный набор typed inputs, либо до поставки явно изменить границу scope и зафиксировать дальнейшую работу.

@comfrt1k
comfrt1k changed the base branch from master to feat/v2 September 9, 2026 16:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

@comfrt1k

comfrt1k commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Provided git ref 27808ec102b3afe789f810b0238d0fc3f2fb82cd does not exist
ℹ️ 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".

@comfrt1k

comfrt1k commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

В #751 типизированные Input-сценарии должны быть либо реализованы, либо явно вынесены из объёма. В полном diff есть только общий Input: отсутствуют password, email, phone, numeric и search-сценарии, а в описании PR не зафиксирован их перенос и не указана связанная следующая задача.

Поэтому Close #751 сейчас не соответствует критериям задачи. Нужно либо реализовать и проверить согласованный набор typed inputs, либо до поставки явно изменить границу scope и зафиксировать дальнейшую работу.

добавила typed и пруф

value = value,
onValueChange = onValueChange,
interactionSource = interactionSource,
isError = isError || validator?.invoke(value.text) == false,

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.

Встроенный 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),

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.

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)

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.

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.

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.

[Feature] Реализовать Input для Hyperion Mobile

2 participants