Skip to content

Conversation

@gmmcosta15
Copy link
Collaborator

@gmmcosta15 gmmcosta15 commented Dec 11, 2025

What Changed?

helper_methods.py

Created method get_file_name that accepts a string with the filepath and returns only the filename

lib/panels/widget/filesPage.py

Changed implementation of how the files are showed, from a ´QtWidgets.QListWidgetItem´ to our custom EntryListModel

Screenshots

  • Visually, UI is unchanged

Future Work

  • Implementation of the delete file with the on_delete_file Slot
  • Unit and Integration Tests

Guilherme Costa added 7 commits December 11, 2025 17:32
…itemclick

helper_methods: updated the get_file_loc method to return always the filename instead of the full path

Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
…file_name

Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
…g commented lines

Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
@gmmcosta15 gmmcosta15 self-assigned this Dec 11, 2025
@gmmcosta15 gmmcosta15 added the Refactor Enhancing code's readability, maintainability, and extensibility while addressing technical debt. label Dec 11, 2025
@gmmcosta15 gmmcosta15 changed the title Refactor: filesPage.py changed QtWidgets.QListWidgetItem to our custom EntryListModel Refactor filesPage.py: Changed Files ListQtWidgets.QListWidgetItem to our custom EntryListModel Dec 12, 2025
@gmmcosta15 gmmcosta15 changed the title Refactor filesPage.py: Changed Files ListQtWidgets.QListWidgetItem to our custom EntryListModel Refactor filesPage.py: Changed Files List QtWidgets.QListWidgetItem to our custom EntryListModel Dec 12, 2025
@HugoCLSC HugoCLSC self-requested a review December 15, 2025 16:34
Copy link
Member

@HugoCLSC HugoCLSC left a comment

Choose a reason for hiding this comment

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

Everything looks good, only two remarks :

  • Some method docstrings were deleted due to a previous rebase/merge
  • The files list is not centered on the page, it's currently shifted to the left.

Just fix these two things and it will be accepted

logger.debug("Item Selected")

@QtCore.pyqtSlot(name="reset-dir")
def reset_dir(self) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Missing docstring

self.curr_dir = ""
self.request_dir_info[str].emit(self.curr_dir)

def showEvent(self, a0: QtGui.QShowEvent) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Missing docstring

return super().showEvent(a0)

@QtCore.pyqtSlot(list, name="on-file-list")
def on_file_list(self, file_list: list) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Missing docstring

# self._build_file_list()

@QtCore.pyqtSlot(list, name="on-dirs")
def on_directories(self, directories_data: list) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Missing docstring

@gmmcosta15 gmmcosta15 closed this Dec 16, 2025
@gmmcosta15 gmmcosta15 reopened this Dec 16, 2025
Set file list to refresh after 1.5s to improve UI responsiveness.
Clicks are now handled in the _on_item_selected slot instead of
inline callbacks to separate logic and unify behavior.
@gmmcosta15 gmmcosta15 closed this Dec 16, 2025
@gmmcosta15 gmmcosta15 reopened this Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Enhancing code's readability, maintainability, and extensibility while addressing technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants