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

FRQ: Show progress per profile instead of all profiles at once #1824

Open
jonathanjsimon opened this issue Sep 20, 2023 · 6 comments
Open

FRQ: Show progress per profile instead of all profiles at once #1824

jonathanjsimon opened this issue Sep 20, 2023 · 6 comments
Labels
status:idea Proposed feature, discuss if its useful type:enhancement Improvement of an existing function

Comments

@jonathanjsimon
Copy link

The problem

I have several profiles on my system, each backing up to different locations with different filters. The backups frequently run at the same time since they have similar schedules. When this happens, the set of running backups push feedback into the UI at the same time and the UI flips between all the feedback from all the profiles at once. This is both confusing, hard to read, and can result in the loss of error messages and other important feedback.

Requested Solution

Only feedback from the selected profile should show in the status area at the bottom. Switching profiles should show the last status from the newly selected profile and then continue to update with status from that new profile. To help users identify that there is feedback from a profile other than the one they have selected, some icon (exclamation point? warning triangle?) could appear near the profile selection drop down and those profiles with feedback (or some other thing that need user attention) could be marked in a similar way.

Separately and additionally, per profile feedback could also be listed in the system tray menu on a per profile basis.

Alternatives

At the very least, don't show feedback from other profiles.

Additional context

I don't think there is any additional context to add.

@jonathanjsimon jonathanjsimon changed the title Show progress per profile instead of all profiles at once FRQ: Show progress per profile instead of all profiles at once Sep 20, 2023
@real-yfprojects
Copy link
Collaborator

Related: #1764 (reply in thread)

@real-yfprojects real-yfprojects added type:enhancement Improvement of an existing function status:idea Proposed feature, discuss if its useful labels Nov 23, 2023
@TheLazron
Copy link
Contributor

As per current changes, progress only for the selected profile is shown.
But I had some things I wanted to discuss for this PR:

  • The functions responsible for displaying the logs and progress are:
    def set_progress(self, text=''):
        profile = extract_profile_name(text)
        if profile == self.current_profile.name:
            self.progressText.setText(text)
            self.progressText.repaint()

    def set_log(self, text=''):
        profile = extract_profile_name(text)
        if profile == self.current_profile.name:
            self.logText.setText(text)
            self.logText.repaint()

So for this solution I have created a separate util function that extracts the profile name from the text being passed from the signal. The alternate could be to take the profile name as a parameter and then comparing it with the current profile, but that would require a lot of changes when emitting this signal, in multiple files

  • Also, author wrote

Switching profiles should show the last status from the newly selected profile and then continue to update with status from that new profile.

I dont know if that can be done, since these progress texts just signals being emitted and then painted as QLabels.
So, if anything can be added to that as well

But after current changes, only changes for and only the currently selected profile are shown
Thanks

@jonathanjsimon
Copy link
Author

@TheLazron Speaking as an outsider looking in, couldn't the profile have some field in its various data structures to store the last state? Similar projects I've worked on have had some sort of feedback manager that sits between the actual data structures and the UI such that each profile is internally updating itself and alerting the feedback manager to the data change while the feedback manager decides which ones to push into the UI based on UI selection. When the profile selection changes in the UI, the UI loads all the relevant user data from the feedback manager rather than directly from the underlying profile.

@TheLazron
Copy link
Contributor

Oh that can be done, a single field for the profile model that stores the last state for that profile. That way when current profile is switched then its last status can be shown. This would also help with

To help users identify that there is feedback from a profile other than the one they have selected, some icon (exclamation point? warning triangle?) could appear near the profile selection drop down

I'll work on the slot functions to handle this

@TheLazron
Copy link
Contributor

@jonathanjsimon the proposed solution worked well. I added last_status field to the BackupProfileModel, which stores the last progress status for each profile. On switching profiles, the this last_status is shown and then further progress is continued for that profile

Switching profiles should show the last status from the newly selected profile and then continue to update with status from that new profile.

@jonathanjsimon
Copy link
Author

@TheLazron Nice, I look forward to testing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:idea Proposed feature, discuss if its useful type:enhancement Improvement of an existing function
Projects
None yet
Development

No branches or pull requests

3 participants