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

(fix UX) Library: add feedback to directory operations (add, remove, relink) #12436

Merged
merged 10 commits into from
May 14, 2024

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Dec 15, 2023

This improves user feedback for library directory action in Library preferences (add, relink, remove) and when adding a directory in the Computer feature by showing appropriate message popups.

Fixes #10481

InvalidOrMissingDirectory,
UnreadableDirectory,
SqlError,
};
Copy link
Member Author

Choose a reason for hiding this comment

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

To reduce tr strings for the dialogs we could merge all ~Result types and forward them to a dialog function in Library.

// TODO: Move this function out of the DAO
QList<RelocatedTrack> relocateDirectory(
std::pair<RelocateResult, QList<RelocatedTrack>> relocateDirectory(
Copy link
Member Author

Choose a reason for hiding this comment

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

This could also be a struct to make it more compact, but that appearantly that requires some extras to make it work with std::tie in TrackCollection.
Didn't test it.

struct RelocateResult {
    Result result;
    QList<RelocatedTrack> trackList;
    template<typename T, typename U>
    operator std::tuple<T, U>();
};

Copy link
Member

@acolombier acolombier left a comment

Choose a reason for hiding this comment

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

Tested and working as expected on PopOS 22.04/Wayland!

@ronso0
Copy link
Member Author

ronso0 commented Apr 19, 2024

I rebased onto main to resolve the conflicts (should have merged main instead : | ).
@acolombier If you have I'd appreciate if you'd test again.

@ronso0
Copy link
Member Author

ronso0 commented Apr 19, 2024

argh, missed some comments.

I'll revert to last good state and merge main.

@ronso0
Copy link
Member Author

ronso0 commented Apr 19, 2024

Done.

@ronso0 ronso0 changed the title Library: add feedback to directory operations (add, remove, relink) (fix UX) Library: add feedback to directory operations (add, remove, relink) Apr 20, 2024
@daschuer
Copy link
Member

daschuer commented May 8, 2024

Oh sorry, a conflict has developed after @acolombier review.

@daschuer daschuer merged commit 8f64790 into mixxxdj:main May 14, 2024
13 checks passed
@ronso0 ronso0 deleted the lib-add-dir-error branch July 23, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve UX when encountering missing/invalid library directory
3 participants