Skip to content
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

Added new badge and message for AI kit #8110

Merged
merged 9 commits into from
Dec 11, 2024

Conversation

ErikCH
Copy link
Contributor

@ErikCH ErikCH commented Nov 20, 2024

Description of changes:

This creates a new badge and message about AI kit. This will only appear on the homepage.

image

And a new New badge:

image

Dark mode

image image

Related GitHub issue #, if available:

Instructions

If this PR should not be merged upon approval for any reason, please submit as a DRAFT

Which platform(s) are affected by this PR (if applicable)?

  • JS
  • Swift
  • Android
  • Flutter
  • React Native

Please add the product(s)/platform(s) affected to the PR title

Checks

  • Does this PR conform to the styleguide?

  • Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.

  • Are any files being deleted with this PR? If so, have the needed redirects been created?

  • Are all links in MDX files using the MDX link syntax rather than HTML link syntax?

    ref: MDX: [link](https://docs.amplify.aws/)
    HTML: <a href="https://docs.amplify.aws/">link</a>

When this PR is ready to merge, please check the box below

  • Ready to merge

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ErikCH ErikCH marked this pull request as ready for review November 22, 2024 23:49
@ErikCH ErikCH requested a review from a team as a code owner November 22, 2024 23:49
dbanksdesign
dbanksdesign previously approved these changes Dec 10, 2024
yarn.lock Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
}

export const Banner: React.FC<BannerProps> = ({
url = '/react/ai/set-up-ai/'
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably don't need this prop since the rest of the banner content is hardcoded, right? Might as well just put it directly on the button

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I'll make it a constant variable URL

href={url}
size="small"
gap="small"
target="_blank"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why open a new window on the same site?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -71,6 +72,7 @@ export const Layout = ({
const basePath = 'docs.amplify.aws';
const metaUrl = url ? url : basePath + asPathWithNoHash;
const pathname = router.pathname;
const shouldShowGen2Banner = asPathWithNoHash === '/';
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't really related to gen2, this is an ai banner.

Suggested change
const shouldShowGen2Banner = asPathWithNoHash === '/';
const shouldShowAIBanner = asPathWithNoHash === '/';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

url?: string;
}

export const Banner: React.FC<BannerProps> = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

This should just be called AIBanner since the content is hardcoded.

@ErikCH ErikCH requested a review from dindjarinjs December 10, 2024 23:52
@dbanksdesign dbanksdesign merged commit 022988a into aws-amplify:main Dec 11, 2024
12 checks passed
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.

3 participants