Skip to content

Conversation

@silverkszlo
Copy link
Contributor

@silverkszlo silverkszlo commented Jun 2, 2025

This PR introduces a new sharing option component called "Internal Link", which allows users to copy a direct link to the currently selected table or view. This feature is useful for quickly sharing internal resources with users who already have access to the folder.

Features:

  • New ShareInternalLink.vue component
  • Displays an icon, title, and description for internal links
  • Includes a copy-to-clipboard button using NcActionButton and ContentCopy icon
  • Localized (t('tables', ...)) and translations for English and German added

Screenshot from 2025-06-03 08-08-08

@silverkszlo silverkszlo requested review from blizzz and enjeck as code owners June 2, 2025 16:05
@juliusknorr juliusknorr self-requested a review June 2, 2025 16:32
@juliusknorr juliusknorr added enhancement New feature or request 3. to review Waiting for reviews labels Jun 2, 2025
@silverkszlo silverkszlo force-pushed the internal-link-to-clipboard branch from 23e06b7 to a6a3959 Compare June 2, 2025 17:28
Copy link
Contributor

@enjeck enjeck left a comment

Choose a reason for hiding this comment

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

Can you please also attach a picture of what the UI looks like?

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the pull request, this looks very good already. I've left a few minor comments on the code itself and one note about a functional issue. Could you have another quick look at those?

@juliusknorr
Copy link
Member

And just to mention, there is some flakyness in the cypress and phpunit tests right now, so those failures would be something @enjeck can check and tell if they are related to the change or not.

@silverkszlo silverkszlo force-pushed the internal-link-to-clipboard branch 2 times, most recently from b4bde6f to 5159f0a Compare June 3, 2025 13:10
@silverkszlo
Copy link
Contributor Author

Thanks a lot for the pull request, this looks very good already. I've left a few minor comments on the code itself and one note about a functional issue. Could you have another quick look at those?

Thank you @juliusknorr ! I have implemented the suggested changes :)

@juliusknorr
Copy link
Member

juliusknorr commented Jun 4, 2025

Thanks a lot. Could you have a look at the failing REUSE and eslint checks? Those two seem related to the changes, the others can be ignored for now (or a rebase to the latest main branch may solve them)

if (!this.activeElement) {
return ''
}
const baseUrl = generateUrl('/apps/tables/', {}, { baseURL: window.location.origin })
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const baseUrl = generateUrl('/apps/tables/', {}, { baseURL: window.location.origin })
const baseUrl = generateUrl('/apps/tables/')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In more or less two hours I'll have time to work on that and the failing checks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used baseURL: window.location.origin when calling generateUrl to ensure the generated URL works correctly in my local development environment, where relative paths like /index.php/... were resolving incorrectly (e.g., resulting in a file:/// URL instead of http://localhost).

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

One nitpick and two ci failures, but otherwise this is good to get in already from my side 👍

@enjeck
Copy link
Contributor

enjeck commented Jun 4, 2025

@silverkszlo For the Cypress checks, those are flaky and would pass upon rerunning, so you need not worry about them

@enjeck
Copy link
Contributor

enjeck commented Jun 4, 2025

To fix other CI fails:

  • For REUSE compliance test, just hard similar SPDX copyright header to src/modules/sidebar/partials/ShareInternalLink.vue as in other files.
  • For eslint, run npm run lint:fix

@silverkszlo silverkszlo force-pushed the internal-link-to-clipboard branch from 5159f0a to 23bb581 Compare June 4, 2025 14:15
Signed-off-by: silverkszlo <paguaro@posteo.eu>
Signed-off-by: silverkszlo <paguaro@posteo.eu>
Signed-off-by: silverkszlo <paguaro@posteo.eu>
@juliusknorr juliusknorr force-pushed the internal-link-to-clipboard branch from 23bb581 to 386c86d Compare June 4, 2025 14:40
@juliusknorr juliusknorr requested a review from enjeck June 4, 2025 14:47
@juliusknorr juliusknorr merged commit 512ca16 into nextcloud:main Jun 4, 2025
45 of 48 checks passed
@github-actions
Copy link
Contributor

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!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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

Labels

3. to review Waiting for reviews enhancement New feature or request feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants