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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

956MB
Copy link

@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
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants