taiga-ui icon indicating copy to clipboard operation
taiga-ui copied to clipboard

🚀 - `PrimitiveTextfield` should use `Maskito` for `tuiTextfieldPrefix` / `tuiTextfieldPostfix`

Open splincode opened this issue 2 years ago • 5 comments

Which @taiga-ui/* package(s) are the source of the bug?

core

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/taiga-starter

Is this issue blocking you?

Non-Blocking

Description

https://github.com/Tinkoff/taiga-ui/blob/main/projects/core/components/primitive-textfield/value-decoration/value-decoration.component.ts#L75

image

https://user-images.githubusercontent.com/12021443/176402849-706c0bb0-039b-4963-a50b-8bd409a4014f.mov

Angular version

latest

Taiga UI version

latest

Which browsers have you used?

  • [X] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Edge

Which operating systems have you used?

  • [X] macOS
  • [ ] Windows
  • [ ] Linux
  • [ ] iOS
  • [ ] Android

splincode avatar Jun 29 '22 09:06 splincode

Posible regression - https://github.com/Tinkoff/taiga-ui/pull/1867

splincode avatar Jul 08 '22 14:07 splincode

I wonder, if with the new mask we should use prefix and postfix from the mask and keep them part of the input, rather than separate DOM elements, what do you think, @splincode @nsbarsukov @vladimirpotekhin ? Things to keep in mind:

  1. Right now prefix/postfix are not selectable. Is it good?
  2. RTL languages support

waterplea avatar Mar 27 '23 08:03 waterplea

I thought about it too. At first glance, putting a prefix / postfix in the input part is a more organic solution.

vladimirpotekhin avatar Mar 28 '23 07:03 vladimirpotekhin

  • https://github.com/Tinkoff/maskito/issues/231

nsbarsukov avatar Mar 28 '23 07:03 nsbarsukov

I thought about it too. At first glance, putting a prefix / postfix in the input part is a more organic solution.

It would definitely simplify a lot of things.

waterplea avatar Mar 28 '23 08:03 waterplea