[ANN] file dialog replacement experiment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] file dialog replacement experiment

Peter Uhnak
Hi,

last week I stitched together a simple file dialog replacement and today I managed to somewhat finish it.

There is still a lot to be desired, but right now it supports things that were the most pain for me:

* list of most common places (home, root, image directory, temp)
* custom bookmarks by dragging folders from file-pane to bookmark-pane
* toggle hidden files (right-click on file listing)
* preset file name
* filtering files by extensions or patterns and toggling between filters
* synchronous and asynchronous mode




You can use it independently of Pharo's native dialogs

FDOpenFileDialog new
extensionFilters:
{'STON files' -> #(ston).
'All files' -> #()};
defaultFolder: FileLocator imageDirectory asFileReference;
openModal

Or if you feel brave, I have an extended UIManager that will use this…, and then you can use regular manager commands

UIManager default chooseFileMatching: #('*.ston')

but you can always go back

FDMorphicUIManager new beDefault. "use new dialogs"
MorphicUIManager new beDefault. "use old dialogs"

and of course the installation itself (I'll add it to catalog soon after I find a way to autogenerate configurations from git tags)

Metacello new
    baseline: 'FileDialog';
    repository: 'github://peteruhnak/file-dialog/repository';
    load.

More info and docs on GitHub https://github.com/peteruhnak/file-dialog

Any comments/feedback/bug reports is appreciated.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] file dialog replacement experiment

Sven Van Caekenberghe-2
Peter,

This is really well done !

This should be used as an example on how to use Spec for something real.

What I am missing in the UI is some indication of the path that leads to the current selected file. Right now, I am wondering where exactly I am, I feel a bit lost (this is of course from the technical standpoint of a path in a tree). This could be done with a popup, a trail, a pop-over.

We should have some more discussions about this, it could make a great addition to Pharo.

Sven

> On 11 Jun 2016, at 02:45, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> last week I stitched together a simple file dialog replacement and today I managed to somewhat finish it.
>
> There is still a lot to be desired, but right now it supports things that were the most pain for me:
>
> * list of most common places (home, root, image directory, temp)
> * custom bookmarks by dragging folders from file-pane to bookmark-pane
> * toggle hidden files (right-click on file listing)
> * preset file name
> * filtering files by extensions or patterns and toggling between filters
> * synchronous and asynchronous mode
>
>
> <file-dialog-3.png>
> ​
> You can use it independently of Pharo's native dialogs
>
> FDOpenFileDialog new
> extensionFilters:
> {'STON files' -> #(ston).
> 'All files' -> #()};
> defaultFolder: FileLocator imageDirectory asFileReference;
> openModal
>
> Or if you feel brave, I have an extended UIManager that will use this…, and then you can use regular manager commands
>
> UIManager default chooseFileMatching: #('*.ston')
>
> but you can always go back
>
> FDMorphicUIManager new beDefault. "use new dialogs"
> MorphicUIManager new beDefault. "use old dialogs"
>
> and of course the installation itself (I'll add it to catalog soon after I find a way to autogenerate configurations from git tags)
>
> Metacello new
>     baseline: 'FileDialog';
>     repository: 'github://peteruhnak/file-dialog/repository';
>     load.
>
> More info and docs on GitHub https://github.com/peteruhnak/file-dialog
>
> Any comments/feedback/bug reports is appreciated.
>
> Peter


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] file dialog replacement experiment

Peter Uhnak
Hi Sven,

What I am missing in the UI is some indication of the path that leads to the current selected file. Right now, I am wondering where exactly I am, I feel a bit lost (this is of course from the technical standpoint of a path in a tree). This could be done with a popup, a trail, a pop-over.

I've added this couple of days ago (as I was missing this too), I just forgot to push the update to github (one downside compared to smalltalkhub :)).

The only problem is that the image directory name is usually really long (the longest I have is 110 characters as it includes the build's name), so it doesn't exactly fit in.
There is some shortening happening based on the window's width but it's not perfect.

What I like is what zenity does (clickable path)… but it automatically widens the window



Peter
 

We should have some more discussions about this, it could make a great addition to Pharo.

Sven

> On 11 Jun 2016, at 02:45, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> last week I stitched together a simple file dialog replacement and today I managed to somewhat finish it.
>
> There is still a lot to be desired, but right now it supports things that were the most pain for me:
>
> * list of most common places (home, root, image directory, temp)
> * custom bookmarks by dragging folders from file-pane to bookmark-pane
> * toggle hidden files (right-click on file listing)
> * preset file name
> * filtering files by extensions or patterns and toggling between filters
> * synchronous and asynchronous mode
>
>
> <file-dialog-3.png>
> ​
> You can use it independently of Pharo's native dialogs
>
> FDOpenFileDialog new
>       extensionFilters:
>               {'STON files' -> #(ston).
>               'All files' -> #()};
>       defaultFolder: FileLocator imageDirectory asFileReference;
>       openModal
>
> Or if you feel brave, I have an extended UIManager that will use this…, and then you can use regular manager commands
>
> UIManager default chooseFileMatching: #('*.ston')
>
> but you can always go back
>
> FDMorphicUIManager new beDefault. "use new dialogs"
> MorphicUIManager new beDefault. "use old dialogs"
>
> and of course the installation itself (I'll add it to catalog soon after I find a way to autogenerate configurations from git tags)
>
> Metacello new
>     baseline: 'FileDialog';
>     repository: 'github://peteruhnak/file-dialog/repository';
>     load.
>
> More info and docs on GitHub https://github.com/peteruhnak/file-dialog
>
> Any comments/feedback/bug reports is appreciated.
>
> Peter



Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] file dialog replacement experiment

Sven Van Caekenberghe-2

On 14 Jul 2016, at 23:49, Peter Uhnák <[hidden email]> wrote:

Hi Sven,

What I am missing in the UI is some indication of the path that leads to the current selected file. Right now, I am wondering where exactly I am, I feel a bit lost (this is of course from the technical standpoint of a path in a tree). This could be done with a popup, a trail, a pop-over.

I've added this couple of days ago (as I was missing this too), I just forgot to push the update to github (one downside compared to smalltalkhub :)).

The only problem is that the image directory name is usually really long (the longest I have is 110 characters as it includes the build's name), so it doesn't exactly fit in.
There is some shortening happening based on the window's width but it's not perfect.

I had another look. Yes, this is cool. 

If you truncate, you could put the full, non truncated path in a pop over, that would be a cheap way to solve that problem, no ? In any case, in my testing there was enough space.

Maybe also add a trailing / to indicate that it represents the directory and not the selection ?


Also when I tested it, using

 FDOpenFileDialog new openModal.

the path is initially blank, it only fills when I start clicking.

BTW, could it be that FDMorphicUIManager becomes default automatically ?

And related to github filetree, what is the proper way to get a new version once you loaded the code ?

What I like is what zenity does (clickable path)… but it automatically widens the window

<zenity.png>

Peter
 

We should have some more discussions about this, it could make a great addition to Pharo.

Sven

> On 11 Jun 2016, at 02:45, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> last week I stitched together a simple file dialog replacement and today I managed to somewhat finish it.
>
> There is still a lot to be desired, but right now it supports things that were the most pain for me:
>
> * list of most common places (home, root, image directory, temp)
> * custom bookmarks by dragging folders from file-pane to bookmark-pane
> * toggle hidden files (right-click on file listing)
> * preset file name
> * filtering files by extensions or patterns and toggling between filters
> * synchronous and asynchronous mode
>
>
> <file-dialog-3.png>
> ​
> You can use it independently of Pharo's native dialogs
>
> FDOpenFileDialog new
>       extensionFilters:
>               {'STON files' -> #(ston).
>               'All files' -> #()};
>       defaultFolder: FileLocator imageDirectory asFileReference;
>       openModal
>
> Or if you feel brave, I have an extended UIManager that will use this…, and then you can use regular manager commands
>
> UIManager default chooseFileMatching: #('*.ston')
>
> but you can always go back
>
> FDMorphicUIManager new beDefault. "use new dialogs"
> MorphicUIManager new beDefault. "use old dialogs"
>
> and of course the installation itself (I'll add it to catalog soon after I find a way to autogenerate configurations from git tags)
>
> Metacello new
>     baseline: 'FileDialog';
>     repository: 'github://peteruhnak/file-dialog/repository';
>     load.
>
> More info and docs on GitHub https://github.com/peteruhnak/file-dialog
>
> Any comments/feedback/bug reports is appreciated.
>
> Peter




Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] file dialog replacement experiment

Peter Uhnak


On Fri, Jul 15, 2016 at 2:00 PM, Sven Van Caekenberghe <[hidden email]> wrote:

On 14 Jul 2016, at 23:49, Peter Uhnák <[hidden email]> wrote:

Hi Sven,

What I am missing in the UI is some indication of the path that leads to the current selected file. Right now, I am wondering where exactly I am, I feel a bit lost (this is of course from the technical standpoint of a path in a tree). This could be done with a popup, a trail, a pop-over.

I've added this couple of days ago (as I was missing this too), I just forgot to push the update to github (one downside compared to smalltalkhub :)).

The only problem is that the image directory name is usually really long (the longest I have is 110 characters as it includes the build's name), so it doesn't exactly fit in.
There is some shortening happening based on the window's width but it's not perfect.

I had another look. Yes, this is cool. 

If you truncate, you could put the full, non truncated path in a pop over, that would be a cheap way to solve that problem, no ? In any case, in my testing there was enough space.

If Spec supports it, then it should be easy.
 

Maybe also add a trailing / to indicate that it represents the directory and not the selection ?

Originally I wanted to make it bold, but again, Spec doesn't support Text properly; trailing slash might be a compromise for now
 


Also when I tested it, using

 FDOpenFileDialog new openModal.

the path is initially blank, it only fills when I start clicking.

That's a bug, I'll fix that.
 

BTW, could it be that FDMorphicUIManager becomes default automatically ?

That seems quite aggressive, I don't feel it's stable enough… I could add something like #load, and #loadDefault to the load script… but then you might as well execute the beDefault. I'm not sure yet.
 

And related to github filetree, what is the proper way to get a new version once you loaded the code ?

I don't know, but it should be the same as with any other (e.g. smalltalkhub) project, since it's both monticello, no? I've never done this, so I don't know. (Usually when I am updating I look at the individual commits because I want to know what has changed.)

Peter
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] file dialog replacement experiment

Peter Uhnak
Couple more updates:

> If you truncate, you could put the full, non truncated path in a pop over, that would be a cheap way to solve that problem, no ? In any case, in my testing there was enough space.

Fixed

> Maybe also add a trailing / to indicate that it represents the directory and not the selection ?

Fixed

> the path is initially blank, it only fills when I start clicking.

Fixed

> And related to github filetree, what is the proper way to get a new version once you loaded the code ?

What seems to work is to delete github-cache folder in image directory and unload both file-dialog and BaselineOfFileDialog packages, and then reexecute the load script again.
As this is really stupid, I'll have to ask Thierry or someone.

And couple of more fixes based on Torsten's feedback:

1. the Open/Cancel buttons are swapped on Windows
2. the FileSystem bookmark has been replaced with available disks on Windows (C:, D:, ...)
3. Added basic entry completion when saving; note that Dark Theme and the EntryCompletion popup do not like each other --- this has to be fixed inside Pharo.




One more thing I want to add really soon: clicking on a file would open a GTInspector on the side (as part of the window), so you can see the preview of text/image/etc

Peter

On Sat, Jul 16, 2016 at 2:25 PM, Peter Uhnák <[hidden email]> wrote:


On Fri, Jul 15, 2016 at 2:00 PM, Sven Van Caekenberghe <[hidden email]> wrote:

On 14 Jul 2016, at 23:49, Peter Uhnák <[hidden email]> wrote:

Hi Sven,

What I am missing in the UI is some indication of the path that leads to the current selected file. Right now, I am wondering where exactly I am, I feel a bit lost (this is of course from the technical standpoint of a path in a tree). This could be done with a popup, a trail, a pop-over.

I've added this couple of days ago (as I was missing this too), I just forgot to push the update to github (one downside compared to smalltalkhub :)).

The only problem is that the image directory name is usually really long (the longest I have is 110 characters as it includes the build's name), so it doesn't exactly fit in.
There is some shortening happening based on the window's width but it's not perfect.

I had another look. Yes, this is cool. 

If you truncate, you could put the full, non truncated path in a pop over, that would be a cheap way to solve that problem, no ? In any case, in my testing there was enough space.

If Spec supports it, then it should be easy.
 

Maybe also add a trailing / to indicate that it represents the directory and not the selection ?

Originally I wanted to make it bold, but again, Spec doesn't support Text properly; trailing slash might be a compromise for now
 


Also when I tested it, using

 FDOpenFileDialog new openModal.

the path is initially blank, it only fills when I start clicking.

That's a bug, I'll fix that.
 

BTW, could it be that FDMorphicUIManager becomes default automatically ?

That seems quite aggressive, I don't feel it's stable enough… I could add something like #load, and #loadDefault to the load script… but then you might as well execute the beDefault. I'm not sure yet.
 

And related to github filetree, what is the proper way to get a new version once you loaded the code ?

I don't know, but it should be the same as with any other (e.g. smalltalkhub) project, since it's both monticello, no? I've never done this, so I don't know. (Usually when I am updating I look at the individual commits because I want to know what has changed.)

Peter

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] file dialog replacement experiment

Sven Van Caekenberghe-2

> On 16 Jul 2016, at 19:05, Peter Uhnák <[hidden email]> wrote:
>
> Couple more updates:

You rock !

> > If you truncate, you could put the full, non truncated path in a pop over, that would be a cheap way to solve that problem, no ? In any case, in my testing there was enough space.
>
> Fixed
>
> > Maybe also add a trailing / to indicate that it represents the directory and not the selection ?
>
> Fixed
>
> > the path is initially blank, it only fills when I start clicking.
>
> Fixed
>
> > And related to github filetree, what is the proper way to get a new version once you loaded the code ?
>
> What seems to work is to delete github-cache folder in image directory and unload both file-dialog and BaselineOfFileDialog packages, and then reexecute the load script again.
> As this is really stupid, I'll have to ask Thierry or someone.
>
> And couple of more fixes based on Torsten's feedback:
>
> 1. the Open/Cancel buttons are swapped on Windows
> 2. the FileSystem bookmark has been replaced with available disks on Windows (C:, D:, ...)
> 3. Added basic entry completion when saving; note that Dark Theme and the EntryCompletion popup do not like each other --- this has to be fixed inside Pharo.
>
> <completion.png>
> ​
>
> One more thing I want to add really soon: clicking on a file would open a GTInspector on the side (as part of the window), so you can see the preview of text/image/etc
>
> Peter
>
> On Sat, Jul 16, 2016 at 2:25 PM, Peter Uhnák <[hidden email]> wrote:
>
>
> On Fri, Jul 15, 2016 at 2:00 PM, Sven Van Caekenberghe <[hidden email]> wrote:
>
>> On 14 Jul 2016, at 23:49, Peter Uhnák <[hidden email]> wrote:
>>
>> Hi Sven,
>>
>> What I am missing in the UI is some indication of the path that leads to the current selected file. Right now, I am wondering where exactly I am, I feel a bit lost (this is of course from the technical standpoint of a path in a tree). This could be done with a popup, a trail, a pop-over.
>>
>> I've added this couple of days ago (as I was missing this too), I just forgot to push the update to github (one downside compared to smalltalkhub :)).
>>
>> The only problem is that the image directory name is usually really long (the longest I have is 110 characters as it includes the build's name), so it doesn't exactly fit in.
>> There is some shortening happening based on the window's width but it's not perfect.
>
> I had another look. Yes, this is cool.
>
> If you truncate, you could put the full, non truncated path in a pop over, that would be a cheap way to solve that problem, no ? In any case, in my testing there was enough space.
>
> If Spec supports it, then it should be easy.
>  
>
> Maybe also add a trailing / to indicate that it represents the directory and not the selection ?
>
> Originally I wanted to make it bold, but again, Spec doesn't support Text properly; trailing slash might be a compromise for now
>  
>
> <Screen Shot 2016-07-15 at 13.58.27.png>
>
> Also when I tested it, using
>
>  FDOpenFileDialog new openModal.
>
> the path is initially blank, it only fills when I start clicking.
>
> That's a bug, I'll fix that.
>  
>
> BTW, could it be that FDMorphicUIManager becomes default automatically ?
>
> That seems quite aggressive, I don't feel it's stable enough… I could add something like #load, and #loadDefault to the load script… but then you might as well execute the beDefault. I'm not sure yet.
>  
>
> And related to github filetree, what is the proper way to get a new version once you loaded the code ?
>
> I don't know, but it should be the same as with any other (e.g. smalltalkhub) project, since it's both monticello, no? I've never done this, so I don't know. (Usually when I am updating I look at the individual commits because I want to know what has changed.)
>
> Peter
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] file dialog replacement experiment

jfabry
In reply to this post by Peter Uhnak

This is excellent !!!

We should change the default file browser to be this one !

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please see http://emailcharter.org .

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of Chile

On Jul 16, 2016, at 13:05, Peter Uhnák <[hidden email]> wrote:

Couple more updates:

> If you truncate, you could put the full, non truncated path in a pop over, that would be a cheap way to solve that problem, no ? In any case, in my testing there was enough space.

Fixed

> Maybe also add a trailing / to indicate that it represents the directory and not the selection ?

Fixed

> the path is initially blank, it only fills when I start clicking.

Fixed

> And related to github filetree, what is the proper way to get a new version once you loaded the code ?

What seems to work is to delete github-cache folder in image directory and unload both file-dialog and BaselineOfFileDialog packages, and then reexecute the load script again.
As this is really stupid, I'll have to ask Thierry or someone.

And couple of more fixes based on Torsten's feedback:

1. the Open/Cancel buttons are swapped on Windows
2. the FileSystem bookmark has been replaced with available disks on Windows (C:, D:, ...)
3. Added basic entry completion when saving; note that Dark Theme and the EntryCompletion popup do not like each other --- this has to be fixed inside Pharo.

<completion.png>


One more thing I want to add really soon: clicking on a file would open a GTInspector on the side (as part of the window), so you can see the preview of text/image/etc

Peter

On Sat, Jul 16, 2016 at 2:25 PM, Peter Uhnák <[hidden email]> wrote:


On Fri, Jul 15, 2016 at 2:00 PM, Sven Van Caekenberghe <[hidden email]> wrote:

On 14 Jul 2016, at 23:49, Peter Uhnák <[hidden email]> wrote:

Hi Sven,

What I am missing in the UI is some indication of the path that leads to the current selected file. Right now, I am wondering where exactly I am, I feel a bit lost (this is of course from the technical standpoint of a path in a tree). This could be done with a popup, a trail, a pop-over.

I've added this couple of days ago (as I was missing this too), I just forgot to push the update to github (one downside compared to smalltalkhub :)).

The only problem is that the image directory name is usually really long (the longest I have is 110 characters as it includes the build's name), so it doesn't exactly fit in.
There is some shortening happening based on the window's width but it's not perfect.

I had another look. Yes, this is cool. 

If you truncate, you could put the full, non truncated path in a pop over, that would be a cheap way to solve that problem, no ? In any case, in my testing there was enough space.

If Spec supports it, then it should be easy.
 

Maybe also add a trailing / to indicate that it represents the directory and not the selection ?

Originally I wanted to make it bold, but again, Spec doesn't support Text properly; trailing slash might be a compromise for now
 

<Screen Shot 2016-07-15 at 13.58.27.png>

Also when I tested it, using

 FDOpenFileDialog new openModal.

the path is initially blank, it only fills when I start clicking.

That's a bug, I'll fix that.
 

BTW, could it be that FDMorphicUIManager becomes default automatically ?

That seems quite aggressive, I don't feel it's stable enough… I could add something like #load, and #loadDefault to the load script… but then you might as well execute the beDefault. I'm not sure yet.
 

And related to github filetree, what is the proper way to get a new version once you loaded the code ?

I don't know, but it should be the same as with any other (e.g. smalltalkhub) project, since it's both monticello, no? I've never done this, so I don't know. (Usually when I am updating I look at the individual commits because I want to know what has changed.)

Peter


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] file dialog replacement experiment

Peter Uhnak


On Sat, Jul 16, 2016 at 11:04 PM, Johan Fabry <[hidden email]> wrote:

This is excellent !!!

We should change the default file browser to be this one !

I wonder… does Pharo support such workflow that it would pull the code from github? I.e. the development would continue on GitHub and Pharo would just pull the updates.

I believe there are some upstream projects already (GT mostly), but those are on smalltalkhub, and from what I've heard it's a major PITA.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] file dialog replacement experiment

Nicolas Passerini

On Sun, Jul 17, 2016 at 4:25 PM, Peter Uhnák <[hidden email]> wrote:
I wonder… does Pharo support such workflow that it would pull the code from github? I.e. the development would continue on GitHub and Pharo would just pull the updates.


It is not ready for production, but I am working on that.