os-js / osjs-client

OS.js Client Module
https://manual.os-js.org/
Other
31 stars 31 forks source link

Desktop icons #51

Open andersevenrud opened 5 years ago

andersevenrud commented 5 years ago

Add back the desktop iconview.

Ref:

andersevenrud commented 5 years ago

@josephjeno This is now almost done. I'm probably getting it out this weekend :)

OS js

josephjeno commented 5 years ago

Ah it looks great!

andersevenrud commented 5 years ago

@josephjeno I've included this in the latest releases. I haven't enabled it by default still (from commit log):

Even though added, it's still disabled by default because there's no Settings application integration yet. Hence no minor bump.

Except for that, there's a few more things I need to implement:

And a bug I've found:

But, you can give it a go if you want. Just set the iconview enabled setting to true in your client configuration (NB: if you already have stored settings on your user you might need to clear it, or run OSjs.make('osjs/settings').set('osjs/desktop', 'iconview.enabled', true).save() in your console and refresh).

And if you do let me know if there's any trouble :smile:

andersevenrud commented 5 years ago

Oh, and if you want to customize the directory, there's a setting for that as well: https://github.com/os-js/osjs-client/commit/d933b8e71e3bd25290c6623bb34e7c17b03a98ec#diff-9d9a6cd82f41984872a66a3ab0d440c4

josephjeno commented 5 years ago

@andersevenrud this is looking great, thanks very much! I know @valp124 used desktop icons in v2 avidly and will be looking forward to this.

josephjeno commented 5 years ago

Our two main use cases are:

  1. shortcuts to applications on the desktop (currently using menu tray for this, desktop would be better as users could drag their own shortcuts)
  2. saving/dragging files to the desktop (which would open in their respective app)

In the latest release I am able to drag both applications and files to the desktop, however nothing happens when I click them, with the exception of .txt files which do open in Textpad. I encountered the filemanager bug you mentioned, which seems to affect the top 3 entries until one of the navigation controls (back, forward, home) are pressed, at which point the top 6 entries are affected. Let me know if there is anything I can do on my end to assist, including testing, etc!

valp124 commented 5 years ago

In V2, double-clicking on a file shortcut on the desktop would prompt the user to choose an app to open this file, and then this choice would be remembered.

andersevenrud commented 5 years ago

In V2, double-clicking on a file shortcut on the desktop would prompt the user to choose an app to open this file, and then this choice would be remembered.

I believe I forgot to put in the application chooser option here. I'll fix that :)

andersevenrud commented 5 years ago

@josephjeno

, which seems to affect the top 3 entries until one of the navigation controls (back, forward, home) are pressed, at which point the top 6 entries are affected.

This was a great pointer! I now know what the problem is: When the list updates the create() callback is not called because the rows did not have a key. Fixing this now :)

andersevenrud commented 5 years ago

@josephjeno New @osjs/filemanager-application out now that should resolve this.

@valp124 New @osjs/client out now that sets the option so it always asks for which app to open in.

shortcuts to applications on the desktop

This comes in the next update :)

andersevenrud commented 5 years ago

@valp124 An edit to my last comment. I misunderstood slightly.... it currently won't "remember" the selected application when launched from the desktop because I added this option. I think I'll do the same as in filemanager where there's a context menu to manually select what app to use (in case a default one was already set).

andersevenrud commented 5 years ago

I think I'll do the same as in filemanager

Update published.

andersevenrud commented 5 years ago

@josephjeno I've published a new branch called feature/desktop-iconview-shortcuts that now implements the shortcuts we discussed on Gitter.

Full changelog:

What's left:

So, not much left to be done here before I can release a new update :blush: However, it's getting a bit late over here, so I'll have to resume this tomorrow.

OS js

I'd like to hear your feedback if the drop action should always create a shortcut instead of a hard copy, and invert the behavior :thinking:

andersevenrud commented 5 years ago

I actually got the two last points done there and opened up this PR: https://github.com/os-js/osjs-client/pull/73

I'll just have to do a bit of testing, then publish this tomorrow :)

josephjeno commented 5 years ago

Wow that was fast! Definitely prefer for shortcut to be the default action! We actually thought that it was creating shortcuts, I think because the original file remained, and only noticed it was copying after modifying the desktop files and realizing the originals weren't updated. Maybe the copy could be a move instead?

andersevenrud commented 5 years ago

Alright. I'll make shortcuts as default then add move and copy as optional actions in the contextmenu if shift was pressed :)

valp124 commented 5 years ago

Yeah bitch! Who's awesome :)

Edited by Anders: removed somewhat sensitive information

andersevenrud commented 5 years ago

@josephjeno I've now published @osjs/client 3.1.7 that brings in the following changes: https://github.com/os-js/osjs-client/blob/master/CHANGELOG.md#317

josephjeno commented 5 years ago

@andersevenrud dude thanks so much

andersevenrud commented 5 years ago

No probs! :)

andersevenrud commented 5 years ago

The Settings (@osjs/settings-application) application now also has a new tab for the desktop iconview toggling.

andersevenrud commented 5 years ago

Pinging @Maho91 and @plungedtoilet because you asked for things related to desktop icons.

weeelfi commented 4 years ago

Hi!

One question: Is possible to move desktop icons to any position?

Thanks in advance. Great work!

andersevenrud commented 4 years ago

Hey @weeelfi. Currently that's not possible, but I actually worked on a prototype that was grid-based a while back. It's possible that I could adopt that code and add an option :thinking:

weeelfi commented 4 years ago

I thought that was possible with draggable option, and store X and Y coords in shortcuts.json when release the mouse click.

But you are the master ^^

andersevenrud commented 4 years ago

That was basically how the prototype I made worked. All the icons was in a pre-set grid and you could set the (x,y) manually, and whenever you dragged a new one it it would occupy the first free spot. The only thing I didn't complete (at least from what I can remember) is doing automatic re-arrangement on resize.

I'll have to dig it out and get back to you :)

weeelfi commented 4 years ago

Good to hear. I will stay tuned!

Os.js is a great work, thanks to you!

andersevenrud commented 4 years ago

@weeelfi I found the prototypes that I worked on and started on the implementation. You can look at the progress here: https://github.com/os-js/osjs-client/pull/74 :)