Files
zulip/web/tests/input_pill.test.cjs
Shubham Padia 274fdc5908 input_pill: Add disabled flag to make a pill disabled.
A disabled pill cannot be removed. It will not have the `x` sign inside
it's pill. Pressing backspace on the pill will not remove it. But it
will still be possible to shift focus on the disabled pill using the
backspace button.

We decided to keep disabled not as a property of `item` and instead of
the pill via `InputPill`. This means that a pill is disabled and not an
item. Also, since the item types vary so much between user, user group,
channel and other pills, adding disabled to `InputPill<ItemType>` makes
it much more simpler to add this capability to wherever needed one by
one.

We also need to pass this property to `generate_pill_html` so the
respective functions can respect that property and render the pill
accordingly.

While this feature is not in use at the immediate moment, we've kept it
around since it is likely to be useful in the future.
2025-01-29 12:36:10 -08:00

18 KiB