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

Archive: Add dynamic paths to browser tab #322

Merged
merged 14 commits into from
Jan 17, 2025

Conversation

956MB
Copy link
Member

@956MB 956MB commented Dec 15, 2024

What's new

Adds to the option to show current directory/path in archive tab instead of static tab text. Default state is OFF to maintain the existing look, but I personally think Current could probably be set as default if merged. Of course all text involed Show Browser Path, Current, Brief and Full could be changed as well.

  • Adds setting under "Interface > File Browser > Show Browser Path" with four options:
    • Off (default): Shows static tab text like before (e.g. "Browser", "Sub-GHz", etc.)
    • Current: Shows the current directory name only (e.g. "Games")
    • Brief: Abbreviates the full path to the current directory (e.g. /e/a/Games")
    • Full: Shows complete path from root (e.g. "/ext/apps/Games")
  • Path updates when navigating through directories. It is also maintained when opening an app and clicking back into the browser.
  • Maintains existing header styling and layout keeping it within the frame
  • Long paths that exceed the frame width are drawn with elements_scrollable_text_line to allow for full visibility.
    • e.g. Short paths like Games are drawn centered like normal, and long ones like /ext/apps/Games scroll.

Screenshots

"Off"

OFF

"Current"

Current

"Brief"

Brief

"Full"

Full


For the reviewer

  • I've uploaded the firmware with this patch to a device and verified its functionality
  • I've confirmed the bug to be fixed / feature to be stable

I thought it would be cool to be able to see when I was in say the
`apps_data/flipchess` folder, or some other nested folder, and have
"flipchess" be shown rather than the just "Browser" all the time. It's
not a huge or really crucial change, just a personal modification that
some people may also find useful.
@Willy-JL
Copy link
Member

missed opportunity for /e/a/Sports in the brief example xD

sorry i just had to 😆, i like this idea! will review in the coming days

@956MB
Copy link
Member Author

956MB commented Dec 15, 2024

missed opportunity for /e/a/Sports in the brief example xD

AGH! Scrap the whole thing. Kidding, looking forward to it 👍

Cleaned up `archive_update_formatted_path` function using switch case,
and also using the built in furi functions where possible. Also removed
the arbitrary and unnecessary `path_buf[256]`, making formatting the
path in the Brief section more memory safe.
@956MB 956MB self-assigned this Jan 13, 2025
Copy link
Member

@Willy-JL Willy-JL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small things, working on them rn

@Willy-JL
Copy link
Member

hmm tho the way i did it makes it not change text while searching. just that the scrollable text text functions need a furistring so i thought to just use the same one as formatted path, but then for searching it needs to change even if the path didnt change. might be easier to just use a temporary furistring, or to use the normal draw function while searching

Copy link
Member

@Willy-JL Willy-JL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :D

@Willy-JL Willy-JL added the feature New feature or request label Jan 17, 2025
@Willy-JL Willy-JL merged commit b9c0289 into Next-Flip:dev Jan 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants