Strategy for rendering and editing data other than String
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start by reading the mentioned CodeLines class and _CodeLineEditingControllerImpl to understand how lines, spans, and editing state are currently represented. Define the required mapping between rendered lines, edits, and backing MyEntry objects before deciding whether the controller or CodeLines API should change; the issue does not specify an implementation or completion criteria.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi, thanks for creating an awesome package. I'm trying to find best way to maintain editing state of my custom class instead of String. It could potentially be represented by String, but when viewing and modifying it I would like the CodeLines object be aware of the backing data.
For instance in pseudo code my class could be:
class MyEntry {
final DateTime date;
final String message;
final String tag;
final Map<String,String> metadata;
String toString() => '$date $tag $message $jsonEncode(metadata)';
}
And then I would like to render the toString() representation. When user would modify any part of the string, I would like to receive a callback e.g. with a editing position or any other trace that could let me modify the backing object. When rendering a TextSpan I would love to get access to the corresponding MyEntry object so that I can style the span to my needs. I can assume that each MyEntry would be rendered in a separate line.
I would like to avoid parsing the String in the spanBuilder as the data will be parsed prior to rendering.
I don't think this is a valid feature request for the package itself, but I'm happy to either fork or re-implement any classes that could allow me to achieve this experience.
What would you recommend in such case? Should I implement my own CodeLineEditingController based on _CodeLineEditingControllerImpl and extend CodeLines with a reference to MyEntry?
- Ngôn ngữ chính
- Dart
- Star
- 764
- Fork
- 104
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của reqable/re-editor
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Performance issue: ReEditor hangs when editing large SQL content with 50,000 linesCó thể đã có người làm @MegatronKing đã nhận 12 ngày trước. Đang mởbug
-
Support document-level IME navigation (home/end/select-all) and iFlytek selection expand mode on mobileCó thể làm lại được @MegatronKing đã nhận 94 ngày trước và không có pull request nào đang mở. Đang mởenhancement
-
[Feature] 为yaml文件增加缩进指示线Có thể làm lại được @MegatronKing đã nhận 106 ngày trước và không có pull request nào đang mở. Đang mởenhancement
Tất cả issue của reqable/re-editor
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Export `SignalEquality` classĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
rodydavis/signals.dart#508 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
lugassawan/swe-workbench#799 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
epam/dmtools-dart#385 ·
Maintainer thường phản hồi trong vòng 1 ngày