Skip to content

Commit

Permalink
commander: small improvement on listing and panel width
Browse files Browse the repository at this point in the history
When working  with different directories that have some common files
that have long full path names, it's hard to find the right file from
the list. This is because the panel's width is 500 and the full path may
not be shown completely within the panel as below

```
<-------- visible to  user --------> <----- invisible to users ------------------->

/-----------------------------------\
| /foo/bar/directory/with/very/long-|/path/name1/sample.txt
| Files -> Recent Files -> /foo/bar/|directory/with/very/long-/path1/name/sample.txt
| /foo/bar/directory/with/very/long-|/path/name2/sample.txt
| Files -> Recent Files -> /foo/bar/|directory/with/very/long-/path2/name/sample.txt
\-----------------------------------/

```

In this illustration, when  looking up  `sample.txt`, the user has no
idea about the directory  information (both `path/name1` and
`path/name2` do matching)

- [ ] The panel's width is  one half of the width of the Geany window
      when this amount is greater than or equals to 250
- [ ] Otherwise the panel's width defaults to the width of the Geany window
- [ ] For labels, don't display  full names; only display the parent
      directory's basename and the file name

The previous illustration now becomes

```
/-----------------------------------\
| name1/sample.txt                  |
| Files -> Recent Files -> /foo/bar/|directory/with/very/long-/path/name1/sample.txt
| name2/sample.txt                  |
| Files -> Recent Files -> /foo/bar/|directory/with/very/long-/path/name2/sample.txt
\-----------------------------------/
```

and this helps user to quickly find the right files.

Of course this doesn't solve all edge cases when there are a few more
levels of  duplication in full path names.
  • Loading branch information
icy committed Jan 5, 2025
1 parent 63750a5 commit 92bd4eb
Showing 1 changed file with 112 additions and 89 deletions.
Loading

0 comments on commit 92bd4eb

Please sign in to comment.