Review Request: Make the uses widget nicer.

Sven Brauch svenbrauch at gmx.de
Thu Nov 15 21:48:46 UTC 2012



> On Nov. 15, 2012, 8:50 p.m., Milian Wolff wrote:
> > A few issues left, then I'd be fine with merging this as it's already a big improvement over what we have so far - thanks!
> > 
> > But in the long term this should definitely be improved, and I hope you will continue to do the work:
> > 
> > What I see here, is that we essentially redo a tree, something that should be handled by QTreeView and a proper model. To get some fancy rendering in there, we can use a custom delegate. The big advantage would be:
> > 
> > - we can add a filter proxy model (for search)
> > - it reuses existing code, and thus also integrates better into the rest of our UI, esp. for dark color scheme users
> > 
> > If for one reason or the other, the above is not feasible, then at least we should refactor the code to be a "ShowUsesContext" and simply return some html there. This way we can reuse the code there for embedding links etc.

Hi,

Yeah, I've been considering the tree-view thing too, but before I do such work on the widget, I'd like to fix the actual feature first (I'm still sure it's broken, it doesn't find all the uses in quite some cases). I'd suggest to merge this as an intermediate improvement now, then improve the actual find uses feature, and then we can talk about further UI improvements (which I'd then be happy to do) again. The filter thing sounds very nice for example. I also think such an implementation would significantly reduce the code complexity because, as you said, we're basically re-imeplementing a tree view here (collapse & expand, indents, icons, ...).

I hope the i18n things are okay now, I'm not very experienced in how those should look like optimally.

Cheers


- Sven


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107296/#review22050
-----------------------------------------------------------


On Nov. 15, 2012, 9:43 p.m., Sven Brauch wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107296/
> -----------------------------------------------------------
> 
> (Updated Nov. 15, 2012, 9:43 p.m.)
> 
> 
> Review request for KDevelop, KDE Usability and Milian Wolff.
> 
> 
> Description
> -------
> 
> TL;DR: Look at the screenshots below. :)
> 
> Make the uses widget nicer.
> 
> Main changes include:
>  * Fix contexts not being clickable (they were clickable but didn't work)
>  * Remove the blue arrows; all widgets are expanded by default and can
>    be collapsed with a small link in the text instead. This operation is
>    not common enough to justify such a huge ugly button.
>    (The main problem with the button was that it looked ugly, tough)
>  * Contexts without actual uses are always sorted last.
>  * Add some nice icons to the list.
>  * Remove all the ugly frames.
>  * Make text displaying code use a fixed-width font.
>  * Make the tooltip use a fixed-width font too, make it smaller (just 2
>    lines of context instead of 3), and highlight the line with the use
>    by making it bold-face.
>  * Re-format and rename all the widget headers to be more readable
>    and look nicer.
> 
> I will add a few comments to the patch to explain what I was doing.
> 
> Oh and also, I had that impression for quite a while now, but right now I'm pretty sure the find uses feature is broken in some way. Just look at the screenshots: it found way more occurences in the first screenshot than in the second (which happened after a reparse of some projects). And this has nothing to do with my changes. :)
> 
> 
> Diffs
> -----
> 
>   language/duchain/navigation/useswidget.h ec0440e 
>   language/duchain/navigation/useswidget.cpp 8c01e7c 
>   shell/projectcontroller.cpp 6168066 
> 
> Diff: http://git.reviewboard.kde.org/r/107296/diff/
> 
> 
> Testing
> -------
> 
> Manual testing; no functional changes were done except for the context link fix.
> 
> 
> Screenshots
> -----------
> 
> Comparsion between the old and the new uses widget.
>   http://git.reviewboard.kde.org/r/107296/s/821/
> The new useswidget after the latest updates
>   http://git.reviewboard.kde.org/r/107296/s/822/
> Third version; the header line updates while uses are being searched
>   http://git.reviewboard.kde.org/r/107296/s/832/
> 
> 
> Thanks,
> 
> Sven Brauch
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121115/4478b9b9/attachment.html>


More information about the KDevelop-devel mailing list