Skip to content

Fix: ToDo App Tutorial: Add missing footer example to the tutorial script using the same gradual approach#6408

Open
GrCOTE7 wants to merge 2 commits intoflet-dev:mainfrom
GrCOTE7:main
Open

Fix: ToDo App Tutorial: Add missing footer example to the tutorial script using the same gradual approach#6408
GrCOTE7 wants to merge 2 commits intoflet-dev:mainfrom
GrCOTE7:main

Conversation

@GrCOTE7
Copy link
Copy Markdown
Contributor

@GrCOTE7 GrCOTE7 commented Apr 11, 2026

Description

This Pull Request adds a complementary script to the existing tutorial example.
The documentation currently shows a footer in the screenshot, but the provided code sample does not generate it. This contribution introduces a minimal, incremental implementation of the footer so that the example fully matches the visual result shown in the tutorial.

The solution intentionally follows the same gradual learning approach used throughout the tutorial.
It does not rely on the more advanced reactive version of the Todo app (todo_reactive.py), ensuring consistency with the level of concepts introduced in the earlier steps.

This update improves clarity for new learners by aligning the code with the expected UI and keeping the technology and patterns strictly within the scope of the tutorial.

Test Code

# Test code for the review of this PR

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I signed the CLA.
  • [ x My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • [x ] New and existing tests pass locally with my changes
  • I have made corresponding changes to the documentation (if applicable)

Screenshots

  • Adapted with script showna s example

Additional details

Summary by Sourcery

Align the tutorial todo app example with the documented UI by adding a footer-style task summary and controls, and improving basic interactions and app structure.

New Features:

  • Add a footer section showing the count of active items and a 'Clear completed' control to the todo list.
  • Introduce dynamic enable/disable and visibility behavior for the add button based on the new task field content, along with a todo list header title.

Bug Fixes:

  • Prevent adding empty tasks by validating the new task input before creating a todo item.
  • Ensure task filtering and item counting operate only on valid Task instances and keep the footer count in sync.

Enhancements:

  • Improve the visual styling of action icons with accent colors and center-aligned header text.
  • Refine the app startup pattern by guarding the run invocation with a main check and slightly adjusting the window title.

@GrCOTE7 GrCOTE7 changed the title Add missing footer example to the tutorial script using the same gradual approach Fix: ToDo App Tutorial : Add missing footer example to the tutorial script using the same gradual approach Apr 11, 2026
@GrCOTE7 GrCOTE7 changed the title Fix: ToDo App Tutorial : Add missing footer example to the tutorial script using the same gradual approach Fix: ToDo App Tutorial: Add missing footer example to the tutorial script using the same gradual approach Apr 11, 2026
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

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.

1 participant