Download Padre

Directory Browser

Design

  • A collection of thoughts.
  • Consider this to be free brainstorming

Navigation Behaviour

How do we get something that works for everyone?

1. The current situation

In preferences, the default opening folder is specified.
In the top we have the UP("..") folder, which opens the parent on double-click.
Below we have all the children.
When double-clicking a folder among the children, that folder is set to root/base.
When double-clicking a file among the children, that parent folder of that file is set to root/base.
If behaviour in preferences, is set to open files = last, then the directory state as it were will be restored.
If multi files are open, and tabs are shifted, the last known state of the active file will be shown.
If multiple files are open in tabs, and all tabs are closed, which state will be shown in the end? = dunno yet, testing, haven't found the pattern.
..is this always the case, or is there data somewhere that specifies a directory
is a project? and if a folder is not a project, then it will not set to root/base?

2. Different Alternatives

A. Explorer/Directory Browser

  • In preferences, the default opening folder is specified.
  • When starting padre and behaviour "open files" = "new" or "none" is set, the default opening folder is displayed. If "open files" = "last", the last state is restored.
  • First in the top we have the UP("..") folder, which opens the parent on double-click.
  • Second we have the name of the current folder.
  • Third we have all the children, folders and files.
  • When double-clicking a folder among the children, that folder is unfolded, but nothing else happens to the rest of the tree, state preserved.
  • When double-clicking a file among the children, that file is opened in a tab in editor, but nothing else happens to the rest of the tree, state preserved.
  • If multiple files are open, and a user switch tab, then the state is preserved.
  • If multiple files are open, and a tab is closed, then the state is preserved.
  • If multiple files are open, and all tabs are closed, then the state is preserved.
  • If preferences behaviour "spatial" = true, then double clicking a folder will set that folder to root/base, otherwise, the state is preserved.

B1. Project Browser

  • In preferences, the default opening folder is specified.
  • When starting padre and behaviour "open files" = "new" or "none" is set, the default opening folder is displayed. If "open files" = "last", the last state is restored.
  • First in the top we have the UP("..") folder, which opens the parent on double-click.
  • Second we have the name of the current folder.
  • Below we have all the children.
  • When double-clicking a folder among the children, that folder is unfolded, but nothing else happens to the rest of the tree, state preserved. (Unless that folder is recognized as a Project folder, and then the the new base with that folder as base is forced).
  • When double-clicking a file among the children, that file is opened in a tab in editor, but nothing else happens to the rest of the tree, state preserved.
  • If multiple files are open, and a user switch tab, then the state is preserved.
  • If multiple files are open, and a tab is closed, then the state is preserved.
  • If multiple files are open, and all tabs are closed, then the state is preserved.
  • If preferences behaviour "spatial" = true, then double clicking a folder will set that folder to root/base, otherwise, the state is preserved.

B2. Project Browser

  • Same as B1
  • Except, when Project Folder, "Up" is not displayed.

C. Explorer/Directory mix Project Browser

  • In preferences, the default opening folder is specified.
  • When starting padre and behaviour "open files" = "new" or "none" is set, the default opening folder is displayed. If "open files" = "last", the last state is restored.
  • In the top we have the UP("..") folder, which opens the parent on double-click.
  • Next we have the name of the current folder.
  • Below we have all the children.
  • When double-clicking a folder among the children, that folder is unfolded, but nothing else happens to the rest of the tree, state preserved.
  • When double-clicking a file among the children, that file is opened in a tab in editor, but nothing else happens to the rest of the tree, state preserved.
  • If multiple files are open, and a user switch tab, then the state is preserved.
  • If multiple files are open, and a tab is closed, then the state is preserved.
  • If multiple files are open, and all tabs are closed, then the state is preserved.
  • If preferences behaviour "spatial" = true, then double clicking a folder will set that folder to root/base, otherwise, the state is preserved.
  • Right-click option of folder = "set as base". With or without "UP" folder.

Notes

A project folder have an icon for recognition.

Evaluation

We are hitting the doeverythingatthesametime problem. One idea from Alias was to have a "mode" where the user select between behaviour states 1) Explorer/Director and 2) Project.
Another idea is to have two different browsers. 1) Explorer/Directory and 2) Project.

IS THERE AN OBVIOUS CHOICE?

If not, lets do what ever gets implemented,
and let them be optional in preferences.

Additional Notes (unsorted)

Current directory browser will ignore what IT thinks are hidden files or folders, or if it's a Perl distribution, temporary directories like inc. Also blib, Makefile, pm_to_blib, _build and other things. Stuff you shouldn't have to care about. There's a toggle in the search dropdown menu. - this is again filebrowser/project browser mix which need to be investigated further, for most appropriate behaviour and implementation.