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

Add Option to Open Files Directly from Search Results #253

Merged
merged 6 commits into from
Apr 23, 2024

Conversation

And0r-
Copy link
Contributor

@And0r- And0r- commented Dec 15, 2023

The ability to open a file directly from search results, as requested in Issue #249, is a very useful feature. This idea was initially proposed by ostasevych in Pull Request #250.

I've implemented this feature and added an option to the plugin settings. By default, the current behavior remains unchanged. However, users now have the choice to enable direct opening of files from search results. This enhancement aims to improve user experience by providing a more efficient way to access files through search.

Please review the changes and consider merging them into the main project. Thank you for your consideration!

@And0r-
Copy link
Contributor Author

And0r- commented Dec 15, 2023

I wanted to provide a quick update on this PR. I've noticed that the implemented method for directly opening files from search results may not be functioning as expected in Nextcloud version 28. I am currently investigating this issue to better understand why this is happening and to find a suitable solution.

I will update this PR with any new findings or necessary code adjustments as soon as possible. Meanwhile, I appreciate your patience and welcome any feedback or suggestions from the community.

Signed-off-by: DESKTOP-E98Q6N0\And0r <[email protected]>
…m nextcloud do it (FileSearchProvider.php#154)

this will create a link like /f/<file_id> that works in previews and version nc 28. it is a little bit ugly because you will be redirected multiple time but better as a broken Link

Signed-off-by: DESKTOP-E98Q6N0\And0r <[email protected]>
@And0r-
Copy link
Contributor Author

And0r- commented Dec 16, 2023

I'm pleased to provide an update on this Pull Request. After further investigation, I discovered that the initial method for opening files directly from search results needed an adjustment for compatibility with Nextcloud version 28.

I have now updated the implementation to align with the method used in Nextcloud's official FilesSearchProvider.php. The revised approach utilizes the files.View.showFile route to generate links, ensuring compatibility with Nextcloud 28:

$link = $this->urlGenerator->linkToRoute('files.View.showFile', ['fileid' => $document->getId()]);

This change should resolve the issues observed with Nextcloud 28, and the feature now functions as intended across different Nextcloud versions. I have tested this thoroughly to ensure its reliability and compatibility.

I believe this update will enhance the user experience by providing a more efficient way to access files directly from search results. Your review and feedback on these changes would be greatly appreciated.

Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

@And0r-
Copy link
Contributor Author

And0r- commented Jan 13, 2024

Hi @ArtificialOwl,
The PR has been open for a long time now; are there any issues with it, or is there anything I can do to make the review process easier? I am willing to invest another 2-3 weekends if needed.
So just let me know if you would prefer the feature to be implemented differently.

Alternatively, if the feature won't be merged because there's not enough interest, it would be helpful to know. In that case, I'll create a userscript workaround for myself to remain update-capable.

@DaphneMuller
Copy link

@ArtificialOwl is this pull request still on your radar? If you don't have time for it, could you please raise it to Stephan?

@ArtificialOwl
Copy link
Member

/backport to stable28

@ArtificialOwl
Copy link
Member

/backport to stable27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants