Fix the Add Source dialog
ClosedPublic

Authored by ngraham on Mar 3 2018, 11:04 PM.

Details

Summary

Fix a variety of bugs and usability issues with the Add Source dialog:

  • Make the close button actually close the dialog
  • Give the text field focus so you can immediately start typing
  • Make the return key push the Add button
  • Remove needless close symbol in top-right corner
  • Give the buttons icons
  • Re-word the title and make it larger

BUG: 390148

Test Plan

Before:

After:

Tested with Flatpak backend:

  • Invalid URLs are rejected
  • Valid URLs that nonetheless don't point to a Flatpak repo trigger an error message
  • The close button now closes the dialog
  • The escape key still closes the dialog
  • The return and enter keys press the Add button

Diff Detail

Repository
R134 Discover Software Store
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Mar 3 2018, 11:04 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 3 2018, 11:04 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Mar 3 2018, 11:04 PM
ngraham edited the test plan for this revision. (Show Details)Mar 3 2018, 11:04 PM
ngraham edited the summary of this revision. (Show Details)
ngraham edited the test plan for this revision. (Show Details)Mar 4 2018, 12:09 AM
apol added a comment.Mar 4 2018, 1:10 AM

Does it work to press Enter and Escape?

discover/qml/AddSourceDialog.qml
62

onAccepted:

In D11003#217814, @apol wrote:

Does it work to press Enter and Escape?

Yep!

ngraham updated this revision to Diff 28533.Mar 4 2018, 2:08 AM

Use onAccepted: instead of manually intercepting the Return and Enter keys

ngraham edited the test plan for this revision. (Show Details)Mar 4 2018, 2:09 AM
ngraham marked an inline comment as done.

Nice and clean! I like the change.

apol accepted this revision.Mar 5 2018, 12:56 AM
This revision is now accepted and ready to land.Mar 5 2018, 12:56 AM
This revision was automatically updated to reflect the committed changes.
ach added a subscriber: ach.Mar 10 2018, 8:31 AM

FWIW: My first imprression was that the dialog is too narrow. My 'rule' is : the most frequently entered URLs should fit into the dialog without scrolling to the left or the right. In this dialog the string '.flatpakrepo' seems to use already 30 % of the width. Not left for the rest.

Nevertheless great work compared to the status before! Thx a lot Nate!

Achim

In D11003#222401, @ach wrote:

FWIW: My first imprression was that the dialog is too narrow. My 'rule' is : the most frequently entered URLs should fit into the dialog without scrolling to the left or the right. In this dialog the string '.flatpakrepo' seems to use already 30 % of the width. Not left for the rest.

Nevertheless great work compared to the status before! Thx a lot Nate!

Achim

You might be interested in D11219: Increase the "Add Source" dialog's width