[PMC] Review of major refactoring around All Music mode
Shantanu Tushar Jha
shantanu at kde.org
Mon Sep 23 15:57:44 UTC 2013
Hi,
* tl;dr *
There is new refactored code in fabian-refactoring-shantanu which should be
functionally same as master. Please take some time, test it and report if
it works fine, or if a major feature is broken.
* Long version *
Thanks to Fabian, we had started refactoring Plasma Media Center's media
browsing code so as to create more reusable components. Finally this is
complete with all major functionality working.
The code for this lies in the branch fabian-refactoring-shantanu . The
salient features are-
1. Backends can now expose multiple models instead of just one. The media
browser is smart enough to understand how to display these. See #2. There
is 100% backwards compatibility in the sense that older backends with only
one model will continue to work, internally stored as a list of just one
model.
2. We now have the following reusable components throughout PMC-
* GridBrowser - as the name says, give it a backend/model and it will show
items in a grid
* ListBrowser - same as above, but a list
* SplitBrowser - can show two browsers side-by-side for two models
* TabBrowser - takes a backend and list of models and shows a browser for
each model in tabs
* SmartBrowser - give it a model or a list of models, and it figures out
which of the above browsers to use
3. Due to these changes, method calls like expand, search etc now take a
parameter to the model on which they need to operate. There is 100%
backwards compatibility where if the parameter is not present, the first
model is picked up.
4. Search can now operate on individual models, giving you support to
search any model in your backend. See #3
5. *Best of all* We can throw all the custom/duplicated code for All Music
backend as generic browsers in #2 take care of that. (1006 less lines of
code!)
What do we need? Well if you get some time, please checkout the branch
fabian-refactoring-shantanu , test it to make sure no major features are
broken. Note, there are still few minor keyboard/UI issues which I will
create bug reports for once merged to master.
What next? I eagerly wait for comments on how the new browsers work, and
unless some major feature is broken, I will go ahead and merge with master
this weekend, or earlier if people try out and find no issues.
Thanks!
--
Shantanu Tushar (UTC +0530)
http://www.shantanutushar.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130923/2b4a9145/attachment.html>
More information about the Plasma-devel
mailing list