Merge lp:~brendan-donegan/checkbox/bug971181_next_button into lp:checkbox

Proposed by Brendan Donegan
Status: Rejected
Rejected by: Marc Tardif
Proposed branch: lp:~brendan-donegan/checkbox/bug971181_next_button
Merge into: lp:checkbox
Diff against target: 88 lines (+35/-2)
4 files modified
checkbox_qt/qt_interface.py (+7/-1)
debian/changelog (+4/-0)
qt/frontend/qtfront.cpp (+19/-1)
qt/frontend/qtfront.h (+5/-0)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/bug971181_next_button
Reviewer Review Type Date Requested Status
Jeff Lane  Disapprove
Ara Pulido (community) Needs Fixing
Review via email: mp+101511@code.launchpad.net

Description of the change

Previously, when a test was run by clicking the 'Test' button in the Qt UI, and the appropriate 'Yes'/'No' result button was selected, if the user clicked on Next then they would still be warned about skipping the test. This seemed to be a little bit unintuitive for some people. I made a few changes to fix this so that if Next is pressed then the current state of the Yes/No buttons will be taken into account.

My concern here is that this fix feels like hackery, because we're essentially turning the push buttons into a sort of radio button.

I'd like some feedback on this proposed fix, to see if the approach is agreeable.

To post a comment you must log in.
Revision history for this message
Ara Pulido (ara) wrote :

This wouldn't work in the cases where a test is manual, but you click Test to perform an action.

Example:

On the External Audio test, when you click on Test, Yes is automatically selected (as the script returns 0).

So, this does not seem like a solution for every case.

How many tests do we have that are semi-automated? I am starting to think that we may need to change the descriptions to match the new UI.

review: Needs Fixing
Revision history for this message
Jeff Lane  (bladernr) wrote :

Per discussion during the meeting, rejecting this... however, while I have not tested this to verify that Ara's concerns are valid, I like the idea at least so please hold onto this for either an SRU or for 0.14.

I'm thinking maybe we could expand this and just get rid of the Next button alltogether. Clicking Yes or No would initiate the move to the next test instead... <- just a thought at least but I do like the idea of trying to clean up the UI a bit...

So I've merged Daniel's branch based on the discussion from the team meeting, so lets see if that clears up the confusion of if we really do need to revisit the buttons on the new UI later.

review: Disapprove

Unmerged revisions

1356. By Brendan Donegan

Fixed UI so that if the Yes/No button is highlighted automatically then the
appropriate result is marked for the test when Next is clicked (LP: #971181)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'checkbox_qt/qt_interface.py'
--- checkbox_qt/qt_interface.py 2012-03-22 16:33:36 +0000
+++ checkbox_qt/qt_interface.py 2012-04-11 08:46:19 +0000
@@ -194,8 +194,14 @@
194 self._run_test(test, runner)194 self._run_test(test, runner)
195195
196 def onNextTestClicked():196 def onNextTestClicked():
197 test["status"] = ANSWER_TO_STATUS[SKIP_ANSWER]197 if self.qtiface.getFocusTestYes():
198 test["status"] = ANSWER_TO_STATUS[YES_ANSWER]
199 elif self.qtiface.getFocusTestNo():
200 test["status"] = ANSWER_TO_STATUS[NO_ANSWER]
201 else:
202 test["status"] = ANSWER_TO_STATUS[SKIP_ANSWER]
198 self.direction = NEXT203 self.direction = NEXT
204 self.qtiface.clearFocusTestYesNo()
199 self.loop.quit()205 self.loop.quit()
200206
201 def onPreviousTestClicked():207 def onPreviousTestClicked():
202208
=== modified file 'debian/changelog'
--- debian/changelog 2012-04-11 07:12:00 +0000
+++ debian/changelog 2012-04-11 08:46:19 +0000
@@ -18,6 +18,10 @@
18 made during the cert sprint.18 made during the cert sprint.
1919
2020
21 [Brendan Donegan]
22 * Fixed UI so that if the Yes/No button is highlighted automatically then the
23 appropriate result is marked for the test when Next is clicked (LP: #971181)
24
21 -- Jeff Lane <jeff@ubuntu.com> Mon, 09 Apr 2012 17:12:51 -040025 -- Jeff Lane <jeff@ubuntu.com> Mon, 09 Apr 2012 17:12:51 -0400
2226
23checkbox (0.13.6) precise; urgency=low27checkbox (0.13.6) precise; urgency=low
2428
=== modified file 'qt/frontend/qtfront.cpp'
--- qt/frontend/qtfront.cpp 2012-04-09 21:15:16 +0000
+++ qt/frontend/qtfront.cpp 2012-04-11 08:46:19 +0000
@@ -181,7 +181,7 @@
181181
182void QtFront::onNextTestClicked()182void QtFront::onNextTestClicked()
183{183{
184 if (!m_skipTestMessage) {184 if (!m_skipTestMessage && !getFocusTestYes() && !getFocusTestNo()) {
185 QMessageBox msgBox(QMessageBox::Question, checkboxTr("Are you sure?", 0), checkboxTr("Do you really want to skip this test?", 0), 0, ui->tabWidget);185 QMessageBox msgBox(QMessageBox::Question, checkboxTr("Are you sure?", 0), checkboxTr("Do you really want to skip this test?", 0), 0, ui->tabWidget);
186 QCheckBox dontPrompt(checkboxTr("Don't ask me again", 0), &msgBox);186 QCheckBox dontPrompt(checkboxTr("Don't ask me again", 0), &msgBox);
187 dontPrompt.blockSignals(true);187 dontPrompt.blockSignals(true);
@@ -375,6 +375,24 @@
375 }375 }
376}376}
377377
378void QtFront::clearFocusTestYesNo()
379{
380 ui->noTestButton->setDefault(false);
381 ui->noTestButton->clearFocus();
382 ui->yesTestButton->setDefault(false);
383 ui->yesTestButton->clearFocus();
384}
385
386bool QtFront::getFocusTestYes()
387{
388 return ui->yesTestButton->isDefault();
389}
390
391bool QtFront::getFocusTestNo()
392{
393 return ui->noTestButton->isDefault();
394}
395
378void QtFront::updateTestStatus(QStandardItem *item, QString status)396void QtFront::updateTestStatus(QStandardItem *item, QString status)
379{397{
380 int numRows = item->rowCount();398 int numRows = item->rowCount();
381399
=== modified file 'qt/frontend/qtfront.h'
--- qt/frontend/qtfront.h 2012-04-03 11:38:10 +0000
+++ qt/frontend/qtfront.h 2012-04-11 08:46:19 +0000
@@ -55,6 +55,11 @@
55 void showTest(QString purpose, QString steps, QString verification, QString info, QString comment, QString testType, QString testName, bool enableTestButton);55 void showTest(QString purpose, QString steps, QString verification, QString info, QString comment, QString testType, QString testName, bool enableTestButton);
56 void showTestControls(bool enableTestControls);56 void showTestControls(bool enableTestControls);
57 void setFocusTestYesNo(bool status);57 void setFocusTestYesNo(bool status);
58 void clearFocusTestYesNo();
59
60 bool getFocusTestYes();
61 bool getFocusTestNo();
62
58 Q_NOREPLY void showInfo(QString text, QStringList options, QString defaultoption);63 Q_NOREPLY void showInfo(QString text, QStringList options, QString defaultoption);
59 void setUiFlags(QVariantMap flags);64 void setUiFlags(QVariantMap flags);
60 void updateAutoTestStatus(QString status, QString testName);65 void updateAutoTestStatus(QString status, QString testName);

Subscribers

People subscribed via source and target branches