Skip to content

gui: Split device list in folder sharing options by shared / unshared - #5756

Merged
imsodin merged 5 commits into
syncthing:masterfrom
acolomb:split-folder-sharing-devices
Oct 21, 2019
Merged

imsodin merged 5 commits into
syncthing:masterfrom
acolomb:split-folder-sharing-devices

Conversation

@acolomb

@acolomb acolomb commented May 30, 2019

Copy link
Copy Markdown
Member

Purpose

This is part of (and a prerequisite for) the idea outlined in this forum discussion to list suggested devices that could improve cluster connectivity. So far, this PR only separates the "already shared with" (declared as category 1 in the discussion) devices from the unshared (category 3) devices in two sections, each of which is hidden when empty. As a side-effect, that makes it easier to see what changes have been made in the checkmarks before saving.

Testing

Folder editing has been verified for a cluster of two remote devices, every combination of shared or unshared. Adding a new folder looks as expected, with only the second section visible. Adding a pending folder (sent from a peer) does so as well, with the inviting device checked.

Screenshots

Screenshot_2019-05-30 devtest Syncthing

Documentation

TODO! Should check for screenshots and texts in Usage guide.

acolomb added 2 commits May 30, 2019 19:26
Instead of repeating the complete looping code, use an optional
boolean argument in selectAllDevices().  deSelectAllDevices() just
flips it to false and reuses the other function.
Split the device list into two sections, for currently shared and
unshared devices.  Makes it clearer what changes are being made, just
by looking at the checkmarks.  Initially the first section has all
checked and the second section has all unchecked.  An empty section is
hidden.

Implement device list filters for the separated categories,
temporarily stored within the GUI model's currentFolder object while
the folder editing modal dialog is active.  Adjust bulk selection
functions.
@uok

uok commented May 30, 2019

Copy link
Copy Markdown
Contributor

According to the usage stats the average user has 3 devices. In the sharing settings a device can either be shared (= checked box) or not shared (= unchecked box) so I in my opinion splitting the 2-3 entries into two sections is not helpful, even confusing for usability.

@acolomb

acolomb commented May 30, 2019 •

Copy link
Copy Markdown
Member Author

@uok Thanks for your consideration. As mentioned above, this is just a stop-gap for having an additional category of "suggested" devices (see #5758).

In fact, these categories look quite crowded if each has only one or two entries. We could maybe collapse them if the number of entries is small. On the other hand, the "average" cluster with only three devices will probably have only one section because everything is shared with everyone.

@calmh

calmh commented Jun 29, 2019

Copy link
Copy Markdown
Member

I think the change is good technically, but I’m confused by the wording. Why add "initially"? And I think "unrelated" (and by extension related) is not a term we’ve used before - unshared devices or non-shared devices, perhaps?

@acolomb

acolomb commented Jul 1, 2019

Copy link
Copy Markdown
Member Author

@calmh the wording is owed to the proposal on the forum (prototype in #5758), where a third category is introduced. In contrast to the devices listed there under "suggested", these "unrelated" devices do not yet have access to the folder as far as we know, not even indirectly. Those two words could still be discussed, but for #5758, some terminology is needed for the distinction. Sorry for not keeping this one clearly self-contained. I expected to finish the other PR quicker.

For this PR alone, I agree that the wording is a little confusing since there is no distinction to be made. Does this stand a chance to get merged independently? If so, I'll gladly change the wording if we have a better suggestion. How about this:

Share With Other Devices

Select other devices to share this folder with.

@imsodin

imsodin commented Jul 2, 2019

Copy link
Copy Markdown
Member

What about Jakobs proposal "unshared"? Then the potential third category could be "indirectly shared" with an explanation like "Select to directly connect and share with.". To me "other" feels like a filler word without much meaning.

Trying to stick with established terminology.  Avoid the word "other".
Drop "initially" for now, because it cannot be distinguished from
devices that already share the folder indirectly.
@acolomb

acolomb commented Jul 2, 2019

Copy link
Copy Markdown
Member Author

@imsodin I like that suggestion, keeping the heading a "current state" description, which sets it apart from the explanation below concerning what the user can do with the checkboxes.

I also replaced the word "other" by "additional", to make it clear that this will extend the circle of devices with sharing access. New preview:

Unshared Devices

Select additional devices to share this folder with.

acolomb added a commit to acolomb/syncthing that referenced this pull request Jul 2, 2019

@calmh calmh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in principle


$scope.selectAllDevices = function () {
var devices = $scope.otherDevices();
$scope.selectAllSharedDevices = function (state = true) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think default parameter values are one of the ES6 features we haven't adopted yet for compatibility reasons?

@AudriusButkevicius

Copy link
Copy Markdown
Member

What's happening with this? It seems it needs a small change to land?

@acolomb

acolomb commented Aug 16, 2019

Copy link
Copy Markdown
Member Author

I don't know much about ECMAScript, so I was waiting for the maintainers' call on whether using default values would be okay.

@calmh

calmh commented Aug 17, 2019

Copy link
Copy Markdown
Member

Please take my comment as confirmation that it isn't.

Remove parameter default value from selectAll*Devices() functions.
Instead of implementing deSelectAll*Devices() by calling the former
with "false" argument, just provide the now mandatory argument when
needed, from the angular function call.
@acolomb

acolomb commented Aug 26, 2019

Copy link
Copy Markdown
Member Author

I switched to just making the argument mandatory and providing true / false whenever the functions are called. This way we still only need a single function to select or deselect, avoiding boilerplate code duplication.

Could do the same for the functions in the "edit device" sharing dialog. But that's not necessarily material for this PR.

@AudriusButkevicius

Copy link
Copy Markdown
Member

So @calmh kind of approved this, but I find this to be worse UX.

It's super confusing that you have two sections that do the same thing... Yet they are separate, giving some illusion that they are doing something else with these devices.

Am I missing some long-game idea that will get this to all make sense?

@acolomb

acolomb commented Aug 26, 2019

Copy link
Copy Markdown
Member Author

The long-term idea is #5758, where a third category will be added for "suggested" devices that are known to have the same folder through others' ClusterConfig messages, but not yet added locally. I'll try to work on that again the next four weeks, as time and two kids permit.

I'm very much open to other suggestions for the layout / interaction. Somehow being able to see what the current status is and what changes are about to be applied is a Good Thing, though IMHO. Kind of like diffing in Git before committing :-) Of course that only makes sense for little more complex clusters.

@AudriusButkevicius

Copy link
Copy Markdown
Member

Is that true?

https://github.com/syncthing/syncthing/blob/master/lib/model/model.go#L2176

We only advertise folders that the other side is supposed to see, for privacy reasons, and we should not send information about other folders we are not sharing with a device.

Back to the change, for small clusters (2-3 devices), this change adds tons of confusion.

The state of a folder is binary, it's either shared, or not, I don't see any value into breaking this into 4 states, as if anything it adds confusion and takes up screen space.

@imsodin

imsodin commented Aug 26, 2019

Copy link
Copy Markdown
Member

He is going after the information added a bit further down: https://github.com/syncthing/syncthing/blob/master/lib/model/model.go#L2194 That includes all devices we share the folder with, regardless of whether the device we are sending the CM to already shares the folder with these devices or not.

I am generally fine with this change: It only uses vertical space, which is cheap. And to me it doesn't introduce another category, it displays the current state: If I change stuff it's still clear what the previous state was. Whether it adds more confusion than clarity I am really not suitable to judge due to too much exposure to Syncthing.

@acolomb

acolomb commented Aug 26, 2019

Copy link
Copy Markdown
Member Author

@AudriusButkevicius #5758 is actually a working prototype, so feel free to try it out and see what info is available for your cluster, might be useful. The main thing holding it back is that the info is stored rather inefficiently within the XML config. Need to port that over to using the database.

@acolomb

acolomb commented Aug 26, 2019

Copy link
Copy Markdown
Member Author

As for the possible confusion: Initially, when opening the dialog, all items in the upper category are checked, and none in the lower section. So until the user starts to change things, there are only two states, grouped into two categories.

@AudriusButkevicius

AudriusButkevicius commented Oct 1, 2019 •

Copy link
Copy Markdown
Member

Just an FYI, I am (now?) neutral about this change, so if others are happy, let's get it merged.

@acolomb

acolomb commented Oct 1, 2019

Copy link
Copy Markdown
Member Author

I certainly wouldn't mind ;-)

imsodin
imsodin previously approved these changes Oct 13, 2019

@imsodin imsodin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for all the delay (UI being annoying and difficult not really being a sufficient excuse). There's a conflict now that needs resolving, I'll re-approve when done.

@acolomb

acolomb commented Oct 14, 2019

Copy link
Copy Markdown
Member Author

Conflict is caused by #6073. I'm working on merging the general idea from that change into this PR.

Resolve conflict by incorporating changes from commit
7dc4ac6.  This should match the idea
that was implemented in PR syncthing#6073.
@acolomb

acolomb commented Oct 14, 2019

Copy link
Copy Markdown
Member Author

I hope that merging current master into this PR branch was the right way to go about it. If you like I can do a rebase and force-push instead.

It will be squashed before merging anyway I suppose? I do like to keep all commit messages in the history for documentation purposes, but that's up to you maintainers :-)

@uok

uok commented Oct 14, 2019

Copy link
Copy Markdown
Contributor

I still think this is adding confusion to the UX. How often do you really edit sharing? And why is a simple list with "checkmark - shared" and "no checkmark - not shared" not enough?

The split view does not really help the user I think. Also as I mentioned earlier the majority of users only has a handful of devices (like in your screenshot). Why not just add the unshared/unrelated devices to the list with simple checkboxes instead splitting them?

@nekr0z

nekr0z commented Oct 16, 2019

Copy link
Copy Markdown
Member

Would it be a good idea to only show this UI variant when there are 10+ devices to show? I agree it doesn't really help our average user, but I also see how this can be beneficial for someone like me with 25+ devices in a cluster. What I'm not really sure about is whether having 2 UI variants is worth the hassle of maintaining it in the long run.

@acolomb acolomb closed this Oct 16, 2019
@acolomb acolomb reopened this Oct 16, 2019
@acolomb

acolomb commented Oct 16, 2019

Copy link
Copy Markdown
Member Author

I don't think that distinction would be worth the trouble. Both maintenance and support wise.

Please again notice that any empty category is automatically hidden. So suppose the average Joe user has only three devices. They will probably share folders with all of them (my guess, don't know if the statistics can verify this claim). Once that state is reached, it will look exactly like it does now, one category with all boxes checked. Seeing two categories shows the user Joe that he "forgot" one checkmark in order to reach the supposed goal of sharing with all devices.

For power users who deliberately share a folder to only a subset of many devices, this makes it easier to distinguish. Just today I was in that situation again, with private and work related folders being shared to different subsets obviously and the list becoming not easy to grasp at first sight.

@acolomb

acolomb commented Oct 21, 2019

Copy link
Copy Markdown
Member Author

Ping.

Let's get this merged at last before the next round of inevitable merge conflicts come up.

Thanks.

@imsodin imsodin changed the title GUI: Split device list in folder sharing options by shared / unshared gui: Split device list in folder sharing options by shared / unshared Oct 21, 2019
@imsodin
imsodin merged commit 8b5bd45 into syncthing:master Oct 21, 2019
@acolomb
acolomb deleted the split-folder-sharing-devices branch October 21, 2019 19:54
@acolomb

acolomb commented Oct 21, 2019

Copy link
Copy Markdown
Member Author

Thank you @imsodin.

@calmh calmh added this to the v1.3.2 milestone Nov 8, 2019
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Oct 21, 2020
@syncthing syncthing locked and limited conversation to collaborators Oct 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants