Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
edc879c
Added `input` module to `bevy_text` with systems and components to su…
ickshonpe Jul 30, 2025
f36f9d0
use `is_empty()` instead of checking lengeth is 0
ickshonpe Jul 30, 2025
771477c
Renamings:
ickshonpe Aug 1, 2025
11074c0
Renamed `TextInputPasswordMask` to `PasswordMask`
ickshonpe Aug 1, 2025
f991426
Updated comments including suggestions from review
ickshonpe Aug 1, 2025
62ca2f8
Added a `TextEdit::InsertString` variant. Use to insert a string at …
ickshonpe Aug 1, 2025
308d0c9
Renamed `appy_text_input_action` to `apply_text_edit`
ickshonpe Aug 1, 2025
158f329
Updated `TextInputValue`'s comments to explain that it is synchronise…
ickshonpe Aug 1, 2025
a7d5e45
Expanded the doc comments for `TextInputAttributes`.
ickshonpe Aug 1, 2025
785a1d5
Renamed `TextInputUndoHistory` to `UndoHistory`
ickshonpe Aug 1, 2025
f637123
Merge branch 'main' into bevy-text-input
ickshonpe Aug 1, 2025
b4589b8
Updated buffer's docs and added a `needs_redraw` function.
ickshonpe Aug 1, 2025
8e61105
Updated the doc comments for `apply_text_edits`
ickshonpe Aug 1, 2025
ede9d60
updated another doc comment
ickshonpe Aug 1, 2025
a80a5dc
More doc comments
ickshonpe Aug 1, 2025
0b2c268
Edited the doc comment for apply_text_edits
ickshonpe Aug 1, 2025
93149bc
More comment edits
ickshonpe Aug 1, 2025
049e350
Renamed `Prompt` to `Placeholder` and also updated the comments and t…
ickshonpe Aug 1, 2025
3e9c860
Fixed renaming.
ickshonpe Aug 1, 2025
5c956c6
Rephrased doc comment.
ickshonpe Aug 1, 2025
6396a11
Spellings.
ickshonpe Aug 1, 2025
5d34e6d
Renamed the `InvalidInput` and `ValueChanged` `TextInputEvent` varian…
ickshonpe Aug 1, 2025
57a70cd
Fixed event dispatch.
ickshonpe Aug 1, 2025
85bed33
Added release note
ickshonpe Aug 1, 2025
f43c461
Added migration note for `load_font_to_fontdb` function changes.
ickshonpe Aug 1, 2025
0b6b1d2
Update release note
ickshonpe Aug 1, 2025
897d741
Merge branch 'main' into bevy-text-input
ickshonpe Aug 2, 2025
2bd0216
Update crates/bevy_text/src/input.rs
ickshonpe Aug 2, 2025
255d2c1
Update crates/bevy_text/src/input.rs
ickshonpe Aug 2, 2025
419bcaf
Update crates/bevy_text/src/input.rs
ickshonpe Aug 2, 2025
fe38cf2
Update release-content/release-notes/bevy_text_input_module.md
ickshonpe Aug 2, 2025
dea6616
Update crates/bevy_text/src/input.rs
ickshonpe Aug 2, 2025
48475ff
FIxed comment
ickshonpe Aug 2, 2025
893f9c4
Merge branch 'bevy-text-input' of https://github.com/ickshonpe/bevy i…
ickshonpe Aug 2, 2025
96bacc1
Fix comments
ickshonpe Aug 2, 2025
2035726
Added text input 2d example
ickshonpe Aug 4, 2025
a692fd8
cargo run -p build-templated-pages -- build-example-page
ickshonpe Aug 4, 2025
9371313
Merge branch 'main' into bevy-text-input
alice-i-cecile Aug 5, 2025
27dc3df
Merge branch 'bevy-text-input' of https://github.com/ickshonpe/bevy i…
ickshonpe Aug 5, 2025
622bbe6
Added example skeleton.
ickshonpe Aug 5, 2025
e20e670
Merge branch 'main' into bevy-text-input
ickshonpe Aug 8, 2025
307590a
Added `TextInputStyle` component.
ickshonpe Aug 8, 2025
6611bde
Updated example
ickshonpe Aug 8, 2025
811f0c8
Added `CursorBlinkInterval` resource
ickshonpe Aug 8, 2025
2f43052
Renamed CursorBlinkInterval to TextCursorBlinkInterval.
ickshonpe Aug 8, 2025
acc0706
Added doc comment for resource
ickshonpe Aug 8, 2025
c72f7ce
Deleted style component.
ickshonpe Aug 8, 2025
eb15165
Fixed target size scaling.
ickshonpe Aug 8, 2025
171de2f
Updated comments
ickshonpe Aug 8, 2025
96e3c6e
Clean up
ickshonpe Aug 8, 2025
0ba0b68
Merge branch 'main' into bevy-text-input
ickshonpe Aug 11, 2025
295de7f
Fixed example imports
ickshonpe Aug 11, 2025
6b3f3d8
Anchor output below input in example
ickshonpe Aug 11, 2025
f794658
Removed unnecessary casts
ickshonpe Aug 11, 2025
00a0c13
Fixed wrong casts
ickshonpe Aug 11, 2025
f03a7cf
New `InvalidTextEditError`, returned by `apply_text_edit`.
ickshonpe Aug 11, 2025
fb73aa3
Only collect buffer text if `TextInputValue` is present.
ickshonpe Aug 11, 2025
288ea3b
take just Editor'_> with is_cursor_at_end_of_line
ickshonpe Aug 11, 2025
6817f5c
Added release note suggestion
ickshonpe Aug 11, 2025
7ab3c19
Update crates/bevy_text/src/input.rs
ickshonpe Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/bevy_text/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-fea

# other
cosmic-text = { version = "0.14", features = ["shape-run-cache"] }
cosmic_undo_2 = { version = "0.2.0" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Okay this is an issue - cosmic_undo_2 depends on derivative which is unmaintained.

> cargo deny check advisories
error[unmaintained]: `derivative` is unmaintained; consider using an alternative

Turns out cosmic_undo_2 is a diverged fork from undo_2 - just a minor change on the cosmic_undo_2 side.

undo_2 has a new version without derivative , but it's not published to crates.io

Example: changing the dependency here as follows:

undo_2 = { version = "0.3.0", git = "https://gitlab.com/okannen/undo_2.git" }

And changing cosmic_undo_2 to undo_2 in crates/bevy_text/src/input.rs , and it builds.

Now the above will fail due with:

> cargo deny check sources
error[source-not-allowed]: detected 'git' source not explicitly allowed

So couple of options:

  • remove this dependency
  • get one of the maintainers to release
  • fork the repo into Bevy org

Copy link
Contributor Author

@ickshonpe ickshonpe Aug 4, 2025

Choose a reason for hiding this comment

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

So couple of options:

  • remove this dependency
  • get one of the maintainers to release
  • fork the repo into Bevy org

Yep I was considering making a fork, a a new release would be ideal though. Undo is extremely desirable, so I don't think removing it is an option.

Copy link
Contributor

Choose a reason for hiding this comment

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

A fork wouldn't be the worst thing. It's only one source file. Plop a README in the directory saying that this will go away once they publish a version.

What would be even better is if we could adapt this same library for undoing in general (in editors like the Bevy editor). There's been a ton of bikeshedding around undo/redo in editor-dev, and some of the prototypes that people have put forward are "new work" (meaning, "Undo/Redo can't be all that hard, I'll throw something together this evening"). (I'm guilty of this too, so there's shade all around.) I'd rather go with a battle-tested solution if it can meet our needs.

Copy link
Member

Choose a reason for hiding this comment

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

A fork seems most desirable to me too.

Copy link
Contributor

@Zeophlite Zeophlite Aug 6, 2025

Choose a reason for hiding this comment

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

@alice-i-cecile I have requested a reservation in bevyengine/bevy-crate-reservations#40 , forked undo_2 to https://github.com/Zeophlite/bevy_undo_2 , I ask that this get moved to the bevyengine org and published from there

Copy link
Contributor

Choose a reason for hiding this comment

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

ugh, bevy-undo already exists, maybe bevy_undo_2 (as it's a fork of undo_2 )

Copy link
Contributor

@viridia viridia Aug 6, 2025

Choose a reason for hiding this comment

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

If the plan is to use the canonical undo_2 once they push a version that doesn't depend on derivative, then this is purely a short-term fix, in which case I don't see the need for a new crate. Just paste the source file for undo_2 into a subfolder of the text input crate, and delete it later.

Crates are forever (which I discovered to my sorrow with bevy_color).

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not fussed either way, this was mostly about creating the option. My impression was there was thoughts to further modify the library, but I may of misinterpretted that.

I've rasied https://gitlab.com/okannen/undo_2/-/issues/1 to see if it can be published to crates.io

It's nightime here, so I will leave copying into the bevy repo to someone else for now.

Note in https://github.com/ickshonpe/bevy/pull/10/commits I have some other CI fixes that could be cherry-picked.

Copy link
Member

Choose a reason for hiding this comment

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

We might further modify it in the future, but as a starting point simply copying it in is fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

@alice-i-cecile I have created #20489 to upstream the library

thiserror = { version = "2", default-features = false }
serde = { version = "1", features = ["derive"] }
smallvec = { version = "1", default-features = false }
Expand Down
Loading
Loading