UI improvements for problem reporter
AbandonedPublic

Authored by antonanikin on Mar 6 2018, 4:00 AM.

Details

Reviewers
None
Group Reviewers
KDevelop
Summary

The patch provides new UI approach for problem reporter tool view. Old (current) version hides some UI elements for selected problem model if the correspondent feature is not supported, for example "Show imports" button for cppcheck model. This leads to inconsistent UI during model changing - tool view layout also changed and non-disabled UI elements are moved ("jumps") inside the form.

New version uses disabling unsupported UI elements instead hiding, which blocks layout changing. Also new widget is used for "Scope" and "Grouping" buttons - now this buttons has fixed size compliant to menu action with maximum text width. This done also for blocking widgets resize during UI operations. New menu widget also fixes tooltips showing, which is broken for current version. QSignalMapper is dropped during it'snow deprecated class (since Qt 5.10).

New version also allows us to add mechanism for temporarily blocking (disabling) some widgets for example "Full Update" button when model reset is started. This now done with using ProblemModel::featuresChanged signal which emitted by cppcheck plugin at start and at the end of analysis.

OLD version:


NEW version:


Diff Detail

Repository
R32 KDevelop
Branch
problemsview
Lint
No Linters Available
Unit
No Unit Test Coverage
antonanikin requested review of this revision.Mar 6 2018, 4:00 AM
antonanikin created this revision.
antonanikin edited the summary of this revision. (Show Details)Mar 6 2018, 4:03 AM
antonanikin edited the summary of this revision. (Show Details)Mar 6 2018, 4:06 AM
apol added a subscriber: apol.Mar 6 2018, 12:49 PM

It looks a bit weird that there's a big empty space where it clearly should be a button.

It looks a bit weird that there's a big empty space where it clearly should be a button.

Yes, I agree with your remark. We can fix this with using QComboBox for example.
Proof-of-concept version (not fully-functional yet):

kfunk added a subscriber: kfunk.Mar 15 2018, 7:03 PM

I have/had no problems with KActionMenu, to be honest. Not sure whether the new ActionMenu is an improvement -- a lot of code will be added which doesn't have a significant impact (I don't find the QComboBox solution appealing either).

I'm also unsure whether I like the disabling (instead of hiding) of the tool bar buttons -- this way you may end up with lots of inaccessible entries in the tool bar for a particular model. I rather just like the way it is, to be honest.

Other opinions?

@antonanikin Sorry, not trying to demotivate you (I know that writing code & then maybe having to throw it away is very displeasing)

kfunk added a comment.Mar 15 2018, 7:04 PM

New version also allows us to add mechanism for temporarily blocking (disabling) some widgets for example "Full Update" button when model reset is started. This now done with using ProblemModel::featuresChanged signal which emitted by cppcheck plugin at start and at the end of analysis.

This part of the Diff can be pushed I think. I guess that's separate commit anyway, correct?

New version also allows us to add mechanism for temporarily blocking (disabling) some widgets for example "Full Update" button when model reset is started. This now done with using ProblemModel::featuresChanged signal which emitted by cppcheck plugin at start and at the end of analysis.

This part of the Diff can be pushed I think. I guess that's separate commit anyway, correct?

Kevin, I agree what whole patch is not so critical but adds some "bloating" for us. Let's drop it, ok.

But if we want to add ProblemModel::featuresChanged mechanism then I think we should disable Full Update button instead hiding. With current behavior we will have annoying widget "jumping":

  1. Analysis (cppcheck for example) is stared - Full Update button is hided.
  2. Analysis is ended - Full Update button is showed. If such analysis is short (single file for example) such hiding/showing looks ugly I think.

I suggest to make new revision only with ProblemModel::featuresChanged part and with Full Update button disabling instead hiding - ok?

kfunk added a comment.Mar 19 2018, 5:22 PM

@antonanikin Yes, that sounds like the best solution.

Thanks for understanding regarding the code bloat! It definitely isn't easy to throw away code written with good intents in mind. :)

antonanikin abandoned this revision.Mar 20 2018, 9:06 AM