Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No files listed on new install with existing repo #590

Closed
olizilla opened this issue Jan 11, 2018 · 20 comments · Fixed by #596
Closed

No files listed on new install with existing repo #590

olizilla opened this issue Jan 11, 2018 · 20 comments · Fixed by #596

Comments

@olizilla
Copy link
Member

Just installed IPFS Desktop (Amazing work, it is rad!). I've got an existing repo, and the node stats show i'm sharing a bunch of things

screenshot 2018-01-11 09 38 55

But the files panel shows an empty list, which is surprising.

screenshot 2018-01-11 09 38 59

This is on:

  • OSX 10.12.6
  • IPFS Desktop 0.3
  • go-ipfs 0.4.11
@hacdias
Copy link
Member

hacdias commented Jan 11, 2018

Thanks 😃

The Files panel only works for files you've uploaded within Station. Do you think we should show the files you are sharing on your node even if you didn't upload them?

Let's say you opened a link with your gateway. Then, the file gets added to your repo, right? If we show everything in there, you'll be seeing stuff you didn't add to the repo yourself.

I'm not sure if it makes sense for you, but I'll wait for a reply 😄

@olizilla
Copy link
Member Author

Totally makes sense. This is only gonna appear for existing users, and I I think it's probably more confusing to see that I'm sharing 180MB that I can't see, so I'd vote for making the entire repo browsable. That way people can review and choose what they host.

This could be tackled as part of the IPFS Dashboard, and have way to open it from Desktop. But in that case the label "Files" is misleading if it's actually going to stay as "things I have uploaded via Desktop".

@olizilla
Copy link
Member Author

Perhaps a simple change would be to add divider to the files section pane, with "Recently added" at the top, and empty in the case of a new install, and then the files from the existing repo listed out below the divider.

@olizilla
Copy link
Member Author

@hacdias I've been meaning to get stuck into the IPFS Desktop code, so I'll put together a PR for you to take a look at with that idea in.

@hacdias
Copy link
Member

hacdias commented Jan 11, 2018

Sure! I think it's a great idea 😄 Will wait for the PR then.

@olizilla
Copy link
Member Author

Ok, so if you've not uploading anything via desktop, but you have files in your repo, as an incremental improvement I'm proposing something like this

mockup
ipfs-desktop-recently-added-files

@hacdias
Copy link
Member

hacdias commented Jan 11, 2018

@olizilla looking at that interface it seems to bit too... hmm... "heavy" you know? You can only see two files per "category". Would there be an option to hide the "all files" section? What do you think about diving it in two columns instead of two rows?

@olizilla
Copy link
Member Author

I'm imagining that the "Recently added" section would grow as you add files to it. We could collapse the "All files" section if there are any recently added ones.

@hacdias
Copy link
Member

hacdias commented Jan 11, 2018

I'm just not sure if we can retrieve the files we have on the repository programmatically. I couldn't find a command for it. The ipfs files ls command is for the Mutable File System.

@hacdias
Copy link
Member

hacdias commented Jan 16, 2018

@olizilla this isn't using MFS. After being able to bundle the new file system on WebUI, I'll then start using MFS here.

Currently, this only adds a file to IPFS and then saves its hash on an internal state which is the wrong thing to do. By using MFS, we can have the files accessible through all of the interfaces without any trouble. 😄

@hacdias
Copy link
Member

hacdias commented Jan 19, 2018

Hey @olizilla! I'm working on this now, and as far as it is going, it's working! Although, there are some UI/UX things to decide:

image

  1. Which actions can a user do on a file?
    • Delete (I suggest a trash bin icon on area 1)
    • Rename (I suggest a pencil icon and then the name field 2 gets editable)
    • Copy hash (I suggest a copy icon on area 1)
    • Open (I personally don't like the button saying 'Open'. For directories, it opens inside Desktop, but for files, it opens the browser thing. What do you think we should do here)
  2. Select multiple files and delete through a button that shows on area 5 when more than one file is selected.
  3. Breadcrumbs on 4?
  4. Should hash be on 3? Or should we put there the size? or nothing and make it more compact?

@olizilla
Copy link
Member Author

olizilla commented Jan 19, 2018

Breadcrumbs on 4?

I like that a lot. Perhaps it should show ipfs/ as the root node, as a subtle way of introducing the addressing format and to avoid suggesting that we're showing paths from the users fs root.

@hacdias
Copy link
Member

hacdias commented Jan 19, 2018

What about the 'open' thing? It has a different behavior for files and directories. Should there be different buttons? Should there exist a button? Or should we just click on the file name and it opens?

@olizilla
Copy link
Member Author

Which actions can a user do on a file?

Delete (I suggest a trash bin icon on area 1)

Before we expose the delete function here, we need to figure out a nice way to make the action undo-able. Could be we put the file in the users trash, and have a way to restore it, if they haven't cleared the trash.

Rename (I suggest a pencil icon and then the name field 2 gets editable)

Sounds good but what would happen on a rename though? I assume for a nested file w'd have to rehash all the parent dirs, which'd be annoying if you've already shared an old parent dir hash with someone.

@hacdias
Copy link
Member

hacdias commented Jan 19, 2018

Sounds good but what would happen on a rename though? I assume for a nested file w'd have to rehash all the parent dirs, which'd be annoying if you've already shared an old parent dir hash with someone.

Yes, I think that would happen. Or not!? Isn't IPFS content-addressed? Not name addressed

@olizilla
Copy link
Member Author

Copy hash (I suggest a copy icon on area 1)

Yep 👍. Needs sketching out though as we may need to think some more about how to fit all the action buttons in.

Open (I personally don't like the button saying 'Open'. For directories, it opens inside Desktop, but for files, it opens the browser thing. What do you think we should do here)

I have a deeply ingrained assumption about file browsers that clicking on a directory will drill down and list out the contents of the dir. Would that work here? Clicking on a file should open it. In browser is fine. View a file or dir in OS file browser is a separate thing. Sounds like an action of secondary importance, and that we need some where to put "other actions"

@hacdias hacdias mentioned this issue Jan 19, 2018
10 tasks
@hacdias
Copy link
Member

hacdias commented Jan 19, 2018

Thanks for the feedback. I'll keep working on this on #596. When I think it's ready to test, I'll ping you.

@olizilla
Copy link
Member Author

Should hash be on 3? Or should we put there the size? or nothing and make it more compact?

I think it's important to show the hash, as it's fundamental to understanding what's happening in IPFS land. It is hard to also make it user friendly though. I think having them both visualised at equal size, but having the the hash be in a lower contrast color as you have it is a good start, as it starts to convey the idea that they are the two ways of referring to the same thing.

@hacdias
Copy link
Member

hacdias commented Jan 19, 2018

Current state:

image

@hacdias
Copy link
Member

hacdias commented Jan 19, 2018

@akrych check this screenshot ^^ You can now click on folders to open them as you suggested when you tried it!

hacdias added a commit that referenced this issue Jan 27, 2018
Make components as independent as possible
Remove repo.lock when not running (fix #588)
Fix #590 by using MFS
Save pins on MFS (ref.: #597)
Order addresses on info pane (fix #599)
Show previously pinned stuff (fix #600)
Save Screenshots on MFS
While daemon is turned off, let the user turn it on or close Desktop only.
Improve Files pane
Add some basic tests to start the testing journey #50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants