Skip to content

@theguild/components v7 #1587

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

Merged
merged 65 commits into from
Oct 14, 2024
Merged

@theguild/components v7 #1587

merged 65 commits into from
Oct 14, 2024

Conversation

dimaMachina
Copy link
Contributor

No description provided.

Verified

This commit was signed with the committer’s verified signature.
cjihrig Colin Ihrig

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
Copy link

changeset-bot bot commented Aug 2, 2024

🦋 Changeset detected

Latest commit: 489e458

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@theguild/components Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dimaMachina dimaMachina mentioned this pull request Aug 2, 2024

Unverified

The email in this signature doesn’t match the committer email.
dimaMachina and others added 6 commits August 2, 2024 19:02

Unverified

The email in this signature doesn’t match the committer email.
try

Unverified

The email in this signature doesn’t match the committer email.
aa
Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
Copy link
Contributor

github-actions bot commented Aug 2, 2024

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@theguild/components 7.0.0-alpha-20241014142507-489e4586c3bb6783d879277ec477c014084d6da9 npm ↗︎ unpkg ↗︎

dimaMachina and others added 2 commits August 2, 2024 19:46
Copy link
Contributor

github-actions bot commented Aug 7, 2024

📚 Storybook Deployment

The latest changes are available as preview in: https://8ffe282d.the-guild-docs-storybook.pages.dev

hasparus and others added 12 commits August 29, 2024 21:06
Comment on lines +327 to +342
[
'Documentation',
PaperIcon,
isHive ? '/docs' : 'https://the-guild.dev/graphql/hive/docs',
],
['Status', TargetIcon, 'https://status.graphql-hive.com/'],
[
'Product Updates',
RightCornerIcon,
isHive
? '/product-updates'
: 'https://the-guild.dev/graphql/hive/product-updates',
],
['Blog', PencilIcon, 'https://the-guild.dev/blog'],
['GitHub', GitHubIcon, 'https://github.com/kamilkisiela/graphql-hive'],
] as const
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use object, not tuple

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is immediately mapped into JSX, so any property keys just bloat the bundle — this is why I just used tuples here.

Do you guys have a convention against tuples? Also cc @saihaj because I think he gave me the same comment elsewhere.

I don't mind changing it, I'm just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in future Nextra 4 _meta.js will be server components, so this will not increase bundle

Comment on lines +355 to +362
[
'YouTube',
YouTubeIcon,
'https://www.youtube.com/watch?v=d_GBgH-L5c4&list=PLhCf3AUOg4PgQoY_A6xWDQ70yaNtPYtZd',
],
['X', TwitterIcon, 'https://x.com/theguilddev'],
['LinkedIn', LinkedInIcon, 'https://www.linkedin.com/company/the-guild-software/'],
['Discord', DiscordIcon, 'https://discord.com/invite/xud7bH9'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same, object, not tuple

// These icons are _different_ than the ones used elsewhere.
// e.g. Discord is a "chat" bubble with the Discord logo in the center.

function YouTubeIcon(props: React.SVGProps<SVGSVGElement>) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to .svg

);
}

function TwitterIcon(props: React.SVGProps<SVGSVGElement>) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to .svg

);
}

function LinkedInIcon(props: React.SVGProps<SVGSVGElement>) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to svg

);
}

function DiscordIcon(props: React.SVGProps<SVGSVGElement>) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to svg

const marker = markerRef.current;
const observer = new IntersectionObserver(entries => {
onChangeRef.current(entries[0].boundingClientRect.y < -1);
}, {});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
}, {});
});

onChangeRef.current = onChange;

useEffect(() => {
if (mounted && markerRef.current && 'IntersectionObserver' in window) {
Copy link
Contributor Author

@dimaMachina dimaMachina Oct 8, 2024

Choose a reason for hiding this comment

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

Suggested change
if (mounted && markerRef.current && 'IntersectionObserver' in window) {
if (mounted && markerRef.current) {

it's available in all modern browsers

>
<NavigationMenuPrimitive.Viewport
className={cn(
'relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] origin-[top_center] overflow-hidden rounded-xl border border-beige-200 bg-white shadow-[0px_16px_32px_-12px_rgba(14,18,27,0.10)] ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-90 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 dark:border-neutral-800 dark:bg-neutral-900',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
'relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] origin-[top_center] overflow-hidden rounded-xl border border-beige-200 bg-white shadow-[0px_16px_32px_-12px_rgba(14,18,27,0.10)] ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-90 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 dark:border-neutral-800 dark:bg-neutral-900',
'relative mt-1.5 h-[--radix-navigation-menu-viewport-height] w-[--radix-navigation-menu-viewport-width] origin-[top_center] overflow-hidden rounded-xl border border-beige-200 bg-white shadow-[0px_16px_32px_-12px_rgba(14,18,27,0.10)] ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-90 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 dark:border-neutral-800 dark:bg-neutral-900',

use shorthand

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch

Comment on lines 16 to 18
render() {
return <ToolsAndLibrariesCards />;
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
render() {
return <ToolsAndLibrariesCards />;
},
render: ToolsAndLibrariesCards,

const cardDecorations = {
[PRODUCTS.HIVE.name](props: React.SVGAttributes<SVGSVGElement>) {
return (
<svg
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to svg

hasparus and others added 13 commits October 11, 2024 19:36
Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
…and Prettier
@hasparus hasparus merged commit 2dfb846 into main Oct 14, 2024
5 checks passed
@hasparus hasparus deleted the v7 branch October 14, 2024 14:50
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.

None yet

3 participants