Open
Conversation
Agent-Logs-Url: https://github.com/IntelliTect/EssentialCSharp.Web/sessions/1b04636e-1e3d-4243-a8a5-9f9d3afa169b Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add share button to page with referral id
Add page-level share button with referral ID
May 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a page-level “Share” action to copy the current page URL (without hash) with the referral ID (rid) appended when available, aligning page sharing behavior with existing section-link sharing.
Changes:
- Refactors clipboard/referral URL handling into shared helpers and introduces
shareCurrentPage()inuseSiteShell.js. - Adds a centered share button to the page navigation UI (content pages only).
- Updates CSS to support centered tooltip positioning and button styling parity with existing nav arrows.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| EssentialCSharp.Web/wwwroot/css/styles.css | Adds centered tooltip positioning and button reset styles for the new share control. |
| EssentialCSharp.Web/src/composables/useSiteShell.js | Extracts referral/clipboard helpers and adds shareCurrentPage() to copy the page URL with rid. |
| EssentialCSharp.Web/src/components/PageNavigation.vue | Introduces a share button between prev/next navigation arrows and wires it to shareCurrentPage(). |
Comments suppressed due to low confidence (1)
EssentialCSharp.Web/src/composables/useSiteShell.js:112
- The error snackbar message uses string interpolation on the raw
errorobject, which often renders as[object DOMException]and isn’t helpful to users. Consider surfacing a friendlier message (e.g.,error.messagewhen available) while keeping the detailed object inconsole.error.
(error) => {
console.error("Could not copy text to clipboard: ", error);
snackbarColor.value = "red";
snackbarMessage.value = `Error: Could not copy text to clipboard: ${error}`;
}
Comment on lines
100
to
123
| @@ -129,6 +122,25 @@ export function useSiteShell() { | |||
| }, 3000); | |||
| } | |||
| </span> | ||
| </div> | ||
| <div v-if="shell.isContentPage" class="turn-page-tooltip"> | ||
| <button id="share-btn" class="arrow-btn" aria-label="Share this page" @click="shell.shareCurrentPage()"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Section anchor links already append
?rid=<referralId>when copied, but there was no way to share the page URL itself with a referral ID attached.Changes
useSiteShell.jsaddReferralIdToUrl(url)helper — eliminates duplicated referral ID injection logicwriteToClipboard(url, successMessage?)helper — shared by both copy functionsshareCurrentPage()— copies current page URL (no hash) with referral ID as?rid=...if available; exposed in composable returnPageNavigation.vuefa-solid fa-share-from-squarebutton between prev/next arrowsv-if="shell.isContentPage")shareCurrentPage()on click with a "Share Page" tooltipstyles.css.tooltip-centerfor the share button tooltip positioningborder/paddingreset for<button>.arrow-btnto match<a>sibling appearance