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

Adds Simple Filepicker Bubble #273

Closed
wants to merge 4 commits into from

Conversation

taigrr
Copy link
Contributor

@taigrr taigrr commented Oct 15, 2022

Hello charm team! I reached out to you via slack and offered to add our filepicker bubble upstream, so here it is.

I'm sure there's work to be done for it to get accepted, and I know we will need to rebase before final merging can take place, but I wanted to start the conversation here and now and make any change requests before the final rebase to keep the rebasing chaos to a minimum.

Looking forward to getting this pulled upstream!

cc @bashbunni @squrki

squrki and others added 2 commits September 23, 2022 19:32
initial column code added

right file pane showing

fixed trailing cursor and range error

panes reversed, selected item changed from box to highlight

left and right panes functional, still need to manage when directory is large

clean up code, fixed crash on empty directory

found code redundancy, new panel append error

permission issue resolved, new path error on key-right

append error fixed

fixed lag on directory permission error

list rendering functional

items disappearing on long directories, highlight sticking on first file item

right pane highlight issue removed, left pane bounds error still needs work

pagination functional

refactor dirEntry to struct for more detailed file info

file type colourisation functional, need to add code to enter directory symlinks

resolving symlink dir working

filepath.Join not placing root / in front of resolved symlink

keypress right into symlink dir in root functional

help items accessible, but filter not functional

refactor key right to separate methods, key-right functionality given to key-enter and key-space

remove repetitive logic, refactor methods to funcs

fixed range error when key-right in empty directory

key-left/right not functional when filtering

SelectedFileInfo code added

width resizing functional

refactor pane code into FillPanes func

filtering functional

file selection on key-enter fully functional

m.Cursor reimplemented due to filtering

m.Cursor re-removed, key-right on filtering functional

code cleanup, removing commented code

fix left pane dir info error, clean up code

fixed missing selected file path when filter is active

fix logging errors and clean up comments/commented code

shortening long file names functional

filter highlighting functional, need to remove fileSelection lipgloss on empty or perm-denied dirs

code cleanup, remove commented test code

added delegate file

added delegate file

extension filter partially working, need right pane update and include folders

adding arguments to new model func

initDir and fileExt refactored, but bubbletea filter not functional again

bubbletea filtering functional

added symlinkdir to fileExt filter, but not all symlinkdir populating

all symlinks populating on fileExt filter

windows OS testing pass

clean up comments and refactor triple OR

helpStyle at full screen width

Refactoring scope on all functions and properties

refactor New func arguments to new funcs and refactor code

fix symlink color and os perm mode

Export file styles so they can be customized
@bashbunni bashbunni added the enhancement New feature or request label Oct 19, 2022
@bashbunni
Copy link
Member

Hey @taigrr any chance you could provide an example for using the file picker bubble that we can use to test the functionality?

@taigrr
Copy link
Contributor Author

taigrr commented Nov 17, 2022

Yes! We already have an example app. Let me find it and make sure it's public.

@maaslalani
Copy link
Contributor

Hey @taigrr, just as a heads up we are introducing a file picker bubble here which is being used in Gum / Soft Serve, let us know if you have any feedback / if it meets your needs:

@taigrr
Copy link
Contributor Author

taigrr commented Mar 21, 2023

@squrki can you take a look at the differences in feature coverage here? I know we support dual-pane browsing, for example.

@squrki
Copy link
Contributor

squrki commented Mar 23, 2023

@maaslalani, this filepicker code activates in only the current directory, and it doesn't allow movement between parent and sub folders. My code allows for these. It also allows for single or dual panes to see the parent folder contents. Would you be interested in having this functionality added?

@maaslalani
Copy link
Contributor

We do allow setting the CurrentDirectory now: 1ca90b3

We also do allow movement between parent and subfolders! (do let me know if it's not working or if I'm misinterpreting the comment, you can try the bubble with gum file)

I can see the multiple panes being a good feature addition as well!

@taigrr taigrr closed this Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants