Discussion:
D16980: Return editable URL navigator to breadcrumb mode when it has focus and Ctrl+L is pressed
Nathaniel Graham
2018-11-18 15:48:16 UTC
Permalink
ngraham created this revision.
ngraham added a reviewer: Dolphin.
Herald added a project: Dolphin.
Herald added a subscriber: kfm-devel.
ngraham requested review of this revision.

REVISION SUMMARY
This patch makes an editable location bar return to breadcrumb mode when [Ctrl] + [L] is pressed, but only if the location bar currently has focus. Otherwise, it will simply return focus to it as before.

This provides a slightly easier way to make the location bar return to breadcrumbs mode

Bonus points: `KDirOperator` toggles editable/breadbrtumbs with [Ctrl] + [L] as well, so this improves consistency.

TEST PLAN
- Compile and deploy and make the location bar be breadcrumbs
- Hit [Ctrl] + [L] twice in a row -> location field should return to being breadcrumb mode
- Hit [Ctrl] + [L], move focus elsewhere, then hit [Ctrl] + [L] again -> Location bar should be editable and focused

REPOSITORY
R318 Dolphin

BRANCH
ctrl-l-can-close-urlnavigator (branched from Applications/18.12)

REVISION DETAIL
https://phabricator.kde.org/D16980

AFFECTED FILES
src/dolphinmainwindow.cpp

To: ngraham, #dolphin
Cc: kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-11-18 15:49:05 UTC
Permalink
ngraham edited the test plan for this revision.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-11-18 16:02:26 UTC
Permalink
ngraham added a comment.


And here's a KIO patch for the open/save dialogs that brings the existing [Ctrl] + [L] mode toggling behavior into 100% consistency with what's proposed here: D16981 <https://phabricator.kde.org/D16981>

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Dominik Haumann
2018-11-18 16:17:40 UTC
Permalink
dhaumann added a comment.


I am not voting against this feature, but I use CTRL+L also in browsers. There, CTRL+L does two things:

1. it sets focus to the URL bar
2. it selects all

In fact, sometimes I already have focus in the URL bar and used the cursors (or similar editing actions), so that the selection is gone. In this specific case, I indeed CTRL+L again to select all. Think of a "restart or reset" of my editing process.

Currently, Dolphin has the same behavior for me, which is consistent to what Firefox. Also ESCape currently turns back to breadcrumb view.

Opinions?

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-11-18 16:23:23 UTC
Permalink
ngraham added a comment.
Post by Dominik Haumann
1. it sets focus to the URL bar
2. it selects all
In fact, sometimes I already have focus in the URL bar and used the cursors (or similar editing actions), so that the selection is gone. In this specific case, I indeed CTRL+L again to select all. Think of a "restart or reset" of my editing process.
Currently, Dolphin has the same behavior for me, which is consistent to what Firefox. Also ESCape currently turns back to breadcrumb view.
Opinions?
That's all true, but the location bar in web browsers isn't multi-mode: it has no equivalent of the breadcrumbs mode. So it's not exactly the same UI. [Ctrl] + [A] can also be used to select all if you're already in the location bar, start typing something, and want to select everything, and it isn't any slower than using [Ctrl] + [L].

I do see what you're saying, but consistency is only a virtue when the two things that are rendered consistent with one another are the same thing. Consistency in behavior between dissimilar things can be confusing or inappropriate at times.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Elvis Angelaccio
2018-11-18 17:48:15 UTC
Permalink
elvisangelaccio added a comment.
Post by Nathaniel Graham
This provides a slightly easier way to make the location bar return to breadcrumbs mode
I'm not sure what we are fixing here. Easier than pressing Esc?
Post by Nathaniel Graham
Currently, Dolphin has the same behavior for me, which is consistent to what Firefox. Also ESCape currently turns back to breadcrumb view.
Every browser that I know of behaves like this.

In fact, I'd argue the file dialog is the one being incosistent here, since it's the only one that does not select the whole text when the urlbar has focus.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: elvisangelaccio, dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-11-18 17:58:21 UTC
Permalink
ngraham added a comment.


But Dolphin isn't a web browser, and the `KUrlNavigator` isn't a web browser-style URL input field. It isn't used to navigate to full URLs, just directory paths. And it has a separate breadcrumbs mode that you can switch to between that has no analogue in a web browser.

I would totally agree with being consistent with web browsers if the URL navigator behaved identically. But it doesn't, so I would posit that there's nothing to be consistent //with// since it's not the same control that's found on a web browser.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: elvisangelaccio, dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Dominik Haumann
2018-11-18 20:07:03 UTC
Permalink
dhaumann added a comment.


I kind of am with @elvisangelaccio here and would argue that the file dialog is inconsistent :-)

But that aside: Is is good usability, if CTRL+L does two different things depending on the context?

Think of CTRL+A in a text editor: If you press CTRL+A once, it selects all, and the second time it deselects all?

My point here is that if an action is context-dependent, it is less deterministic in its behavior. Currently, CTRL+L is entirely deterministic in what it does (which is certainly a good thin usability wise).

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: elvisangelaccio, dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-11-19 03:17:15 UTC
Permalink
ngraham added a comment.


Ctrl+L already does multiple things depending on the context:

1. URL navigator is a breadcrumb bar: Ctrl+L makes it editable, focuses it, and selects everything
2. URL Navigator is editable but unfocused: Ctrl+L makes it focused and selects everything
3. URL Navigator is editable and focused, but not everything is selected: Ctrl+L selects everything
4. URL Navigator is editable and focused and everything is already selected: Ctrl+L does nothing

This patch currently changes 3 and 4 to be "Ctrl+L turns it back into a breadcrumb bar and returns focus to the main view". Perhaps I could tweak the patch so that this only happens for case #4, for which hitting Ctrl+L currently has no effect. Thoughts?

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: elvisangelaccio, dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Dominik Haumann
2018-11-19 17:29:13 UTC
Permalink
dhaumann added a comment.


Hm, isn't it that in all 4 cases Ctrl+L focuses the line edit and selects all? /Independent/ on the context? That's what you just wrote, right? :-)

But in the end, it's up to the Dolphin maintainers to decide.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: elvisangelaccio, dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-11-27 22:59:02 UTC
Permalink
ngraham added a comment.


Any conclusion here? I see that a couple of thumbs-ups have appeared in the meantime. 😛

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: elvisangelaccio, dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Elvis Angelaccio
2018-12-02 10:17:13 UTC
Permalink
elvisangelaccio added a comment.
Post by Nathaniel Graham
1. URL navigator is a breadcrumb bar: Ctrl+L makes it editable, focuses it, and selects everything
2. URL Navigator is editable but unfocused: Ctrl+L makes it focused and selects everything
3. URL Navigator is editable and focused, but not everything is selected: Ctrl+L selects everything
4. URL Navigator is editable and focused and everything is already selected: Ctrl+L does nothing
This patch currently changes 3 and 4 to be "Ctrl+L turns it back into a breadcrumb bar and returns focus to the main view". Perhaps I could tweak the patch so that this only happens for case #4, for which hitting Ctrl+L currently has no effect. Thoughts?
That would be much better, since we wouldn't change behavior for those who rely on #3.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: elvisangelaccio, dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-12-06 02:40:08 UTC
Permalink
ngraham updated this revision to Diff 46930.
ngraham added a comment.


Only return to breadcrumb mode when entire text is selected

REPOSITORY
R318 Dolphin

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D16980?vs=45730&id=46930

BRANCH
arcpatch-D16980

REVISION DETAIL
https://phabricator.kde.org/D16980

AFFECTED FILES
src/dolphinmainwindow.cpp

To: ngraham, #dolphin
Cc: elvisangelaccio, dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-12-06 02:42:17 UTC
Permalink
ngraham retitled this revision from "Return editable URL navigator to breadcrumb mode when it has focus and Ctrl+L is pressed" to "Return editable URL navigator to breadcrumb mode if it has focus and everything is selected and when Ctrl+L is pressed".
ngraham edited the summary of this revision.
ngraham edited the test plan for this revision.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16980

To: ngraham, #dolphin
Cc: elvisangelaccio, dhaumann, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Loading...