Skip to content

comments-time-machine-links - Fix date parameter disappearing #8754

Merged
fregante merged 6 commits intorefined-github:mainfrom
SunsetTechuila:comments-time-machine-links
Nov 11, 2025
Merged

comments-time-machine-links - Fix date parameter disappearing #8754
fregante merged 6 commits intorefined-github:mainfrom
SunsetTechuila:comments-time-machine-links

Conversation

@SunsetTechuila
Copy link
Member

@SunsetTechuila SunsetTechuila commented Nov 9, 2025

addresses #8712 (comment)

fixes the issue of the date parameter not reappearing after a comment was edited

addresses some review comments

Test URLs

#8698

Screenshot

const comment = relativeTime.closest(`:is(${commentSelector})`)!;
addInlineLinks(comment, relativeTime.attributes.datetime.value);
},
`:is(${commentSelector}) a[href^="${location.origin}"]:not(.${linkifiedURLClass})`,
Copy link
Member Author

Choose a reason for hiding this comment

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

this should be safe to replace with .markdown-body a[href^="${location.origin}"]:not(.${linkifiedURLClass})

@SunsetTechuila SunsetTechuila changed the title fixes and improvements comments-time-machine-links.tsx‎ - Fix date parameter disappearing Nov 9, 2025
@SunsetTechuila SunsetTechuila changed the title comments-time-machine-links.tsx‎ - Fix date parameter disappearing comments-time-machine-links - Fix date parameter disappearing Nov 9, 2025
@fregante fregante added the bug label Nov 9, 2025
Comment on lines 128 to 144
@@ -138,8 +143,8 @@ async function addDropdownLinkReact({delegateTarget: delegate}: DelegateEvent):
$('[class^="prc-ActionList-ItemLabel"]', menuItem).textContent = 'View repo at this time';
$('[class^="prc-ActionList-LeadingVisual"]', menuItem).replaceChildren(<HistoryIcon />);
Copy link
Member Author

@SunsetTechuila SunsetTechuila Nov 9, 2025

Choose a reason for hiding this comment

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

should I use createDropdownItem?

It looks fine when wrapped with an element that provides inline margin

Copy link
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

Looks mostly right 🙏 will review again tomorrow

@SunsetTechuila SunsetTechuila force-pushed the comments-time-machine-links branch from 696a944 to a44de93 Compare November 10, 2025 10:57
@fregante fregante merged commit 973928b into refined-github:main Nov 11, 2025
9 checks passed
@SunsetTechuila SunsetTechuila deleted the comments-time-machine-links branch November 11, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants