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

Sample code for the article on building a contact book with Textual #573

Merged
merged 6 commits into from
Sep 18, 2024

Conversation

lpozo
Copy link
Contributor

@lpozo lpozo commented Aug 30, 2024

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉

Copy link
Contributor

@acsany acsany left a comment

Choose a reason for hiding this comment

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

Thanks for providing the code, @lpozo! I have two comments. Please note that you may adjust the adjacent steps with the changes 🙂

Comment on lines 55 to 61
data = [
("Linda", "111-2222-3333", "[email protected]"),
("Joe", "111-2222-3333", "[email protected]"),
("Lara", "111-2222-3333", "[email protected]"),
("David", "111-2222-3333", "[email protected]"),
("Jane", "111-2222-3333", "[email protected]"),
]
Copy link
Contributor

Choose a reason for hiding this comment

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

When comparing my code with yours, I stumbled over this list. Maybe you can use the REPL example from the tutorial and add the content to the README file. Then, you can remove the list from here.

🔁 If you follow along, then you need to delete the list from the other steps, too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a leftover from my testing stage. Sorry.

("m", "toggle_dark", "Toggle dark mode"),
("a", "add", "Add"),
("d", "delete", "Delete"),
("c", "clear", "Clear All"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Later in the tutorial you'll name the method .action_clear_all(). You can either decide to rename the binding here, or rename the method later:

Suggested change
("c", "clear", "Clear All"),
("c", "clear_all", "Clear All"),

@brendaweles brendaweles merged commit 46e9df9 into master Sep 18, 2024
1 check passed
@brendaweles brendaweles deleted the contact-book-python-textual branch September 18, 2024 22:37
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.

3 participants