Skip to content

Refactor LogoScreen: Add docstring, rename variable, and add state flag #728

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

shrutiparmar2003
Copy link

Description

Refactored LogoScreen by:

  • Adding a docstring for clarity.
  • Renaming 'logo' to 'image_path' for consistency with other views.
  • Adding 'is_active' flag to improve maintainability and align with UI patterns.

Reason: Improves code structure and documentation as part of the Code Cleanup for Loading Screens project, making it easier to maintain and extend (e.g., for future state-based logic).

Screenshots omitted: Changes are code-level (docstring, variable rename, state flag) with no UI impact. Full runtime testing failed due to missing 'spidev' (Raspberry Pi dependency) and import resolution issues (ModuleNotFoundError: seedsigner) on Windows, preventing screen rendering.

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Documentation
  • Other

Checklist

  • I’ve run pytest and made sure all unit tests pass before sumbitting the PR

If you modified or added functionality/workflow, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms/os:

  • Raspberry Pi OS Manual Build
  • SeedSigner OS on a Pi0/Pi0W board
  • Other: Windows (syntax tested with python -m py_compile; runtime limited due to spidev and import issues)

Note: Keep your changes limited in scope; if you uncover other issues or improvements along the way, ideally submit those as a separate PR. The more complicated the PR the harder to review, test, and merge.

I plan to follow up with Step 2, refactoring OpeningSplashScreen and ScreensaverScreen to use the new image_path and is_active attributes, addressing inheritance impacts. Please let me know if this aligns with the priorities or if other changes are preferred!

@shrutiparmar2003 shrutiparmar2003 mentioned this pull request Apr 13, 2025
12 tasks
@Advaitgaur004
Copy link

I believe this pull request is unnecessary because the work has already been covered in #730.

@kdmukai
Copy link
Contributor

kdmukai commented May 1, 2025

NACK since this PR is superseded by the work in #718.

However, if you think some of the changes here belong in there, I would add them as a review comment.

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