Skip to content

Conversation

@soham04
Copy link

@soham04 soham04 commented Oct 28, 2025

Description

Fixes the confusing UX issue where clicking the current folder in the breadcrumb path bar triggers a reload with a spinner that completes without any visible changes. This was especially confusing for new users who may not recognize it as a path bar.

Changes Made

  • Added isCurrent flag to identify the last breadcrumb (current directory)
  • Disabled the to prop for the current directory to make it non-navigable
  • Disabled click handler for the current directory to prevent unnecessary reloads
  • Simplified disableDrop logic to use the isCurrent flag
  • Current folder now behaves as a label instead of an interactive button
  • Fixes visual glitch with spacing between breadcrumb and "New" button

Testing

  • ✅ Built successfully with npm run build in GitHub Codespaces
  • ✅ No TypeScript/Vue compilation errors
  • ✅ Code follows existing patterns in the codebase
  • ✅ Logic verified: last breadcrumb is correctly identified and made non-clickable

Implementation Details

The fix uses a simple isCurrent flag based on the breadcrumb's index position. When isCurrent is true:

  • The to prop is set to undefined (prevents navigation)
  • The click handler returns undefined (prevents reload)
  • The breadcrumb appears as a label rather than a clickable link

Fixes #55988

cc @nextcloud/designers @marcoambrosini @kra-mo

- Add isCurrent flag to identify last breadcrumb item
- Disable 'to' prop and click handler for current directory
- Current folder now appears as a label instead of clickable button
- Fixes visual spacing issue with the New button

Fixes nextcloud#55988
@soham04 soham04 requested review from a team and skjnldsv as code owners October 28, 2025 04:11
@soham04 soham04 requested review from artonge and szaimen and removed request for a team October 28, 2025 04:11
@soham04
Copy link
Author

soham04 commented Oct 28, 2025

👋 Hi everyone, this is my first contribution to Nextcloud, so I want to make sure I’m testing things correctly.

I made this fix and verified that it builds successfully in GitHub Codespaces (npm run build worked fine).
However, I’d like to actually run the full Nextcloud UI locally to interact with the breadcrumb component and confirm everything visually.

Could you please share the recommended way to start the development environment for the server repo (e.g. via Docker or manual setup)?
I looked through the documentation under “Development environment” but just want to confirm what the maintainers typically use to preview UI changes.

Thanks in advance! 🙏
Really excited to make my first open source contribution here ❤️

@susnux
Copy link
Contributor

susnux commented Oct 28, 2025

Thank you for your PR!
But this behavior is intentional to reload the current folder without having to reload the full page.
In production its useful to have this to update the view after e.g. changes on your client.

Its also marked as this in the title of the button ("reload current view").

See discussion: #55988 (comment)

@szaimen szaimen removed their request for review October 28, 2025 12:08
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.

Folder refresh action unexpected

2 participants