Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs/practice todo #502

Merged
merged 1 commit into from
Jan 4, 2024
Merged

Docs/practice todo #502

merged 1 commit into from
Jan 4, 2024

Conversation

M-Adoo
Copy link
Collaborator

@M-Adoo M-Adoo commented Dec 21, 2023

No description provided.

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (94e396b) 85.29% compared to head (bb1aa66) 85.29%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #502   +/-   ##
=======================================
  Coverage   85.29%   85.29%           
=======================================
  Files         178      178           
  Lines       24633    24633           
=======================================
  Hits        21011    21011           
  Misses       3622     3622           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

docs/en/practice_todos_app/develop_a_todos_app.md Outdated Show resolved Hide resolved
);
```

It splits a `Task` Writer from `this` and passes it to the `task_item` function widget. This way, the `Task` data can be directly modified in the `task_item` widget without affecting the entire UI of `Todos`.
Copy link
Contributor

Choose a reason for hiding this comment

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

It splits a Writer of Task

.into()
```

At this point, your Todos application is complete. You can run it, add, delete, and mark tasks, double-click to edit, and even if you close the application and open it again, your task list will still be there because your data is automatically saved to the disk.
Copy link
Contributor

Choose a reason for hiding this comment

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

You can run the application , then add, delete, and mark tasks


The `Todos` core is mainly composed of three types: `Todos`, `Task`, and `TaskId`. `Todos` is a collection containing all tasks, `Task` is a struct for a task, and `TaskId` is a unique identifier for a task. `Todos` provides methods for adding, deleting, modifying, and querying tasks, as well as the ability to save to a file. Usually, you also need to write comprehensive unit tests to ensure the correctness of your code.

This part of the work is no different from how you usually write Rust code without a GUI. You can organize your code according to your own habits, as long as you can provide a complete API in the end. In the design philosophy of Ribir applications, this part of the work is very important, but it is not the focus of this tutorial. If you are familiar with Rust syntax, you should be able to understand it easily, so we won't go into detail here.
Copy link
Contributor

Choose a reason for hiding this comment

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

In the design philosophy of Ribir applications, this part of the work is very important, but it is not the focus of this tutorial. If you are familiar with Rust syntax, you should be able to understand it easily, so we won't go into detail here.
-> In the design philosophy of Ribir applications, this part of the work is very important, but it is not the focus of this tutorial, so we won't go into detail here.

@M-Adoo M-Adoo marked this pull request as ready for review January 3, 2024 02:36
@M-Adoo M-Adoo force-pushed the docs/practice-todo branch from f3cb4c2 to 48c39f3 Compare January 3, 2024 02:59
sologeek
sologeek previously approved these changes Jan 3, 2024
@M-Adoo M-Adoo added this pull request to the merge queue Jan 4, 2024
Merged via the queue into master with commit eb546c3 Jan 4, 2024
7 checks passed
@M-Adoo M-Adoo deleted the docs/practice-todo branch January 4, 2024 10:00
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.

4 participants