Skip to content

Conversation

monikaksiaz
Copy link
Contributor

No description provided.

@mateuszbartosik
Copy link
Contributor

@kalczur please review from the perspective of TypeScript
@Lwiel can you check why the table of contents is visible on this page?
image

@@ -0,0 +1,198 @@
import CardWithImage from '@site/src/components/Common/CardWithImage';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import CardWithImage from '@site/src/components/Common/CardWithImage';
---
title: "AI Overview"
hide_table_of_contents: true
sidebar_label: AI Overview
---
import CardWithImage from '@site/src/components/Common/CardWithImage';

@@ -43,16 +49,21 @@ export default function Button({
);

if (url) {
const external = !isInternalUrl(url);
Copy link

Choose a reason for hiding this comment

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

Suggested change
const external = !isInternalUrl(url);
const isExternal = !isInternalUrl(url);

const pluginId = "default";
const { activeVersion } = useActiveDocContext(pluginId);

if (minimumVersion > activeVersion.label) {
Copy link

Choose a reason for hiding this comment

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

You are comparing string values, not number. It can be very tricky
e.g. "7.0">"7" == true

Use number values to compare.

Also it looks like the naming or condition is wrong. When minimumVersion is greater than activeVersion we do not render children?

Copy link
Contributor

Choose a reason for hiding this comment

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

@kalczur please verify the code, but it appears to be working just fine
image

Copy link

Choose a reason for hiding this comment

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

In these scenarios yes, but check e.g.
"10.1" > "9.9"

JavaScript compares the string sign by sign

Copy link

Choose a reason for hiding this comment

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

ping me if needed

lg: "gap-8",
};

export default function OneColGrid({
Copy link

Choose a reason for hiding this comment

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

Can we make one component with colCount props instead of creating new component for each scenario?

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.

4 participants