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

Modernize storage list #831

Merged
merged 22 commits into from
Feb 3, 2024
Merged

Modernize storage list #831

merged 22 commits into from
Feb 3, 2024

Conversation

rdbende
Copy link
Collaborator

@rdbende rdbende commented Dec 21, 2023

Modernize storage list, so that it uses libadwaita widgets, works correctly on mobile and some other stuff.

In the process I also refactored the storages part of the settings view model into its own VM.

Ohh, and another change for the fadeout settings row in 9693858

grafik

@rdbende
Copy link
Collaborator Author

rdbende commented Dec 21, 2023

TODO:

  • Disable the storage list UI while scanning/rebasing a location

cozy/ui/widgets/storages.py Outdated Show resolved Hide resolved
cozy/ui/widgets/storages.py Outdated Show resolved Hide resolved
cozy/ui/widgets/storages.py Outdated Show resolved Hide resolved
cozy/view_model/storages_view_model.py Outdated Show resolved Hide resolved
cozy/view_model/storages_view_model.py Show resolved Hide resolved
cozy/view_model/storages_view_model.py Show resolved Hide resolved
Copy link
Owner

@geigi geigi left a comment

Choose a reason for hiding this comment

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

Really nice rework of the storage list! If we find a solution for the deletion of the entries in the db I think this is ready to get merged :)


model.delete()
self._model.invalidate()
self.emit_event("storage-removed", model)
Copy link
Owner

Choose a reason for hiding this comment

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

When removing a storage location we previously also removed all files from our db that originated from this location. This is currently handled by the _on_settings_event function in the library_view_model. I think we propably should move the deletion of the db entries from the library_view_model to the storages_view_model. But I'm not sure if we need to do something additional that the UI get's updated correctly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Seems like updating the UI works fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess this also fixes #151 then?

Copy link
Owner

Choose a reason for hiding this comment

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

Awesome :) I'll test it again and will close the issue if it's resolved :)

@geigi geigi merged commit 6a80cf8 into geigi:master Feb 3, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants