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

feat: File browsers - add ability to quickly jump to any path segment #1659

Merged

Conversation

mdziekon
Copy link
Contributor

Description

This PR adds the feature requested in #1643, which allows to interactively use the "current path" (visible above the file browsers / explorer, eg. "GCode files" explorer) to quickly navigate to any segment of the path.

Path navigations allows for both mouse & keyboard usage (provides bare minimum of accessibility), allows to select the entire path (eg. to copy & paste it as text somewhere). It is also implemented as a reusable component, to both help with maintainability, and allow for future reuse in other places.

Related Tickets & Documents

#1643

Mobile & Desktop Screenshots/Recordings

Gcode files explorer (webm)
Config files explorer (webm)

[optional] Are there any post-deployment tasks we need to perform?

N/A

@mdziekon
Copy link
Contributor Author

@meteyou as per your request:

(...) the only thing i would implement differently would be to use the word "/gcodes" instead of the house icon, as this is the real path

I've changed the "house icon" to "/gcodes" string in the "G-code files" explorer. However, I've left a default slot with the said icon, in case if the first segment has no directory name. If you don't think this is necessary, this can of course be removed.

Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
@mdziekon mdziekon force-pushed the feature/file-browser-quick-path-nav branch from cc1af28 to b2f89cd Compare November 18, 2023 16:55
@meteyou
Copy link
Member

meteyou commented Nov 23, 2023

@mdziekon thx for your commit. In moonraker, every path has a root directory. examples for these are:

  • /gcodes
  • /config
  • /logs
  • /timelapse
  • /examples

Its not possible, that there are files in / directly. So i think it should fit with these root directories as first option in the "breadcrumbs".

Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
@mdziekon
Copy link
Contributor Author

@meteyou I've assumed that your reply means "yes, please delete redundant code", and so I did exactly that (and added some documentation).

This PR should be ready for (another?) review.

@meteyou
Copy link
Member

meteyou commented Nov 27, 2023

@mdziekon THX! I will review it as soon as possible.

Copy link
Member

@meteyou meteyou left a comment

Choose a reason for hiding this comment

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

I just took a closer look at the PR. I commented a question for you above. I also noticed that this function still needs to be added in timelapse. I also have another question. Could you make the current folder "unclickable"? Currently, the hover has the underline and the pointer. It looks weird when you can click, but nothing happens.

I think i can merge this PR after these "fixes"

src/components/ui/PathNavigation.vue Outdated Show resolved Hide resolved
Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
@meteyou meteyou merged commit 82f0647 into mainsail-crew:develop Dec 1, 2023
9 checks passed
@meteyou
Copy link
Member

meteyou commented Dec 1, 2023

Thx for your PR!

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.

None yet

2 participants