Skip to content

Fix Guidelines page copy functionality to use consistent full path format and ensure referral ID inclusion #766

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 29, 2025

The Guidelines page copy functionality was using an inconsistent pattern compared to other pages in the application. While the existing copyToClipboard method already supported referral ID inclusion, the Guidelines page was calling it with just anchor IDs instead of the full path format used elsewhere.

Problem

  • Guidelines page used: copyToClipboard('naming-conventions-table')
  • Other pages used: copyToClipboard('hello-world#hello-world')

This inconsistency meant that copied URLs from the Guidelines page would use the current page URL as the base, while other pages explicitly specified the target page path.

Solution

Updated the Guidelines page to use the consistent full path format:

  • Changed copyToClipboard('naming-conventions-table') to copyToClipboard('guidelines#naming-conventions-table')
  • Updated dynamic section links to use copyToClipboard('guidelines#@group.Key?.ToLower()')

Results

Both approaches technically work and include referral IDs when available, but the new format is more reliable:

Before: https://site.com/guidelines#anchor?rid=referral-id (uses current URL)
After: https://site.com/guidelines#anchor?rid=referral-id (uses explicit path)

The new approach ensures consistent behavior regardless of the current page context and matches the pattern used throughout the rest of the application.

Guidelines Copy Functionality Demo

Fixes #765.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits July 29, 2025 21:03
…rmat and ensure referral ID inclusion

Co-authored-by: BenjaminMichaelis <[email protected]>
@Copilot Copilot AI changed the title [WIP] Guidelines page - use copy method to allow referral id to be added to copied url if available instead of directly copying Fix Guidelines page copy functionality to use consistent full path format and ensure referral ID inclusion Jul 29, 2025
@Copilot Copilot AI requested a review from BenjaminMichaelis July 29, 2025 21:14
Copilot finished work on behalf of BenjaminMichaelis July 29, 2025 21:14
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.

Guidelines page - use copy method to allow referral id to be added to copied url if available instead of directly copying
2 participants