Skip to content

netiquette - Improve reliability - #9900

Merged
fregante merged 12 commits into
mainfrom
netiquetter
Jul 30, 2026
Merged

fregante merged 12 commits into
mainfrom
netiquetter

Conversation

@fregante fregante left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The code was so bad that this PR is line-negative even without the deletion of banner.tsx and timeline-item.tsx

Image

Comment thread source/features/netiquette.tsx Resolved
Comment thread source/features/netiquette.tsx Resolved
<a href={buildRepoUrl('discussions/new/choose')}>new discussion</a>
{/if}
instead of leaving a comment here.
{/if}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The message now is shown even if issues and discussions are disabled.

}
</script>

{#if pageDetect.isDraftPR() && !isOwnConversation()}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The good part of this PR is that now all the logic is mutually exclusive and self-contained. This helped me simplify the logic and improve it.

For example we can now show "closed long ago" on PR Files. It was always possible, but the extensive logic was never updated as it was spread out.

</script>

{#if pageDetect.isDraftPR() && !isOwnConversation()}
<div class={flashClass}>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note that this no longer uses "Banner". With all the changes, we only have the background and icon color left, everything else is replicable via classes.


void features.add(import.meta.url, {
exclude: [
isRefinedGitHubRepo,

@fregante fregante Jul 29, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

  • Restore this in the svelte component

</script>

<TimelineItem>
<Banner classes={[revealed ? 'flash-error' : 'rgh-bg-none']} icon={InfoIcon}>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

rgh-netiquette uses a completely different style, it exclusively shares AncientIssueText now

@fregante
fregante marked this pull request as ready for review July 30, 2026 08:58
Comment on lines +54 to +66
{#if isPopular()}
{#await userIsModerator() then isModerator}
{#if !isModerator}
<div class={flashClass}>
<DomChef as={FlameIcon} />
<span>This issue is highly active. Reconsider commenting unless you
have read all the comments and have something to add.</span>
</div>
{/if}
{/await}
{/if}
{#if !isRefinedGitHubRepo()}
{#await getCloseDate() then date}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

"Popular" + "old" banners can now appear at the same time. The wording is a bit redundant but I think it's worth showing both pieces of information.

Image

@fregante
fregante merged commit cb25b86 into main Jul 30, 2026
14 checks passed
@fregante
fregante deleted the netiquetter branch July 30, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant