Skip to content

proposal for folder labels - #2668

Closed
lkwg82 wants to merge 46 commits into
syncthing:masterfrom
lkwg82:issue-966-folder-labels-instead-of-unique-ids
Closed

lkwg82 wants to merge 46 commits into
syncthing:masterfrom
lkwg82:issue-966-folder-labels-instead-of-unique-ids

Conversation

@lkwg82

@lkwg82 lkwg82 commented Jan 6, 2016

Copy link
Copy Markdown
Contributor

I read the thread at https://forum.syncthing.net/t/friendly-names-for-shared-folders/2477 and #966.

It seems no one actually tried it. I digged into the code and had an idea. I tried and it runs.

Disclaimer: I'm new to golang and angularjs. I lost the thread in both discussions, sry.

The idea I implemented is:

  • have local a local label for the folder
  • label is saved as attribute in folder config
  • label is displayed instead of folder-id (when not missing)
  • no protocol change
  • seems to be compatible with current version

Some screenshots are attached.
syncthing-1

autogenerating folder id based on label
syncthing-2

syncthing-3

(I expect some changes and discussion on this. Later on if and when we are going to merge this, I catch up 'contributing code'-tasks)


  • Add friendly label as an extra field per folder
  • When adding a new folder, suggest a random-ish folder ID but allow the user to set it to what they want
  • Announce the friendly label to other devices, so they have the option of adopting it
    • emit as event (protocol layer)
    • integrate into UI (translation etc.)
  • When adding a new folder from a share request, prefill both folder ID and label, allowing label to be edited at will (but not ID as it would not make sense to do so at that point)
  • UX: Some care needs to be taken to make sure it's clear to the user what the distinction is between the two fields; i.e. that one actually matters for correct operation and the other does not.

@lkwg82 lkwg82 changed the title proposal for folder labels proposal for folder labels #966 Jan 6, 2016
@lkwg82 lkwg82 changed the title proposal for folder labels #966 proposal for folder labels Jan 6, 2016
@calmh

calmh commented Jan 6, 2016

Copy link
Copy Markdown
Member

Without yet looking at the code yet, it's certainly an advantage to avoid the protocol change. However it still means you may get configuration issues if two people want to share a folder with ID "photos" with you (but they're not the same photos). Perhaps this could be worked around by auto-suggesting a fairly unique folder ID (the first word of the label followed by a short hash of the label or something). It's certainly worth looking into as it's a simple improvement. We could also send the label as an optional attribute so the receiving side can see the label on connection establishment.

@lkwg82

lkwg82 commented Jan 6, 2016

Copy link
Copy Markdown
Contributor Author

yes, sharing under the same folder id different content is a problem.

I have to read it three times, I hope I get it. As I understand you described it the way I did. (Typing the label invokes creating a folder-id of <randomString>-<label>.

So creating two folders labeled with the same name should create a different folder-id (but this can be improved).

@uok

uok commented Jan 6, 2016

Copy link
Copy Markdown
Contributor

Thanks for working on this old idea!
IMHO it would be better to keep things simple and generate a random folder ID and the user can only enter/edit the folder label. Two labels/ids that do more or less the same are not so good for usability

@calmh

calmh commented Jan 6, 2016

Copy link
Copy Markdown
Member

It must be somewhat editable at creation time as we must be able to create a folder with the same ID as someone else, or there will be no sharing. :)

@calmh

calmh commented Jan 6, 2016

Copy link
Copy Markdown
Member

@st-jenkins add to whitelist

@AudriusButkevicius

Copy link
Copy Markdown
Member

I sort of agree with generating random ID's and not making them editable.

@lkwg82

lkwg82 commented Jan 7, 2016

Copy link
Copy Markdown
Contributor Author
  1. What about the general opinion about this implementation - is it acceptable or rather not?
  2. Generating random folder id or not is kind of different question - it is independent of this feature 'folder labels'

This is still a spike aka. enabler story. When this implementation is likely to be merged, there is some more things to do. I'm willing to do these things (translation entries, missing label/id display in device view etc.).

@calmh

calmh commented Jan 7, 2016

Copy link
Copy Markdown
Member

@AudriusButkevicius What's your idea of the flow if using non-editable ID:s? The only way to add a folder is via the connection prompt, and not by someone telling you "add the folder AE7D3EF6AB22 that I just created"?

@canton7

canton7 commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

Maybe a way of listing all folders on another device which are shared with you? Similar to the prompt, but it's a list you can choose to view rather than something that gets in your face.

@calmh

calmh commented Jan 7, 2016

Copy link
Copy Markdown
Member

Sure, that UI could exist, but I'm just thinking shouldn't there be a way to set up a device to share a folder with someone without them establishing a connection? Say you have a box that's going to be shipped to somewhere and doesn't have connectivity now, or something like that.

@AudriusButkevicius

Copy link
Copy Markdown
Member

The folders in ClusterConfig gain a Label field, and we show both.

Sharing a folder becomes a slightly more painful experience though, as you have to remember and share some cryptiic thing.

@AudriusButkevicius

Copy link
Copy Markdown
Member

So yeah, having some one-time-token for {any device}+{this folder} thing would be awesome, but given we first need a trusted device, I can't see how we could do this. Unless we have a way to put extra info in the TLS handshake.

@calmh

calmh commented Jan 7, 2016

Copy link
Copy Markdown
Member

I still don't understand how I'm supposed to add a folder using the cryptic ID when someone tells me to, unless I can edit the ID field when adding the folder. The other option is via prompt after connection only, or am I misunderstanding something?

@canton7

canton7 commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

Possibly relevant, possibly not: you can get a fair amount of entropy while still being memorable (and shoutable) by choosing three words and sticking them together: for example, my parents' router's default wifi password is something like "phone-baby-tea". Although you do hit internationalization fun...

@AudriusButkevicius

Copy link
Copy Markdown
Member

Under ideal conditions you'd just share folders by handing out a one off token, in which case you don't even get an opportunity to see the folder ID, given this does not exist, and there is no distinction between new folders and already existing folders being newly added, you can ignore me.

I guess tue only meaningful comment I have about thia PR is changing the random N characters to a number between 1000 and 9999, as 4 digits is easier to remember.

@lkwg82

lkwg82 commented Jan 7, 2016

Copy link
Copy Markdown
Contributor Author

@AudriusButkevicius ok, I don't care about the random-part.

If there are no other objections, I'll will work on completeness.

@AudriusButkevicius

Copy link
Copy Markdown
Member

I overall think this is a great addition, though its a protocol change if implemented with completeness, so needs to be part of v0.13

@calmh

calmh commented Jan 7, 2016

Copy link
Copy Markdown
Member

Currently it's "just" some javascript here. So I feel that we need to get clarified what the flow is here as I don't think we're all on the same page.

Whether it's a protocol change or not isn't a big deal to me - we can add label as a field to the protocol, or we can stash it in the existing Options field. The bigger part that I don't think we're all agreed on is the user experience - what happens when you press what button and so on in terms of things being generated or typed in and editable or not

@lkwg82

lkwg82 commented Feb 1, 2016

Copy link
Copy Markdown
Contributor Author

open items

  • Clarify what should be the flow to add folder labels - common sense of UX on this feature.
  • Complete implementation (translation, labels etc.)

How can we get further?

@calmh

calmh commented Mar 5, 2016

Copy link
Copy Markdown
Member

I think we're talking about two different things here.

  1. Adding a friendlier label "on top" of the existing folder ID. This can be set locally, and is sent to other devices for them to use or not as they see fit.
  2. Adding an automatic/random folder ID "below" the existing folder ID, so that two folders both labeled "photos" can coexist if they are in fact supposed to be separate folders.

You've started implementing number one. Most of the discussion is about number two. I know that number two solves the issue of conflicting folder IDs, but I'm not really sure if just number one adds enough value to be worth it on it's own?

@lkwg82

lkwg82 commented Mar 5, 2016

Copy link
Copy Markdown
Contributor Author

I agree with your decomposition of the discussion. It clarifies a lot.

According to 1 ("Adding a friendlier label "on top" of the existing folder ID")

I'm pretty sure the number one adds a tiny but important value to the UX. IMHO it decomposits label and identifier. Identifiers used as names are bad identifiers when there are a lot. And vice versa good identifiers are bad names, because hashes are not catchy.

In case you add a share on the mobile, you choose naturally a very short identifier (less typing). This makes sense in the local context of that specific phone. Later on when you share this identifier maybe with a bigger instance, which is connected you will maybe have a lot shares with similiar or the same identifiers.

Benefits of a separate label:

  • short and catchy labels for the humans
  • good hash-like identifiers for machines
  • labels add the ability to introduce a logical order (by renaming)

The current state is a lose-lose situation, between names and identifiers, human vs. machine.

@calmh

calmh commented Mar 5, 2016

Copy link
Copy Markdown
Member

Agreed. So does it make sense then to do this as a half way solution at this point, i.e. something like:

  • Add friendly label as an extra field per folder
  • Announce the friendly label to other devices, so they have the option of adopting it
  • When adding a new folder, suggest a random-ish folder ID but allow the user to set it to what they want
  • When adding a new folder from a share request, prefill both folder ID and label, allowing label to be edited at will (but not ID as it would not make sense to do so at that point)

A future extension could at some point further hide and automate the actual folder ID but then we already have both in place...

Some care needs to be taken to make sure it's clear to the user what the distinction is between the two fields; i.e. that one actually matters for correct operation and the other does not.

@canton7

canton7 commented Mar 5, 2016

Copy link
Copy Markdown
Contributor

Some care needs to be taken to make sure it's clear to the user what the distinction is between the two fields; i.e. that one actually matters for correct operation and the other does not.

I think you'll struggle here... Purely from a UX point of view, my vote would be for going straight to autogenerated ID, ie only ever having one user-editable ID/name-like field.

@lkwg82
lkwg82 force-pushed the issue-966-folder-labels-instead-of-unique-ids branch from c9fbbdf to 890903f Compare March 8, 2016 21:43
@calmh

calmh commented Mar 11, 2016

Copy link
Copy Markdown
Member

Aside from everything else, I would not worry about possible future encryption integrations as that's really undefined at the moment. When that day comes we'll define the requirements on the ID, migrate existing IDs as appropriate, and so on. Lets just do something that's simple and convenient at the moment.

@AudriusButkevicius

Copy link
Copy Markdown
Member

I am happy to merge.

@lkwg82

lkwg82 commented Mar 11, 2016

Copy link
Copy Markdown
Contributor Author

@plouj

regarding UI

In the folder list: instead of a tooltip, can we write the folder ID next to (or just underneath to allow for longer strings) the folder label in some shade of gray and slightly smaller font?

I think this will clutter the UI, imagine next to every device there is the same with the deviceid. Try another perspective and open the folder dialog and hide helptexts (select one help line and set css display: none). It looks far better. Aside the visual perspective, these information need to be accessible somewhere.

In the folder add dialog: perhaps showing the "Folder ID" field first and "Folder Label" second would emphasise that the label is now optional.

In terms of UX the label should be more dominant than the technical id. The order is intented to
encourage usage. Else it would have been hidden to 'advanced'. In my mind in the future the id is only used to verify or share a folder (mostly hidden).

thin

@lkwg82

lkwg82 commented Mar 11, 2016

Copy link
Copy Markdown
Contributor Author

Yeah!

@AudriusButkevicius

Copy link
Copy Markdown
Member

Last words from @calmh?

@calmh

calmh commented Mar 11, 2016

Copy link
Copy Markdown
Member

shipit!

@canton7

canton7 commented Mar 11, 2016

Copy link
Copy Markdown
Contributor

Awesome work @lkwg82, thanks for pushing this through! 😄

@calmh

calmh commented Mar 11, 2016

Copy link
Copy Markdown
Member

@st-review merge this please

Add folder label in addition to ID (fixes #966)

An auto generated ID is suggested on folder creation to reduce conflicts with folders created on other devices.

@st-review

Copy link
Copy Markdown

OK, merged as 16c3d39. Thanks, @calmh!

@st-review st-review closed this Mar 11, 2016
@calmh

calmh commented Mar 11, 2016

Copy link
Copy Markdown
Member

What? Don't thank me, thank @lkwg82. Buggy bot...

@rumpelsepp

Copy link
Copy Markdown
Contributor

Once again; this merge bot is just awesome! (aside from the wrong thanks :D)

@lkwg82
lkwg82 deleted the issue-966-folder-labels-instead-of-unique-ids branch March 11, 2016 09:50
@calmh

calmh commented Mar 11, 2016

Copy link
Copy Markdown
Member

Oh, and this needs an update to the specs in the docs repo as well...

@lkwg82

lkwg82 commented Mar 23, 2016

Copy link
Copy Markdown
Contributor Author

@calmh I missed your last comment, is this already addressed or is this still missing?

@calmh

calmh commented Mar 24, 2016

Copy link
Copy Markdown
Member

Still missing. You're welcome to do it, otherwise I'll get to it before v0.13 release time.

@calmh

calmh commented Mar 24, 2016

Copy link
Copy Markdown
Member

This also requires a refresh of the getting started guide.

lkwg82 added a commit to lkwg82/docs that referenced this pull request Mar 25, 2016
@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 Jun 16, 2017
@syncthing syncthing locked and limited conversation to collaborators Jun 16, 2017
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.

8 participants