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

0.0.31 #51

Merged
merged 12 commits into from
May 31, 2024
Merged

0.0.31 #51

merged 12 commits into from
May 31, 2024

Conversation

t00m
Copy link
Owner

@t00m t00m commented May 31, 2024

Summary by CodeRabbit

  • New Features

    • Added margin settings to a box element in the workspace.
  • Refactor

    • Updated the setup and handling of the "Show/Hide Filters" button and search-related widgets.
    • Modified methods to improve the retrieval of button states and widget access.
  • Style

    • Updated labels to use bold tags for titles instead of small tags.
  • Bug Fixes

    • Fixed navigation issues by updating method calls to use actions instead of app.

@t00m t00m added bug Something isn't working enhancement New feature or request labels May 31, 2024
@t00m t00m added this to the 0.1 milestone May 31, 2024
@t00m t00m self-assigned this May 31, 2024
Copy link
Contributor

coderabbitai bot commented May 31, 2024

Warning

Rate limit exceeded

@t00m has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 35 minutes and 8 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 52857e4 and 6bf01a3.

Walkthrough

The latest update to the MiAZ frontend involves changes across several modules. Key adjustments include modifying HTML tags in the factory.py file, updating method calls in rename.py, and significant refactoring in workspace.py to improve UI elements and streamline functionality. These changes aim to enhance the user interface and improve the maintainability of the codebase.

Changes

Files/Modules Change Summary
MiAZ/frontend/desktop/services/factory.py Updated create_label and _on_factory_bind functions to use <b> tags instead of <small> for titles.
MiAZ/frontend/desktop/widgets/rename.py Changed on_rename_cancel and on_answer_question_delete methods to call show_stack_page_by_name on actions instead of app.
MiAZ/frontend/desktop/widgets/workspace.py Added margin settings, refactored filter and search widget handling, introduced _setup_searchbar method, and removed display_dashboard method.

Poem

In the land of code, a rabbit hops,
Through lines and loops, it never stops.
With tags and buttons, sleek and bright,
It makes the frontend pure delight.
Filters toggled, searches clear,
A better workspace, far and near. 🐇✨


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
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 3

Outside diff range and nitpick comments (17)
MiAZ/frontend/desktop/services/factory.py (4)

Line range hint 11-11: Remove unused import os.

- import os

Line range hint 17-23: Remove unused module level imports to clean up the code.

- import gi
- from gi.repository import Gdk
- from gi.repository import GLib
- from gi.repository import GObject
- from gi.repository.GdkPixbuf import Pixbuf

Line range hint 26-26: Remove unused import MiAZ.backend.models.Country.

- from MiAZ.backend.models import Country

Line range hint 27-27: Remove unused import MiAZ.frontend.desktop.services.icm.MiAZIconManager.

- from MiAZ.frontend.desktop.services.icm import MiAZIconManager
MiAZ/frontend/desktop/widgets/rename.py (10)

Line range hint 12-12: Remove unused import sys.

- import sys

Line range hint 14-14: Remove unused import abc.abstractmethod.

- from abc import abstractmethod

Line range hint 20-22: Remove unused module level imports to clean up the code.

- from gi.repository import Gio
- from gi.repository.GdkPixbuf import Pixbuf

Line range hint 25-25: Remove unused import MiAZ.frontend.desktop.widgets.dialogs.MiAZDialogAdd.

- from MiAZ.frontend.desktop.widgets.dialogs import MiAZDialogAdd

Line range hint 26-26: Remove unused import MiAZ.backend.models.Person.

- from MiAZ.backend.models import Person

Line range hint 27-27: Remove unused import MiAZ.frontend.desktop.widgets.configview.MiAZPeople.

- from MiAZ.frontend.desktop.widgets.configview import MiAZPeople

Line range hint 103-103: The local variable i_title is assigned but never used.

Consider removing or using the variable i_title to avoid confusion and improve code clarity.


Line range hint 177-177: Local variable icon is assigned but never used in several methods.

Consider removing or using the variable icon to avoid confusion and improve code clarity.

Also applies to: 240-240


Line range hint 281-281: Local variables boxValueCur and boxValueNew are assigned but never used.

Consider removing or using these variables to avoid confusion and improve code clarity.

Also applies to: 289-289


Line range hint 383-383: The local variable error is assigned but never used.

Consider removing or using the variable error to avoid confusion and improve code clarity.

MiAZ/frontend/desktop/widgets/workspace.py (3)

204-206: Consider using a more descriptive variable name for btnShowFilters.

The variable name btnShowFilters could be more descriptive to reflect its purpose more clearly, such as toggleButtonFilters.


244-250: Ensure consistent styling for UI components.

The method set_valign is used to align the toggle button vertically. Ensure that this aligns with the overall UI design principles of the application.


Line range hint 367-392: Remove commented-out code if it's not needed.

Commented-out code, such as headerbar = self.app.get_widget('headerbar'), can make the codebase harder to read and maintain. If these lines are not necessary, consider removing them.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9d2223b and bb519c8.

Files ignored due to path filters (1)
  • data/resources/icons/scalable/com.github.t00m.MiAZ-view-document.png is excluded by !**/*.png
Files selected for processing (14)
  • MiAZ/backend/repository.py (1 hunks)
  • MiAZ/backend/watcher.py (3 hunks)
  • MiAZ/frontend/desktop/app.py (3 hunks)
  • MiAZ/frontend/desktop/services/actions.py (1 hunks)
  • MiAZ/frontend/desktop/services/factory.py (2 hunks)
  • MiAZ/frontend/desktop/widgets/mainwindow.py (3 hunks)
  • MiAZ/frontend/desktop/widgets/rename.py (2 hunks)
  • MiAZ/frontend/desktop/widgets/searchbar.py (1 hunks)
  • MiAZ/frontend/desktop/widgets/selector.py (4 hunks)
  • MiAZ/frontend/desktop/widgets/settings.py (1 hunks)
  • MiAZ/frontend/desktop/widgets/workspace.py (8 hunks)
  • data/resources/plugins/renameitem.py (1 hunks)
  • data/resources/plugins/viewitem.py (1 hunks)
  • meson.build (1 hunks)
Files skipped from review due to trivial changes (1)
  • meson.build
Additional context used
Ruff
data/resources/plugins/viewitem.py

11-11: tempfile imported but unused


12-12: gettext.gettext imported but unused


43-43: Local variable API is assigned to but never used

data/resources/plugins/renameitem.py

39-39: Local variable API is assigned to but never used

MiAZ/backend/watcher.py

15-15: sys imported but unused


17-17: time imported but unused


87-87: Test for membership should be not in


88-88: Test for membership should be not in


92-92: Test for membership should be not in

MiAZ/backend/repository.py

61-61: Local variable repo is assigned to but never used

MiAZ/frontend/desktop/widgets/mainwindow.py

11-11: gi.repository.GLib imported but unused


14-14: MiAZ.frontend.desktop.widgets.statusbar.MiAZStatusbar imported but unused


102-102: Undefined name _


104-104: Undefined name _


106-106: Undefined name _

MiAZ/frontend/desktop/app.py

11-11: sys imported but unused


12-12: gettext.gettext imported but unused


16-16: Module level import not at top of file


17-17: Module level import not at top of file


17-17: gi.repository.Gdk imported but unused


18-18: Module level import not at top of file


18-18: gi.repository.Gio imported but unused


19-19: Module level import not at top of file


20-20: Module level import not at top of file


23-23: Module level import not at top of file


24-24: Module level import not at top of file


25-25: Module level import not at top of file


26-26: Module level import not at top of file


27-27: Module level import not at top of file


28-28: Module level import not at top of file


29-29: Module level import not at top of file


30-30: Module level import not at top of file


31-31: Module level import not at top of file


32-32: Module level import not at top of file


32-32: MiAZ.frontend.desktop.widgets.settings.MiAZAppSettings imported but unused


33-33: Module level import not at top of file


33-33: MiAZ.frontend.desktop.widgets.settings.MiAZRepoSettings imported but unused


34-34: Module level import not at top of file


64-64: Local variable ENV is assigned to but never used


89-89: Local variable repo_active is assigned to but never used


173-173: Local variable error is assigned to but never used

MiAZ/frontend/desktop/services/actions.py

13-13: tempfile imported but unused


14-14: datetime.datetime imported but unused


17-17: gi.repository.GLib imported but unused


22-22: MiAZ.backend.models.MiAZItem imported but unused


22-22: MiAZ.backend.models.Person imported but unused


22-22: MiAZ.backend.models.Concept imported but unused


22-22: MiAZ.backend.models.Extension imported but unused


22-22: MiAZ.backend.models.Project imported but unused


23-23: MiAZ.frontend.desktop.widgets.configview.MiAZPeople imported but unused


24-24: MiAZ.frontend.desktop.widgets.rename.MiAZRenameDialog imported but unused


25-25: MiAZ.frontend.desktop.widgets.views.MiAZColumnViewWorkspace imported but unused


26-26: MiAZ.frontend.desktop.widgets.views.MiAZColumnViewMassRename imported but unused


28-28: MiAZ.frontend.desktop.widgets.views.MiAZColumnViewMassProject imported but unused

MiAZ/frontend/desktop/widgets/selector.py

11-11: os imported but unused


12-12: datetime.datetime imported but unused


17-17: Module level import not at top of file


17-17: gi.repository.Gio imported but unused


18-18: Module level import not at top of file


19-19: Module level import not at top of file


19-19: gi.repository.GLib imported but unused


20-20: Module level import not at top of file


20-20: gi.repository.GObject imported but unused


22-22: Module level import not at top of file


23-23: Module level import not at top of file


24-24: Module level import not at top of file


24-24: MiAZ.frontend.desktop.widgets.columnview.MiAZColumnView imported but unused


25-25: Module level import not at top of file


26-26: Module level import not at top of file


214-214: Local variable items_available is assigned to but never used

MiAZ/frontend/desktop/widgets/settings.py

203-203: Local variable pm is assigned to but never used


285-285: Test for membership should be not in

MiAZ/frontend/desktop/services/factory.py

11-11: os imported but unused


17-17: Module level import not at top of file


18-18: Module level import not at top of file


18-18: gi.repository.Gdk imported but unused


19-19: Module level import not at top of file


20-20: Module level import not at top of file


20-20: gi.repository.GLib imported but unused


21-21: Module level import not at top of file


21-21: gi.repository.GObject imported but unused


22-22: Module level import not at top of file


23-23: Module level import not at top of file


23-23: gi.repository.GdkPixbuf.Pixbuf imported but unused


25-25: Module level import not at top of file


26-26: Module level import not at top of file


26-26: MiAZ.backend.models.Country imported but unused


27-27: Module level import not at top of file


27-27: MiAZ.frontend.desktop.services.icm.MiAZIconManager imported but unused


28-28: Module level import not at top of file


29-29: Module level import not at top of file


231-231: Local variable text is assigned to but never used

MiAZ/frontend/desktop/widgets/rename.py

12-12: sys imported but unused


14-14: abc.abstractmethod imported but unused


19-19: Module level import not at top of file


20-20: Module level import not at top of file


20-20: gi.repository.Gio imported but unused


21-21: Module level import not at top of file


22-22: Module level import not at top of file


22-22: gi.repository.GdkPixbuf.Pixbuf imported but unused


24-24: Module level import not at top of file


25-25: Module level import not at top of file


25-25: MiAZ.frontend.desktop.widgets.dialogs.MiAZDialogAdd imported but unused


26-26: Module level import not at top of file


26-26: MiAZ.backend.models.Person imported but unused


27-27: Module level import not at top of file


27-27: MiAZ.frontend.desktop.widgets.configview.MiAZPeople imported but unused


103-103: Local variable i_title is assigned to but never used


177-177: Local variable icon is assigned to but never used


240-240: Local variable icon is assigned to but never used


281-281: Local variable boxValueCur is assigned to but never used


289-289: Local variable boxValueNew is assigned to but never used


383-383: Local variable error is assigned to but never used

MiAZ/frontend/desktop/widgets/workspace.py

21-21: MiAZ.backend.models.File imported but unused


21-21: MiAZ.backend.models.Person imported but unused


21-21: MiAZ.backend.models.Concept imported but unused


21-21: MiAZ.backend.models.Extension imported but unused


22-22: MiAZ.frontend.desktop.widgets.columnview.MiAZColumnView imported but unused


22-22: MiAZ.frontend.desktop.widgets.columnview.ColIcon imported but unused


22-22: MiAZ.frontend.desktop.widgets.columnview.ColLabel imported but unused


22-22: MiAZ.frontend.desktop.widgets.columnview.ColButton imported but unused


24-24: MiAZ.frontend.desktop.widgets.views.MiAZColumnViewMassRename imported but unused


24-24: MiAZ.frontend.desktop.widgets.views.MiAZColumnViewMassDelete imported but unused


24-24: MiAZ.frontend.desktop.widgets.views.MiAZColumnViewMassProject imported but unused


25-25: MiAZ.frontend.desktop.widgets.configview.MiAZPeople imported but unused


87-87: Do not use bare except


171-171: Local variable sigid is assigned to but never used


189-189: Local variable i_title is assigned to but never used


350-350: Local variable icon_name is assigned to but never used


388-388: Local variable selection is assigned to but never used


452-452: Local variable dd_date is assigned to but never used


453-453: Local variable dd_prj is assigned to but never used


454-454: Local variable filters is assigned to but never used


457-457: Local variable sentby is assigned to but never used


458-458: Local variable sentto is assigned to but never used


459-459: Local variable countries is assigned to but never used


460-460: Local variable groups is assigned to but never used


461-461: Local variable purposes is assigned to but never used


462-462: Local variable warning is assigned to but never used


494-494: Do not use bare except


514-514: Do not use bare except


568-568: Local variable label is assigned to but never used


608-608: Do not use bare except


665-665: Do not use bare except

Additional comments not posted (13)
MiAZ/frontend/desktop/widgets/searchbar.py (1)

43-46: The addition of the set_callback method enhances the functionality of the SearchBar by allowing callbacks to be connected to the search entry. This is a well-implemented feature.

data/resources/plugins/viewitem.py (1)

54-54: Updating the icon name for the toolbar button aligns with the new naming convention and enhances the UI consistency.

data/resources/plugins/renameitem.py (1)

50-50: Updating the icon name for the toolbar button aligns with the new naming convention and enhances the UI consistency.

MiAZ/backend/watcher.py (1)

29-29: The changes to the MiAZWatcher constructor and the enhanced logging messages improve clarity and maintainability of the watcher functionality.

Also applies to: 69-69, 97-97, 100-100, 103-103

MiAZ/backend/repository.py (1)

107-107: The update to the MiAZWatcher instantiation in the load method correctly reflects the changes made to the MiAZWatcher constructor, ensuring consistency across the application.

MiAZ/frontend/desktop/widgets/mainwindow.py (1)

15-15: The replacement of MiAZStatusbar with SearchBar and the addition of the F3 key logic to toggle workspace filters are well-implemented changes that enhance the functionality and user experience of the application.

Also applies to: 52-53, 123-124

MiAZ/frontend/desktop/app.py (2)

242-242: Addition of return statement in error handling approved.


90-90: Removal of status bar message update approved.

Verification successful

The search results indicate that all occurrences of statusbar_message are commented out, which aligns with the changes made in the PR. Therefore, no active dependencies on statusbar_message remain in the codebase.

  • MiAZ/frontend/desktop/app.py: Commented out.
  • MiAZ/frontend/desktop/widgets/settings.py: Commented out.
  • MiAZ/frontend/desktop/widgets/workspace.py: Commented out.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that no other parts of the application depend on the status bar messages.

# Test: Search for any remaining references to `statusbar_message`. Expect: No occurrences outside of commented or removed code.
rg --type python $'statusbar_message'

Length of output: 67



Script:

#!/bin/bash
# Description: Verify that no other parts of the application depend on the status bar messages.

# Test: Search for any remaining references to `statusbar_message`. Expect: No occurrences outside of commented or removed code.
rg 'statusbar_message'

Length of output: 466

MiAZ/frontend/desktop/services/actions.py (1)

263-266: Replacement of statusbar_message with toggle_workspace_filters approved.

Verification successful

The btnShowFilters widget is referenced in both MiAZ/frontend/desktop/widgets/workspace.py and MiAZ/frontend/desktop/services/actions.py. However, the search results do not show the initialization of this widget, only its usage.

To ensure the widget is properly initialized, we need to verify its initialization in the codebase. Let's search for the initialization of workspace-togglebutton-filters in the codebase.


The workspace-togglebutton-filters widget is initialized in MiAZ/frontend/desktop/widgets/workspace.py with the line self.app.add_widget('workspace-togglebutton-filters', tgbFilters). This confirms that the widget is properly initialized and used in the application.

  • MiAZ/frontend/desktop/widgets/workspace.py: self.app.add_widget('workspace-togglebutton-filters', tgbFilters)

The initialization and usage of the btnShowFilters widget are correctly implemented.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `btnShowFilters` widget is properly initialized and used elsewhere in the application.

# Test: Search for the initialization and usage of `btnShowFilters`. Expect: Proper initialization and usage.
rg --type python $'btnShowFilters'

Length of output: 64



Script:

#!/bin/bash
# Description: Verify that the `btnShowFilters` widget is properly initialized and used elsewhere in the application.

# Test: Search for the initialization and usage of `btnShowFilters`. Expect: Proper initialization and usage.
rg 'btnShowFilters'

Length of output: 525



Script:

#!/bin/bash
# Description: Verify the initialization of the `workspace-togglebutton-filters` widget.

# Test: Search for the initialization of `workspace-togglebutton-filters`. Expect: Proper initialization.
rg 'workspace-togglebutton-filters'

Length of output: 395

MiAZ/frontend/desktop/widgets/selector.py (1)

Line range hint 214-214: Removal of status bar-related code approved.

Verification successful

The search results indicate that all remaining references to statusbar_message are commented out. This confirms that the removal of status bar-related code in selector.py does not impact other parts of the application.

  • MiAZ/frontend/desktop/app.py: Commented out reference to statusbar_message.
  • MiAZ/frontend/desktop/widgets/workspace.py: Commented out reference to statusbar_message.
  • MiAZ/frontend/desktop/widgets/settings.py: Commented out reference to statusbar_message.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that no other parts of the application depend on the removed status bar messages.

# Test: Search for any remaining references to `statusbar_message`. Expect: No occurrences outside of commented or removed code.
rg --type python $'statusbar_message'

Length of output: 67



Script:

#!/bin/bash
# Description: Verify that no other parts of the application depend on the removed status bar messages.

# Test: Search for any remaining references to `statusbar_message`. Expect: No occurrences outside of commented or removed code.
rg 'statusbar_message'

Length of output: 466

MiAZ/frontend/desktop/widgets/settings.py (1)

267-267: Commenting out of status bar message update approved.

Verification successful

The search results indicate that all references to statusbar_message are commented out, including the one in MiAZ/frontend/desktop/widgets/settings.py. This confirms that no active code depends on statusbar_message.

  • MiAZ/frontend/desktop/app.py: Commented out reference.
  • MiAZ/frontend/desktop/widgets/workspace.py: Commented out reference.
  • MiAZ/frontend/desktop/widgets/settings.py: Commented out reference.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that no other parts of the application depend on the status bar messages.

# Test: Search for any remaining references to `statusbar_message`. Expect: No occurrences outside of commented or removed code.
rg --type python $'statusbar_message'

Length of output: 67



Script:

#!/bin/bash
# Description: Verify that no other parts of the application depend on the status bar messages.

# Test: Search for any remaining references to `statusbar_message`. Expect: No occurrences outside of commented or removed code.
rg --type py $'statusbar_message'

Length of output: 476

MiAZ/frontend/desktop/services/factory.py (1)

77-77: Ensure that the <b> tag usage aligns with the project's UI guidelines.

Please verify that the use of <b> tags for labels is consistent with the rest of the application's UI standards.

MiAZ/frontend/desktop/widgets/rename.py (1)

413-413: Ensure that the method calls are correctly updated to reflect changes in the actions API.

Verify that the method show_stack_page_by_name is correctly implemented in the actions service and that it is being called with the correct parameters.

Also applies to: 439-439

MiAZ/frontend/desktop/widgets/workspace.py Show resolved Hide resolved
MiAZ/frontend/desktop/services/factory.py Outdated Show resolved Hide resolved
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: 2

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bb519c8 and 52857e4.

Files selected for processing (3)
  • MiAZ/frontend/desktop/services/factory.py (3 hunks)
  • MiAZ/frontend/desktop/widgets/rename.py (7 hunks)
  • MiAZ/frontend/desktop/widgets/workspace.py (9 hunks)
Additional context used
Ruff
MiAZ/frontend/desktop/services/factory.py

219-219: Local variable text is assigned to but never used

MiAZ/frontend/desktop/widgets/rename.py

19-19: MiAZ.backend.models.Person imported but unused


168-168: Local variable icon_name is assigned to but never used


231-231: Local variable icon is assigned to but never used

MiAZ/frontend/desktop/widgets/workspace.py

21-21: MiAZ.backend.models.File imported but unused


21-21: MiAZ.backend.models.Person imported but unused


21-21: MiAZ.backend.models.Concept imported but unused


21-21: MiAZ.backend.models.Extension imported but unused


22-22: MiAZ.frontend.desktop.widgets.columnview.MiAZColumnView imported but unused


22-22: MiAZ.frontend.desktop.widgets.columnview.ColIcon imported but unused


22-22: MiAZ.frontend.desktop.widgets.columnview.ColLabel imported but unused


22-22: MiAZ.frontend.desktop.widgets.columnview.ColButton imported but unused


24-24: MiAZ.frontend.desktop.widgets.views.MiAZColumnViewMassRename imported but unused


24-24: MiAZ.frontend.desktop.widgets.views.MiAZColumnViewMassDelete imported but unused


24-24: MiAZ.frontend.desktop.widgets.views.MiAZColumnViewMassProject imported but unused


25-25: MiAZ.frontend.desktop.widgets.configview.MiAZPeople imported but unused


87-87: Do not use bare except


171-171: Local variable sigid is assigned to but never used


189-189: Local variable i_title is assigned to but never used


350-350: Local variable icon_name is assigned to but never used


383-383: Local variable selection is assigned to but never used


447-447: Local variable dd_date is assigned to but never used


448-448: Local variable dd_prj is assigned to but never used


449-449: Local variable filters is assigned to but never used


452-452: Local variable sentby is assigned to but never used


453-453: Local variable sentto is assigned to but never used


454-454: Local variable countries is assigned to but never used


455-455: Local variable groups is assigned to but never used


456-456: Local variable purposes is assigned to but never used


457-457: Local variable warning is assigned to but never used


489-489: Do not use bare except


509-509: Do not use bare except


563-563: Local variable label is assigned to but never used


603-603: Do not use bare except


660-660: Do not use bare except

Additional comments not posted (6)
MiAZ/frontend/desktop/services/factory.py (1)

65-65: Updated label markup to use bold tags for titles, enhancing UI consistency and emphasis.

MiAZ/frontend/desktop/widgets/rename.py (2)

402-402: Refactored to call show_stack_page_by_name on actions instead of app, centralizing action handling.


428-428: Refactored to use actions for navigating back to the workspace, ensuring consistency in action management.

MiAZ/frontend/desktop/widgets/workspace.py (3)

692-693: Optimize the connection of signals to improve performance. Connecting signals in a loop can be optimized by connecting them outside the loop if they do not depend on the loop variable. This can improve the performance of your application.


579-580: The method _do_eval_cond_matches_freetext accesses the search entry widget in a new way. Verify that this change correctly handles all edge cases, especially with different input types.


244-250: The creation of tgbFilters button has been refactored. Ensure that the button's behavior and style are consistent with the application's design guidelines.

Verification successful

The create_button_toggle method in MiAZ/frontend/desktop/services/factory.py creates a Gtk.ToggleButton with specific properties and styles. The button is configured with an icon, label, and callback, and it has certain default styles such as valign set to Gtk.Align.CENTER and has_frame set to False.

The refactored code in MiAZ/frontend/desktop/widgets/workspace.py further customizes the button by setting it to inactive, disabling horizontal expansion, removing the 'flat' style class, and setting vertical alignment to center.

These configurations appear consistent with typical design guidelines for toggle buttons, ensuring the button's behavior and style align with the application's design.

  • tgbFilters.set_active(False): Ensures the button is not active by default.
  • tgbFilters.set_hexpand(False): Prevents the button from expanding horizontally.
  • tgbFilters.get_style_context().remove_class(class_name='flat'): Removes the 'flat' style class.
  • tgbFilters.set_valign(Gtk.Align.CENTER): Centers the button vertically.

No issues were found with the button's behavior and style.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the consistency of the button's behavior and style with the application's design guidelines.

# Test: Manually inspect the button in the application.
echo "Manual inspection required for the button's behavior and style."

Length of output: 139



Script:

#!/bin/bash
# Description: Verify the properties and style classes of the 'tgbFilters' button in the codebase.

# Search for the creation and configuration of 'tgbFilters' button in the codebase.
rg 'tgbFilters' --glob '!*.pyc'

# Search for the 'create_button_toggle' method to understand its implementation.
ast-grep --lang python --pattern 'def create_button_toggle($_, $_):'

Length of output: 814



Script:

#!/bin/bash
# Description: Locate and inspect the implementation of the 'create_button_toggle' method.

# Search for the definition of 'create_button_toggle' method in the codebase.
rg 'def create_button_toggle' --glob '!*.pyc'

Length of output: 225



Script:

#!/bin/bash
# Description: Extract and inspect the implementation of the 'create_button_toggle' method.

# Display the implementation of 'create_button_toggle' method.
rg -A 20 'def create_button_toggle' MiAZ/frontend/desktop/services/factory.py

Length of output: 848

MiAZ/frontend/desktop/widgets/workspace.py Outdated Show resolved Hide resolved
MiAZ/frontend/desktop/widgets/workspace.py Show resolved Hide resolved
@t00m t00m merged commit bfc17f6 into main May 31, 2024
2 checks passed
@t00m t00m deleted the 0.0.31 branch May 31, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant