Skip to content

conversation-activity-filter - Turn into svelte component - #9675

Merged
fregante merged 11 commits into
mainfrom
copilot/extract-menu-component
Jun 2, 2026
Merged

fregante merged 11 commits into
mainfrom
copilot/extract-menu-component

Conversation

Copilot AI commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@fregante

fregante commented Jun 2, 2026 •

Copy link
Copy Markdown
Member

This doesn't save bytes, but it helps keep the feature readable by extracting the large component's markup to a dedicated file.

For example it only now occurred to me that we're doing so much work on the page even when none of this is needed most of the time. I'll look into activating the comment observer only after the user picks an option from the menu.

select-notifications might be next if this is successful

@fregante fregante changed the title Extract conversation activity filter menu into a reusable Svelte component conversation-activity-filter - Turn into svelte component Jun 2, 2026
@fregante
fregante marked this pull request as ready for review June 2, 2026 06:36

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Surprisingly... it works! Not excited by the extra lines, extra files, and :global() selectors, but I think it's worth it.

Image

Copilot AI requested a review from fregante June 2, 2026 06:48
@fregante

fregante commented Jun 2, 2026

Copy link
Copy Markdown
Member

😍

Screenshot

In the last copilot commit I took advantage of Svelte, which let me skip the raw CSS and related classes altogether. This sort of diff, paired with the readability of the resulting code, further justifies using svelte components.

The drawback is that this PR adds about 4KB to the final bundle. It's unfortunate that JSX is more efficient than Svelte in this regard.

@fregante
fregante merged commit 3434aaf into main Jun 2, 2026
13 checks passed
@fregante fregante added the meta Related to Refined GitHub itself label Jun 2, 2026
@fregante
fregante deleted the copilot/extract-menu-component branch June 2, 2026 10:29
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

To maintainers: Please add labels to this PR

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

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

2 participants