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

Further updates to the knit progress view #687

Merged
merged 10 commits into from
Jul 29, 2024
Merged

Conversation

X-sam
Copy link
Member

@X-sam X-sam commented Jul 26, 2024

Fixes initial size jumping around, and make the table behavior consistent.
Adds cell selection and labels to help orient users.
image

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Enhanced user interaction with a refined KnitProgress interface, including improved selection behavior and a progress bar connection.
    • Added a new label_selection widget to the GUI for better data display and user feedback.
    • Introduced a new method in the ProgressBar class to dynamically update the selection label.
  • Bug Fixes

    • Addressed issues with accidental edits in the KnitProgress table by modifying selection behavior.
  • Documentation

    • Improved type safety in the Preferences class with method overloads for better clarity and usability.

Copy link
Contributor

coderabbitai bot commented Jul 26, 2024

Walkthrough

The recent changes enhance the application's user interface and internal logic, improving both functionality and usability. Key modifications include reorganizing object initialization in ayab.py, upgrading the KnitProgress class for better interaction with the QTableWidget, adding a dynamic label in the GUI, and implementing method overloads in the Preferences class for improved type safety. Collectively, these changes streamline the user experience and clarify the code structure.

Changes

Files Change Summary
.../ayab/ayab.py Reorganized __init__ method to instantiate KnitProgress after ProgressBar.
.../ayab/knitprogress.py Enhanced KnitProgress with new selection behavior, visual cues, and a connection to a progress bar. Added onStitchSelect method for item selection updates.
.../ayab/main_gui.ui Introduced a new QLabel widget named label_selection to improve GUI functionality and user interaction.
.../ayab/preferences.py Introduced method overloads for value in Preferences class to enhance type safety and clarity based on input types.
.../ayab/progressbar.py Added private attribute __selection_label and public method set_selection_label to manage selection text dynamically in the progress bar.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fb76f48 and d6265c9.

Files selected for processing (5)
  • src/main/python/main/ayab/ayab.py (1 hunks)
  • src/main/python/main/ayab/knitprogress.py (4 hunks)
  • src/main/python/main/ayab/main_gui.ui (1 hunks)
  • src/main/python/main/ayab/preferences.py (2 hunks)
  • src/main/python/main/ayab/progressbar.py (3 hunks)
Files skipped from review due to trivial changes (1)
  • src/main/python/main/ayab/ayab.py
Additional comments not posted (9)
src/main/python/main/ayab/progressbar.py (3)

37-37: LGTM!

The addition of __selection_label integrates the new label into the existing label management system.


49-49: LGTM!

The addition of clearing __selection_label in the reset method ensures consistency in label management.


65-67: LGTM!

The setSelectionLabel method enhances the functionality of the progress bar by allowing dynamic updates to the selection label.

src/main/python/main/ayab/main_gui.ui (1)

37-43: LGTM!

The addition of label_selection enhances the GUI by providing a label element for displaying or selecting information.

src/main/python/main/ayab/knitprogress.py (3)

50-66: LGTM!

The changes in the __init__ method improve user interaction with the table by enhancing the feedback mechanism and preventing unintended interactions.


154-159: LGTM!

The changes in the instantiate_row_from_columns method ensure that the column numbers remain readable and the horizontal header visibility is dynamically adjusted.


231-237: LGTM!

The onStitchSelect method enhances the feedback mechanism for users by providing real-time updates to the progress bar label based on the selected item.

src/main/python/main/ayab/preferences.py (2)

145-150: LGTM! The overloads improve type safety and clarity.

The addition of overloads for the value method enhances type inference and usability.


Line range hint 151-159:
Verify the function usage in the codebase.

Ensure that all function calls to value match the new overload signatures.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d6265c9 and 0897f1e.

Files selected for processing (2)
  • src/main/python/main/ayab/knitprogress.py (4 hunks)
  • src/main/python/main/ayab/progressbar.py (3 hunks)
Files skipped from review as they are similar to previous changes (2)
  • src/main/python/main/ayab/knitprogress.py
  • src/main/python/main/ayab/progressbar.py

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0897f1e and 9ab9b2b.

Files selected for processing (1)
  • src/main/python/main/ayab/knitprogress.py (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/python/main/ayab/knitprogress.py

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9ab9b2b and 213875e.

Files selected for processing (1)
  • src/main/python/main/ayab/knitprogress.py (5 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/python/main/ayab/knitprogress.py

Copy link

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 213875e and f4ba43a.

Files selected for processing (1)
  • src/main/python/main/ayab/knitprogress.py (6 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/python/main/ayab/knitprogress.py

@X-sam X-sam requested a review from dl1com July 29, 2024 13:18
@dl1com dl1com merged commit 5f4dbfc into 1.0.0-dev Jul 29, 2024
3 checks passed
@dl1com dl1com deleted the knitprog-updates branch July 29, 2024 15:58
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.

2 participants