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

New Files internal link GET param to avoid opening the file #30645

Merged
merged 1 commit into from Jan 14, 2022

Conversation

julien-nc
Copy link
Member

@julien-nc julien-nc commented Jan 13, 2022

This adds a openfile GET param to internal links (/f/FILE_ID) to avoid setting the openfile param in the redirect response.
This can be useful when the intention is to show the file's activity for example.
It is already possible to get there with links like https://my.nc.org/index.php/apps/files/?dir=/&scrollto=name.txt but it requires to know the file path.

@julien-nc julien-nc added this to the Nextcloud 24 milestone Jan 13, 2022
@julien-nc julien-nc requested review from a team, PVince81, artonge and Pytal and removed request for a team January 13, 2022 12:16
@PVince81
Copy link
Member

if the default behavior is to open the file, how about calling it "openfile=0" to disable it, and the default would be "openfile=1" ? or is that less intuitive ?

@julien-nc julien-nc force-pushed the enh/internal-link-scroll-only branch from 15319ed to e0e976f Compare January 13, 2022 13:18
@julien-nc
Copy link
Member Author

@PVince81 Yes, makes sense. Done and pushed.

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@julien-nc
Copy link
Member Author

Thank you both for the review. What do you think about backporting that?

@Pytal
Copy link
Member

Pytal commented Jan 14, 2022

Thank you both for the review. What do you think about backporting that?

As long as this doesn't change existing functionality up to you :)

@skjnldsv
Copy link
Member

Thank you both for the review. What do you think about backporting that?

As long as this doesn't change existing functionality up to you :)

Agreed!

…direct

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@julien-nc julien-nc force-pushed the enh/internal-link-scroll-only branch from e0e976f to b67b4b1 Compare January 14, 2022 09:50
@julien-nc
Copy link
Member Author

/backport to stable23

@julien-nc
Copy link
Member Author

/backport to stable22

@julien-nc
Copy link
Member Author

/backport to stable21

@julien-nc
Copy link
Member Author

CI failure is not related.

@lindenthal
Copy link

Thanks @eneiluj and @skjnldsv @Pytal and @PVince81
We really appreciate your effort. It is fun to develop open source software with the Nextcloud team!

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.

None yet

6 participants