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

enhance(apps/docs): improve and extend landing page content and layout #4304

Merged
merged 26 commits into from
Nov 18, 2024

Conversation

Queentaker
Copy link
Collaborator

@Queentaker Queentaker commented Oct 10, 2024

  • refactoring files into components
  • dynamic images
  • important images are just for display purposes

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced several new components for enhanced user engagement, including FeatureFocusSection, FeatureSection, TitleImage, UseCaseOverview, and CTA.
    • Added a responsive team section to display team members with images and positions.
  • Updates

    • Restructured the main landing page to utilize new components, improving modularity and user experience.
    • Updated the announcement bar to reflect new course locations.
  • Bug Fixes

    • Minor adjustments to component props for clarity and engagement.
  • Chores

    • Upgraded various Docusaurus dependencies to improve performance and stability.
    • Added an experimental feature for potential performance enhancements.

Copy link

aviator-app bot commented Oct 10, 2024

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

Copy link

coderabbitai bot commented Oct 10, 2024

Caution

Review failed

The pull request is closed.

📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request introduces several new React functional components within the landing section of the application, including FeatureFocusSection, FeatureSection, TitleImage, UseCaseOverview, and CTA. It also adds a Team component for displaying team member information. The index.tsx file has been restructured to utilize these new components, enhancing modularity. Additionally, the Docusaurus configuration and package.json have been updated to include new dependencies and modify existing ones, alongside minor adjustments to the announcement bar and development scripts.

Changes

File Change Summary
apps/docs/src/components/landing/FeatureFocusSection.tsx Introduced FeatureFocusSection component with props for title, description, features, and optional image; added Props interface.
apps/docs/src/components/landing/FeatureSection.tsx Introduced FeatureSection component with hover effects; added Feature and FeatureSectionProps interfaces.
apps/docs/src/components/landing/TitleImage.tsx Introduced TitleImage component with promotional message and call-to-action buttons.
apps/docs/src/components/landing/UseCaseOverview.tsx Introduced UseCaseOverview component displaying use cases in a responsive grid layout.
apps/docs/src/pages/index.tsx Restructured to use new components; modified props for FeatureSection; commented out FeatureFocusSection.
apps/docs/docusaurus.config.ts Updated configuration with new future section and removed @gabrielcsapo/docusaurus-plugin-matomo.
apps/docs/package.json Updated multiple Docusaurus package versions; added @docusaurus/faster and @types/react.
apps/docs/src/components/landing/CTA.tsx Introduced CTA component with title and two call-to-action buttons.
apps/docs/src/components/teampage/team.tsx Introduced Team component with TeamMember interface for displaying team members.

Possibly related PRs

Suggested reviewers

  • rschlaefli

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

cypress bot commented Oct 10, 2024

klicker-uzh    Run #3684

Run Properties:  status check passed Passed #3684  •  git commit cda5e14885 ℹ️: Merge 5de5d7c73c24c03f3c5a17991ddaecab267198c8 into 73260532b65a9a90f513e1951809...
Project klicker-uzh
Branch Review gamification_docs
Run status status check passed Passed #3684
Run duration 11m 17s
Commit git commit cda5e14885 ℹ️: Merge 5de5d7c73c24c03f3c5a17991ddaecab267198c8 into 73260532b65a9a90f513e1951809...
Committer Chris
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 140
View all changes introduced in this branch ↗︎

Copy link
Member

@sjschlapbach sjschlapbach left a comment

Choose a reason for hiding this comment

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

The hover effects are already very cool :) And a nicer component structure is also always a plus. I just added some comments to smaller styling ideas, which I had - if you disagree or have another idea, we're completely open for that :)
We just need to remember to add corresponding images to all sections before merging it. Also, the discussed counters could definitely be a nice add-on (maybe not too prominently centered, but somewhere further down - to give an impression that the tool is actually used)

apps/docs/src/pages/readme.md Outdated Show resolved Hide resolved
apps/docs/src/components/landing/FeatureSection.tsx Outdated Show resolved Hide resolved
apps/docs/src/components/landing/FeatureSection.tsx Outdated Show resolved Hide resolved
apps/docs/src/components/landing/FeatureSection.tsx Outdated Show resolved Hide resolved
<p className="mt-6 text-lg leading-8 text-gray-600">
{description}
</p>
<dl className=" mt-10 max-w-xl space-y-8 text-base leading-7 text-gray-600 lg:max-w-none">
Copy link
Member

Choose a reason for hiding this comment

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

Instead of spacing between the elements, would it maybe make sense to use padding on the components themselves? In this way the UI does not switch back to the first element when one changes from the second to the third?

description="Interact your students during class and drive engagement with
your materials."
imgSrc="/img_v3/sync_interaction.png"
title="Gamified Learning"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could make three different blocks like this underneath each other? One for gamification elements, one for synchronous activities and one for asynchronous activities? With somewhat reduced spacing between the text blocks, we could probably even fit it in the same space

Copy link
Member

Choose a reason for hiding this comment

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

It might be worth checking, whether alternating the size of the image makes it cooler for three successive blocks (like e.g. done on https://www.gbl.uzh.ch/) or whether it just becomes chaotic

apps/docs/src/components/landing/FeatureSection.tsx Outdated Show resolved Hide resolved
apps/docs/src/components/landing/TitleImage.tsx Outdated Show resolved Hide resolved
export function CTA() {
return (
<div className="space-y-4 py-16 text-center sm:py-24 md:space-y-8">
<H2 className={{ root: 'text-3xl' }}>Be Part of the Journey</H2>
Copy link
Member

Choose a reason for hiding this comment

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

As we're restyling the entire landing page, could we maybe also try to improve the styling of these components, make them look more alike the rest and somewhat more interesting? :)

@sjschlapbach sjschlapbach marked this pull request as draft October 10, 2024 18:52
@sjschlapbach sjschlapbach changed the title Gamification docs enhance(apps/docs): improve and extend landing page content and layout Oct 19, 2024
@sjschlapbach sjschlapbach marked this pull request as ready for review November 6, 2024 00:02
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.

Actionable comments posted: 7

🧹 Outside diff range and nitpick comments (17)
apps/docs/src/components/landing/UseCaseOverview.tsx (2)

10-31: Consider performance optimization for the grid rendering.

The Object.entries(USE_CASES) creates a new array on each render. Consider memoizing this transformation or moving the USE_CASES entries to a useMemo hook if the component re-renders frequently.

+import { useMemo } from 'react'

 export function UseCaseOverview() {
+  const useCaseEntries = useMemo(() => Object.entries(USE_CASES), [])
   return (
     <div className="space-y-4">
       <H2 className={{ root: 'text-2xl' }}>Use Cases</H2>
       <div className="grid grid-cols-1 gap-4 rounded md:grid-cols-3">
-        {Object.entries(USE_CASES).map(([href, item]) => (
+        {useCaseEntries.map(([href, item]) => (

10-10: Consider adding more responsive breakpoints for better layout control.

The current grid layout only switches between 1 and 3 columns. For better user experience on tablet-sized devices, consider adding an intermediate 2-column layout.

-      <div className="grid grid-cols-1 gap-4 rounded md:grid-cols-3">
+      <div className="grid grid-cols-1 gap-4 rounded sm:grid-cols-2 lg:grid-cols-3">
apps/docs/src/components/teampage/team.tsx (1)

1-5: Consider enhancing the TeamMember interface with additional fields and validation.

The interface could be improved by:

  1. Adding optional fields for social media links or contact information
  2. Including image validation to ensure URLs are valid
 interface TeamMember {
   imgSrc: string
   name: string
   position: string
+  socialLinks?: {
+    linkedin?: string
+    twitter?: string
+    github?: string
+  }
+  email?: string
 }
apps/docs/src/components/landing/CTA.tsx (3)

3-7: Add accessibility improvements to the component.

While the structure is well-organized, consider these accessibility enhancements:

  1. Add an ARIA label to the container div to describe its purpose
  2. Consider adding a role="region" to the main container
-    <div className="space-y-4 py-16 text-center sm:py-24 md:space-y-8">
+    <div 
+      className="space-y-4 py-16 text-center sm:py-24 md:space-y-8"
+      aria-label="Call to Action Section"
+      role="region"
+    >

13-24: Extract common button styles to reduce duplication.

Both buttons share identical styling. Consider extracting the common styles to a constant or creating a styled button component.

+ const BUTTON_STYLES = {
+   root: 'cursor-pointer flex-col items-start rounded-xl border-none bg-gray-100 p-6 text-left text-lg shadow-md hover:bg-gray-200 transition-colors',
+ }

- className={{
-   root: 'cursor-pointer flex-col items-start rounded-xl border-none bg-gray-100 p-6 text-left text-lg shadow-md',
- }}
+ className={BUTTON_STYLES}

Also applies to: 31-42


47-48: Choose a single export style.

The component has both named and default exports. Consider sticking to one style to maintain consistency and prevent confusion.

 export function CTA() {
   // ... component implementation
 }
- export default CTA
apps/docs/package.json (1)

25-25: Consider using consistent version range notation.

While the addition of @types/react is good for TypeScript support, consider using the tilde (~) version range for consistency with other dependencies.

-    "@types/react": "^18.3.11",
+    "@types/react": "~18.3.11",
apps/docs/src/components/landing/FeatureFocusSection.tsx (2)

14-55: Enhance accessibility and image handling.

Several improvements could be made to enhance accessibility and user experience:

  1. The image's alt text is generic ("App screenshot"). Consider making it customizable through props.
  2. The gradient overlay div marked as aria-hidden="true" is good, but ensure it doesn't contain any meaningful content.
  3. Consider adding ARIA labels for the features section to improve screen reader navigation.
 interface Props {
   title: string
   description: string
   features: { title: string; icon: React.ReactNode; text: string }[]
   imgSrc?: string
+  imgAlt?: string
 }

// In the component:
-              alt="App screenshot"
+              alt={imgAlt ?? "App screenshot"}

// Add ARIA label to features section:
-        <dl className="mx-auto grid max-w-2xl grid-cols-1 gap-x-6 gap-y-10
+        <dl aria-label="Feature list" className="mx-auto grid max-w-2xl grid-cols-1 gap-x-6 gap-y-10

56-56: Consider using only named exports for consistency.

The component is currently exported both as a named export and a default export. To maintain consistency and avoid confusion, consider sticking to named exports throughout the codebase.

-export default FeatureFocusSection
apps/docs/src/components/landing/FeatureSection.tsx (3)

6-19: Add JSDoc comments to interfaces for better documentation.

While the interfaces are well-structured, adding JSDoc comments would improve code documentation and IDE support.

+/**
+ * Represents a feature item with its associated properties
+ */
 interface Feature {
   title: string
   icon: IconDefinition
   text: string
   hoverImage: string
   shadow?: boolean
   isComingSoon?: boolean
 }

+/**
+ * Props for the FeatureSection component
+ */
 interface FeatureSectionProps {
   title: string
   description: string
   features: Feature[]
 }

21-23: Consider memoizing the hover handler for better performance.

The hover handler function is recreated on every render. Consider using useCallback to optimize performance.

-  const [hoveredFeatureIx, setHoveredFeatureIx] = useState<number>(0)
+  const [hoveredFeatureIx, setHoveredFeatureIx] = useState<number>(0)
+  const handleMouseEnter = useCallback((ix: number) => setHoveredFeatureIx(ix), [])

33-55: Enhance accessibility for the feature list.

The feature list could benefit from improved semantic markup and ARIA attributes for better screen reader support.

-<dl className="max-w-xl flex-1 space-y-6 text-base text-gray-600 lg:max-w-none">
+<dl className="max-w-xl flex-1 space-y-6 text-base text-gray-600 lg:max-w-none" role="list">
   {features.map((feature, ix) => (
     <div
       key={feature.title}
       className={twMerge(
         'flex cursor-pointer flex-row items-center gap-6 p-6 pl-9',
         hoveredFeatureIx === ix && 'rounded-xl bg-gray-100'
       )}
       onMouseEnter={() => setHoveredFeatureIx(ix)}
+      role="listitem"
+      aria-label={`Feature: ${feature.title}`}
     >
apps/docs/src/components/landing/TitleImage.tsx (2)

20-33: Add security attributes to external link and move inline styles to CSS.

The external link should include rel="noopener noreferrer" for security, and inline styles should be moved to CSS classes for better maintainability.

 <a
   href="https://community.klicker.uzh.ch/t/klickeruzh-v3-2-release-information/388"
-  className="whitespace-nowrap font-semibold"
+  className="whitespace-nowrap font-semibold ml-3"
   target="_blank"
+  rel="noopener noreferrer"
-  style={{ marginLeft: '0.75rem' }}
 >

56-66: Enhance security and simplify string concatenation.

Add security attributes to the external link and consider using template literals for better readability.

- We are now regularly offering introductory courses through UZH
- Central IT. For more details see{' '}
+ We are now regularly offering introductory courses through UZH
+ Central IT. For more details see{' '}
 <a
   target="_blank"
+  rel="noopener noreferrer"
   href="https://community.klicker.uzh.ch/t/2024-01-10-2024-02-08-klickeruzh-v3-0-introduction-and-didactic-use-cases/257"
 >
apps/docs/src/pages/index.tsx (3)

24-24: Standardize image paths for better maintainability.

The image paths show inconsistency in naming convention:

  • Some use img_v3/XX_name.png
  • Others use just img_v3/name.png
  • Some include additional subdirectories

Consider standardizing the image path structure for better maintainability.

Also applies to: 30-30, 43-43, 49-49, 55-55, 68-68, 75-75


14-78: Consider layout improvements for feature sections.

Based on previous feedback, consider:

  1. Adjusting the spacing between text blocks for better visual flow
  2. Experimenting with alternating image sizes between sections (like gbl.uzh.ch) to create visual interest

80-103: Document future features in a separate tracking system.

Instead of keeping future features commented in the code, consider:

  1. Moving them to a product roadmap or issue tracker
  2. Adding a TODO comment with a reference to the tracking item
🛑 Comments failed to post (7)
apps/docs/src/components/landing/UseCaseOverview.tsx (1)

21-28: 🛠️ Refactor suggestion

Enhance accessibility of the "More Details" link.

The generic "More Details" text might not be descriptive enough for screen readers. Consider including the use case title in the link text.

 <a
   className="inline-flex items-center gap-2"
   href={`/use_cases/${href}`}
+  aria-label={`More details about ${item.title}`}
 >
   <FontAwesomeIcon icon={faArrowRight} />
-  <div>More Details</div>
+  <div>More Details<span className="sr-only"> about {item.title}</span></div>
 </a>

Committable suggestion skipped: line range outside the PR's diff.

apps/docs/src/components/teampage/team.tsx (2)

24-30: 🛠️ Refactor suggestion

Improve image handling and prevent layout shifts.

The current image implementation could benefit from:

  1. Image optimization
  2. Proper error handling
  3. Loading states

Consider using Next.js Image component or implement proper image handling:

 <div className="h-52 overflow-hidden bg-white p-2 pt-3">
-  <img
-    src={item.imgSrc}
-    alt={item.name}
-    className="h-full w-full transform object-contain"
-  />
+  <Image
+    src={item.imgSrc}
+    alt={item.name}
+    width={200}
+    height={200}
+    className="h-full w-full transform object-contain"
+    loading="lazy"
+    onError={(e) => {
+      e.currentTarget.src = '/placeholder-avatar.png'
+    }}
+  />
 </div>

Committable suggestion skipped: line range outside the PR's diff.


9-43: ⚠️ Potential issue

Add accessibility features and improve component robustness.

Several improvements are needed:

  1. Avoid using array index as key in the map function
  2. Add proper ARIA labels and roles
  3. Handle empty states and loading

Apply these changes:

-function Team({ teamMembers }: { teamMembers: TeamMember[] }) {
+function Team({ teamMembers, isLoading }: { teamMembers: TeamMember[], isLoading?: boolean }) {
   return (
-    <section className="pt-12">
+    <section className="pt-12" aria-labelledby="team-heading">
       <div className="container mx-auto">
         <div className="mb-12 text-center">
-          <h2 className="mt-2 text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
+          <h2 id="team-heading" className="mt-2 text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
             Our Team
           </h2>
         </div>
+        {isLoading && <div>Loading team members...</div>}
+        {!isLoading && teamMembers.length === 0 && (
+          <p className="text-center text-gray-600">No team members to display.</p>
+        )}
         <div className="flex flex-wrap justify-center gap-8">
           {teamMembers.map((item, index) => (
             <div
               className="w-16 overflow-hidden rounded-lg shadow-lg sm:w-1/2 md:w-1/3 lg:w-1/4"
-              key={index}
+              key={`${item.name}-${item.position}`}
+              role="article"
+              aria-label={`Team member ${item.name}`}
            >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

function Team({ teamMembers, isLoading }: { teamMembers: TeamMember[], isLoading?: boolean }) {
  return (
    <section className="pt-12" aria-labelledby="team-heading">
      <div className="container mx-auto">
        <div className="mb-12 text-center">
          <h2 id="team-heading" className="mt-2 text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
            Our Team
          </h2>
        </div>
        {isLoading && <div>Loading team members...</div>}
        {!isLoading && teamMembers.length === 0 && (
          <p className="text-center text-gray-600">No team members to display.</p>
        )}
        <div className="flex flex-wrap justify-center gap-8">
          {teamMembers.map((item, index) => (
            <div
              className="w-16 overflow-hidden rounded-lg shadow-lg sm:w-1/2 md:w-1/3 lg:w-1/4"
              key={`${item.name}-${item.position}`}
              role="article"
              aria-label={`Team member ${item.name}`}
            >
              <div className="h-52 overflow-hidden bg-white p-2 pt-3">
                <img
                  src={item.imgSrc}
                  alt={item.name}
                  className="h-full w-full transform object-contain"
                />
              </div>
              <div className="pb-0 pt-2 text-center">
                <h4 className="text-primary mb-2 text-xl font-medium">
                  {item.name}
                </h4>
                <p className="mb-2 text-sm text-gray-600">{item.position}</p>
              </div>
            </div>
          ))}
        </div>
      </div>
    </section>
  )
}
apps/docs/src/components/landing/FeatureFocusSection.tsx (1)

1-6: 🛠️ Refactor suggestion

Improve type safety and documentation of Props interface.

  1. Replace the any type for icon with a more specific type to improve type safety.
  2. Consider adding JSDoc documentation to describe the purpose of each prop.
+/**
+ * Props for the FeatureFocusSection component
+ * @property {string} title - The main title of the section
+ * @property {string} description - The description text below the title
+ * @property {Feature[]} features - Array of features to display
+ * @property {string} [imgSrc] - Optional URL for the section image
+ */
 interface Props {
   title: string
   description: string
-  features: { title: string; icon: any; text: string }[]
+  features: { title: string; icon: React.ReactNode; text: string }[]
   imgSrc?: string
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

/**
 * Props for the FeatureFocusSection component
 * @property {string} title - The main title of the section
 * @property {string} description - The description text below the title
 * @property {Feature[]} features - Array of features to display
 * @property {string} [imgSrc] - Optional URL for the section image
 */
interface Props {
  title: string
  description: string
  features: { title: string; icon: React.ReactNode; text: string }[]
  imgSrc?: string
}
apps/docs/src/components/landing/FeatureSection.tsx (1)

57-63: 🛠️ Refactor suggestion

Enhance image handling and accessibility.

The current image implementation could be improved in several ways:

  1. Add error handling for invalid image URLs
  2. Provide more descriptive alt text
  3. Add loading state handling
 <div className="hidden flex-1 pt-4 sm:block">
   <img
     src={features[hoveredFeatureIx].hoverImage ?? ''}
-    alt="Feature specific screenshot"
+    alt={`Screenshot demonstrating ${features[hoveredFeatureIx].title}`}
+    onError={(e) => {
+      e.currentTarget.src = '/fallback-image.png'
+      console.error(`Failed to load image for feature: ${features[hoveredFeatureIx].title}`)
+    }}
     className="h-auto max-h-[400px] w-full object-contain"
+    loading="lazy"
   />
 </div>

Committable suggestion skipped: line range outside the PR's diff.

apps/docs/src/components/landing/TitleImage.tsx (1)

35-55: 🛠️ Refactor suggestion

Improve accessibility and security attributes.

The logo image needs an alt text for accessibility, and the external link should include security attributes.

- <img className="-ml-2 w-80" src="/img/KlickerLogo.png" />
+ <img className="-ml-2 w-80" src="/img/KlickerLogo.png" alt="KlickerUZH Logo" />

- <a href="https://manage.klicker.uzh.ch" target="_blank">
+ <a href="https://manage.klicker.uzh.ch" target="_blank" rel="noopener noreferrer">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

                <img className="-ml-2 w-80" src="/img/KlickerLogo.png" alt="KlickerUZH Logo" />
                <p className="mt-6 text-2xl leading-8 text-gray-600">
                  Enhance your classroom experience.
                </p>
                <div className="mt-10 flex items-center gap-x-6">
                  <a href="https://manage.klicker.uzh.ch" target="_blank" rel="noopener noreferrer">
                    <Button
                      className={{
                        root: 'border-uzh-blue-40 w-full cursor-pointer text-xl md:w-max',
                      }}
                    >
                      Sign Up / Login
                    </Button>
                  </a>
                  <a
                    href="/getting_started/welcome"
                    className="font-semibold leading-6 text-gray-900"
                  >
                    Get started <span aria-hidden="true">→</span>
                  </a>
                </div>
apps/docs/src/pages/index.tsx (1)

127-142: ⚠️ Potential issue

Security: Remove hardcoded personal image URLs.

The commented Team component contains direct URLs to personal photos on df.uzh.ch. This could lead to:

  1. Privacy concerns if the URLs contain personal information
  2. Broken images if the source URLs change
  3. Potential security risks if the source domain's security policies change

Consider:

  1. Moving images to your project's assets
  2. Using placeholder images during development

…ication_docs

# Conflicts:
#	apps/docs/package.json
#	pnpm-lock.yaml
Copy link

gitguardian bot commented Nov 18, 2024

⚠️ GitGuardian has uncovered 4 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
1509424 Triggered Generic Password 5de5d7c docker-compose.yml View secret
1509424 Triggered Generic Password 5de5d7c util/_restore-prod.sh View secret
1509424 Triggered Generic Password 5de5d7c util/_restore-prod.sh View secret
1509424 Triggered Generic Password 5de5d7c util/_restore-prod.sh View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@rschlaefli rschlaefli merged commit 235b67a into v3 Nov 18, 2024
9 of 10 checks passed
@rschlaefli rschlaefli deleted the gamification_docs branch November 18, 2024 18:03
Copy link

cypress bot commented Nov 18, 2024

klicker-uzh    Run #3685

Run Properties:  status check passed Passed #3685  •  git commit 235b67a89a: enhance(apps/docs): improve and extend landing page content and layout (#4304)
Project klicker-uzh
Branch Review v3
Run status status check passed Passed #3685
Run duration 11m 20s
Commit git commit 235b67a89a: enhance(apps/docs): improve and extend landing page content and layout (#4304)
Committer Chris
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 140
View all changes introduced in this branch ↗︎

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

Successfully merging this pull request may close these issues.

3 participants