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

feat(studio,web): add dosb icons to groups #168

Merged
merged 1 commit into from
Jan 26, 2025
Merged

feat(studio,web): add dosb icons to groups #168

merged 1 commit into from
Jan 26, 2025

Conversation

mheob
Copy link
Owner

@mheob mheob commented Jan 26, 2025

closes #103

Summary by CodeRabbit

Based on the comprehensive summary of changes, here are the release notes:

  • New Features

    • Added comprehensive DOSB sports icons library
    • Expanded group and training time type definitions with more sports and seasonal categories
  • Dependency Updates

    • Renamed shared package from @tsg-irlich-web/shared to @tsgi-web/shared
    • Updated package dependencies and imports across multiple components
    • Removed local utility imports in favor of centralized shared module
  • Type Improvements

    • Updated weekday names from German to English
    • Enhanced icon selection with broader sports category support
    • Added season categorization for training times
  • Chores

    • Refactored import statements across multiple files
    • Updated TypeScript configuration to use React-specific settings

@mheob mheob added enhancement New feature or request frontend Belongs to the Next.js App studio Belongs to the Sanity Studio labels Jan 26, 2025
Copy link

height bot commented Jan 26, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link

vercel bot commented Jan 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsg-irlich-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 26, 2025 5:56am
tsg-irlich-web-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 26, 2025 5:56am

Copy link

coderabbitai bot commented Jan 26, 2025

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/studio/schemas/documents/group.tsx

Oops! Something went wrong! :(

ESLint: 9.14.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@mheob/prettier-config' imported from /prettier.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

Walkthrough

This pull request introduces a comprehensive refactoring and enhancement of the project's shared resources, focusing on icon management, package structure, and utility functions. The changes include renaming the shared package, adding DOSB (Deutscher Olympischer Sportbund) sports icons, updating import paths across multiple components, and consolidating utility functions. The modifications affect both the web and studio applications, introducing more standardized and flexible icon and class name handling.

Changes

File Change Summary
.cspell.json Added words: "Cheerleading", "dosb", "tsgi"
apps/studio/package.json Updated dependency from @tsg-irlich-web/shared to @tsgi-web/shared
apps/studio/schema.json Added season attribute to trainingTime, updated weekday values from German to English
apps/studio/schemas/documents/group.tsx Updated icon import and generation method
apps/web/package.json Added @tsgi-web/shared, removed clsx and tailwind-merge
Multiple web components Replaced cn import from local @/utils/cn to @tsgi-web/shared
packages/shared/package.json Renamed package, updated dependencies and exports
packages/shared/src/icons/dosb.tsx Added comprehensive DOSB sports icons

Assessment against linked issues

Objective Addressed Explanation
Use official Sportdeutschland icons

Possibly related PRs

Suggested labels

dependencies, refactoring

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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

@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.

Actionable comments posted: 0

🧹 Nitpick comments (5)
apps/web/src/components/ui/news-article-preview.tsx (1)

1-1: LGTM! Consider memoizing complex className conditionals.

The import change aligns with the codebase-wide refactoring. However, since the component uses complex className conditionals, consider memoizing them to optimize performance.

+ const articleClassName = useMemo(
+   () => cn('bg-background group flex flex-col rounded-xl shadow-lg', {
+     'md:grid md:grid-cols-2': columns === 2,
+   }),
+   [columns]
+ );

  return (
    <article
-     className={cn('bg-background group flex flex-col rounded-xl shadow-lg', {
-       'md:grid md:grid-cols-2': columns === 2,
-     })}
+     className={articleClassName}
    >
apps/web/src/app/_home/hero.tsx (1)

1-1: LGTM! Consider extracting complex className combinations.

The import change aligns with the codebase-wide refactoring. However, the complex responsive className combinations could be extracted for better readability.

+ const imageClassName = cn(
+   'absolute',
+   'bottom-20 end-[10%] start-[10%] w-[80%]',
+   'md:bottom-10 md:end-auto md:start-1/2 md:w-[40%]',
+   '3xl:bottom-10 3xl:end-auto 3xl:start-1/2 3xl:w-[33%]',
+ );

+ const navClassName = cn(
+   'flex text-white',
+   'w-full items-end justify-around justify-self-end py-10',
+   'md:flex-col md:justify-center md:gap-10',
+ );

  return (
    // ...
    <Image
-     className={cn(
-       'absolute',
-       'bottom-20 end-[10%] start-[10%] w-[80%]',
-       'md:bottom-10 md:end-auto md:start-1/2 md:w-[40%]',
-       '3xl:bottom-10 3xl:end-auto 3xl:start-1/2 3xl:w-[33%]',
-     )}
+     className={imageClassName}
      // ...
    />
    <nav
-     className={cn(
-       'flex text-white',
-       'w-full items-end justify-around justify-self-end py-10',
-       'md:flex-col md:justify-center md:gap-10',
-     )}
+     className={navClassName}
    >
apps/studio/schemas/sections/block-content.ts (1)

45-49: Consider using a more specific type instead of Record<string, any>.

While the current implementation works, using Record<string, any> reduces type safety. Consider creating a specific interface for the value parameter:

interface BlockContentValue {
  blocks: Array<PortableTextTextBlock<PortableTextSpan>>;
}

This would provide better type checking and documentation.

apps/web/src/types/sanity.types.generated.ts (2)

872-889: Consider standardizing sport names to English.

While the DOSB icon integration looks good, there's an inconsistency in language usage. Some sports use German terms (e.g., 'Fussball') while others use English terms (e.g., 'Badminton').

Consider standardizing all sport names to English for consistency:

 icon:
   | 'Badminton'
   | 'Bodenturnen'
   | 'Cheerleading'
   | 'Fitness'
-  | 'Fussball'
+  | 'Football'
   | 'Gymnastik'
   | 'Jujutsu'
   | 'Pilates'
   | 'RopeSkipping'
   | 'SportInGebaeuden'
   | 'Sportakrobatik'
   | 'StepAerobic'
   | 'Taekwondo'
   | 'Tanzen'
   | 'Turnen'
   | 'Wandern'
   | 'Yoga';

1520-1537: Consider using a shared type for DOSB icons.

The icon type is duplicated between Group and HomePageGroupsQueryResult. To improve maintainability, consider extracting it into a shared type.

Example refactor:

export type DosbIconName =
  | 'Badminton'
  | 'Bodenturnen'
  | 'Cheerleading'
  | 'Fitness'
  | 'Fussball'
  | 'Gymnastik'
  | 'Jujutsu'
  | 'Pilates'
  | 'RopeSkipping'
  | 'SportInGebaeuden'
  | 'Sportakrobatik'
  | 'StepAerobic'
  | 'Taekwondo'
  | 'Tanzen'
  | 'Turnen'
  | 'Wandern'
  | 'Yoga';

// Then use it in both types:
export type Group = {
  // ...other properties
  icon: DosbIconName;
};

export type HomePageGroupsQueryResult = Array<{
  title: string;
  icon: DosbIconName;
}>;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4652e2c and 6f95ec8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (42)
  • .cspell.json (2 hunks)
  • apps/studio/package.json (1 hunks)
  • apps/studio/schema.json (2 hunks)
  • apps/studio/schemas/documents/group.tsx (2 hunks)
  • apps/studio/schemas/sections/block-content.ts (1 hunks)
  • apps/web/package.json (1 hunks)
  • apps/web/src/app/_home/group-card.tsx (2 hunks)
  • apps/web/src/app/_home/hero.tsx (1 hunks)
  • apps/web/src/app/_home/testimonial-group.tsx (1 hunks)
  • apps/web/src/app/layout.tsx (1 hunks)
  • apps/web/src/app/news/[category]/[slug]/page.tsx (1 hunks)
  • apps/web/src/components/layout/main-nav/desktop.tsx (1 hunks)
  • apps/web/src/components/layout/main-nav/mobile.tsx (1 hunks)
  • apps/web/src/components/section/contact-persons.tsx (1 hunks)
  • apps/web/src/components/section/hero.tsx (1 hunks)
  • apps/web/src/components/section/newsletter.tsx (1 hunks)
  • apps/web/src/components/ui/arrow-button-group.tsx (1 hunks)
  • apps/web/src/components/ui/badge.tsx (1 hunks)
  • apps/web/src/components/ui/breadcrumb.tsx (1 hunks)
  • apps/web/src/components/ui/button.tsx (1 hunks)
  • apps/web/src/components/ui/card.tsx (1 hunks)
  • apps/web/src/components/ui/contact-persons.tsx (1 hunks)
  • apps/web/src/components/ui/counter.tsx (1 hunks)
  • apps/web/src/components/ui/drawer.tsx (1 hunks)
  • apps/web/src/components/ui/form.tsx (1 hunks)
  • apps/web/src/components/ui/input.tsx (1 hunks)
  • apps/web/src/components/ui/label.tsx (1 hunks)
  • apps/web/src/components/ui/navigation-menu.tsx (1 hunks)
  • apps/web/src/components/ui/news-article-preview.tsx (1 hunks)
  • apps/web/src/components/ui/pricing-card.tsx (1 hunks)
  • apps/web/src/components/ui/section-header.tsx (1 hunks)
  • apps/web/src/components/ui/select.tsx (1 hunks)
  • apps/web/src/components/ui/separator.tsx (1 hunks)
  • apps/web/src/components/ui/textarea.tsx (1 hunks)
  • apps/web/src/types/sanity.types.generated.ts (3 hunks)
  • packages/shared/package.json (1 hunks)
  • packages/shared/src/env.ts (0 hunks)
  • packages/shared/src/icons/dosb.tsx (1 hunks)
  • packages/shared/src/icons/index.ts (1 hunks)
  • packages/shared/src/index.ts (1 hunks)
  • packages/shared/src/utils/index.ts (1 hunks)
  • packages/shared/tsconfig.json (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/shared/src/env.ts
✅ Files skipped from review due to trivial changes (19)
  • apps/web/src/components/ui/section-header.tsx
  • apps/web/src/components/ui/textarea.tsx
  • packages/shared/src/utils/index.ts
  • apps/web/src/components/ui/counter.tsx
  • apps/web/src/components/ui/separator.tsx
  • packages/shared/src/icons/index.ts
  • apps/web/src/components/ui/breadcrumb.tsx
  • apps/web/src/components/layout/main-nav/desktop.tsx
  • apps/web/src/components/layout/main-nav/mobile.tsx
  • apps/web/src/components/ui/navigation-menu.tsx
  • apps/web/src/app/news/[category]/[slug]/page.tsx
  • packages/shared/src/index.ts
  • apps/web/src/components/ui/badge.tsx
  • apps/web/src/components/ui/button.tsx
  • apps/web/src/components/ui/form.tsx
  • apps/web/src/components/section/hero.tsx
  • apps/web/src/components/ui/select.tsx
  • apps/web/src/components/ui/drawer.tsx
  • apps/web/src/components/ui/pricing-card.tsx
🔇 Additional comments (27)
apps/web/src/components/ui/label.tsx (1)

4-4: LGTM: Import migration looks good.

The change to import cn from the shared library is consistent with the refactoring objectives.

apps/web/src/components/section/contact-persons.tsx (1)

1-2: LGTM: Clean import change with improved formatting.

The import migration and added spacing improve code organization while maintaining functionality.

apps/web/src/app/layout.tsx (1)

1-1: LGTM: Root layout import updated correctly.

The shared library import change is properly implemented in this critical layout component.

apps/web/src/components/section/newsletter.tsx (2)

1-1: LGTM: Import migration completed successfully.

The shared library import change is consistent with the project-wide refactoring.


Line range hint 27-41: Consider enhancing form security and validation.

The newsletter form submission could benefit from additional security measures and validation:

  1. Add CSRF protection token
  2. Implement client-side email validation
  3. Add error handling for failed submissions

Example implementation:

 <form
   className="z-1 max-w-(--breakpoint-sm) relative mt-16 flex items-center justify-between gap-2 rounded-md bg-white px-2 pb-2 shadow-xl md:mx-auto md:gap-6 md:px-6"
   method="post"
+  onSubmit={handleSubmit}
 >
+  <input type="hidden" name="csrf_token" value={csrf_token} />
   <label
     aria-label="E-Mail"
     className="text-primary sr-only md:not-sr-only"
     htmlFor="email"
   >
     <AtSign />
   </label>

   <Input
     className="flex-1 bg-transparent p-4 text-sm md:text-lg"
     id="email"
     name="email"
     placeholder="[email protected]"
     type="email"
+    required
+    pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$"
   />

   <Button type="submit">Abonnieren</Button>
+  {error && <p className="text-red-500">{error}</p>}
 </form>
✅ Verification successful

Security enhancements are indeed needed for the newsletter form

The review comment is accurate. The current implementation lacks:

  • CSRF protection
  • Proper form validation beyond basic HTML5 email type
  • Error handling for failed submissions

The suggested implementation aligns well with the codebase's patterns and would improve the form's security and user experience.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash

# Find the complete newsletter component implementation
ast-grep --pattern 'export $_ function Newsletter() {
  $$$
}'

# Look for any form submission handlers in the newsletter component
ast-grep --pattern 'function handleSubmit($$$) {
  $$$
}'

# Search for CSRF-related code
rg -i "csrf" --type ts --type tsx

# Look for existing form validation patterns
rg -i "validation|validate" --type ts --type tsx

Length of output: 265


Script:

#!/bin/bash

# Find the complete newsletter component implementation
cat apps/web/src/components/section/newsletter.tsx

# Search for CSRF-related code in the codebase
rg -i "csrf"

# Look for form validation patterns
rg -i "validation|validate"

# Search for form submission handling
rg -i "onSubmit|handleSubmit" apps/web/src/components/section/

Length of output: 13524

apps/web/src/components/ui/input.tsx (1)

1-1: LGTM! Verify shared package implementation.

The import change aligns with the codebase-wide refactoring to use shared utilities. However, let's verify the shared package implementation.

✅ Verification successful

✓ Shared package implementation verified

The cn utility in @tsgi-web/shared is correctly implemented using clsx and tailwind-merge, following best practices for className management in React+Tailwind projects. The import change is safe to use.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the shared package implementation of the cn utility
# Expected: The implementation should be equivalent to the original

# Check if the shared package exists and contains the cn utility
rg -p "export.*function cn\(" packages/shared/

Length of output: 129


Script:

#!/bin/bash
# Get the complete implementation of cn utility from shared package
echo "=== Shared package implementation ==="
cat packages/shared/src/utils/cn.ts

# Search for any previous implementations of cn utility
echo -e "\n=== Previous implementations ==="
rg -p "function cn\(" --type ts

Length of output: 985

apps/web/src/components/ui/card.tsx (1)

1-1: LGTM! Import change is consistent.

The import change aligns with the codebase-wide refactoring and maintains functionality across all card subcomponents.

apps/web/src/app/_home/hero.tsx (1)

1-1: Verify alignment with PR objectives.

The changes show a refactoring of the cn utility to a shared package, but the PR objective mentions adding DOSB icons to groups. Please clarify if there are additional changes pending or if the PR description needs to be updated.

✅ Verification successful

Changes align with PR objectives

The PR includes both the cn utility refactoring and DOSB icon implementation (packages/shared/src/icons/dosb.tsx), suggesting these changes are part of a broader shared package organization effort. The original concern about misalignment is resolved.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for DOSB icon-related changes
# Expected: Find evidence of DOSB icon additions

# Look for DOSB-related files or changes
rg -i "dosb|deutscher olympischer sportbund" --type ts --type tsx

# Look for icon-related changes
rg -p "import.*icons?.*dosb" --type ts --type tsx

Length of output: 175


Script:

#!/bin/bash
# Get PR description and title
gh pr view --json title,body

# Search for DOSB/icon related changes with correct file types
rg -t typescript -t javascriptreact -t typescriptreact -i "dosb|deutscher olympischer sportbund"

# Look for icon-related changes
rg -t typescript -t javascriptreact -t typescriptreact "import.*[\"'].*icons?.*dosb"

# Check for any new icon components or SVG files
fd -e svg -e tsx -e ts "dosb|icon" -I

Length of output: 544

apps/web/src/components/ui/arrow-button-group.tsx (1)

2-2: LGTM! Import update aligns with codebase standardization.

The change to import cn from @tsgi-web/shared is consistent with the broader refactoring effort to standardize utility functions.

apps/web/src/components/ui/contact-persons.tsx (1)

3-3: LGTM! Import update maintains consistency.

The update to import cn from @tsgi-web/shared aligns with the standardization of utility functions across the codebase.

apps/web/src/app/_home/testimonial-group.tsx (1)

3-3: LGTM! Import update completes the standardization pattern.

The update to import cn from @tsgi-web/shared maintains consistency with the codebase-wide standardization of utility functions.

Let's verify that all components have been updated to use the shared package:

✅ Verification successful

Import migration verification successful ✓

All components, including testimonial-group.tsx, are correctly using the standardized import from '@tsgi-web/shared'. No instances of the old import pattern remain in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that no components are still using the old import path
# Test: Search for any remaining imports from @/utils/cn
# Expect: No results, indicating complete migration

rg "from '@/utils/cn'" --type ts --type tsx

Length of output: 79


Script:

#!/bin/bash
# Search for any remaining imports from old path with various quote styles
rg "from ['\"]@/utils/cn['\"]" --type typescript --type-add 'typescript:*.{ts,tsx}'

# Also check for direct imports of the file
rg "from ['\"]@/utils/cn\.ts['\"]" --type typescript --type-add 'typescript:*.{ts,tsx}'

# Check current pattern usage for context
rg "from ['\"]@tsgi-web/shared['\"]" --type typescript --type-add 'typescript:*.{ts,tsx}'

Length of output: 2663

apps/web/src/app/_home/group-card.tsx (2)

1-1: LGTM! Props interface changes improve type safety.

The change from string to DosbIconName for the icon prop provides better type checking and ensures only valid DOSB icons can be used.

Also applies to: 5-9


17-19: LGTM! Icon rendering implementation looks good.

The icon is properly rendered using the DOSBIcon component with appropriate sizing and styling classes.

apps/studio/schemas/documents/group.tsx (2)

1-1: LGTM! Icon options implementation is clean and maintainable.

Using DOSB_ICONS.map() to generate the options list is a good approach that ensures consistency and maintainability.

Also applies to: 74-74


62-70: LGTM! Clear and helpful description for users.

The description provides a good reference to the DOSB pictograms and clear instructions for users when they need additional icons.

packages/shared/src/icons/dosb.tsx (3)

5-24: LGTM! Well-structured icon name definitions.

The DOSB_ICONS constant provides a centralized list of available icons with proper TypeScript const assertions for type safety.


26-62: LGTM! DOSBIcon component implementation is clean and reusable.

The component:

  • Properly extends SVG props
  • Uses proper SVG attributes
  • Implements consistent sizing and styling
  • Uses currentColor for theming flexibility

64-431: LGTM! Icon implementations follow SVG best practices.

The individual icon components:

  • Use consistent fill and fillRule attributes
  • Properly handle paths and groups
  • Follow accessibility best practices
packages/shared/tsconfig.json (1)

2-5: Improved TypeScript configuration for React development.

Good improvements:

  1. Using React-specific TypeScript configuration
  2. Added path alias for cleaner imports

Let's verify the path alias usage:

✅ Verification successful

Path alias "@/*" is correctly configured and actively used

The path alias is properly configured and extensively used throughout the codebase for clean and consistent imports.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the path alias is being used correctly
# Test: Search for @/* imports
rg "from ['|\"]@/"

Length of output: 24954

packages/shared/package.json (2)

2-2: Package renamed and exports configured correctly.

Good improvements:

  1. More concise package name
  2. Explicit root export configuration

Also applies to: 9-9


16-19: Added essential React dependencies and utilities.

The added dependencies align with React development needs and include utilities for class name handling.

Let's verify the dependency versions and usage:

Also applies to: 24-25

✅ Verification successful

Dependencies are properly integrated and utilized

The dependencies are correctly configured and actively used throughout the codebase. The utilities (clsx, tailwind-merge) are properly combined in a utility function, and React is extensively used in component implementations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check dependency versions and usage
# Test 1: Check if clsx and tailwind-merge are used together
rg "import.*(?:clsx|tailwind-merge)"

# Test 2: Verify React usage
rg "import.*(?:react|react-dom)"

Length of output: 11238

apps/studio/package.json (1)

19-19: Updated shared package dependency name.

The dependency has been correctly updated to use the new package name.

Let's verify the dependency update across the workspace:

✅ Verification successful

Dependency update verification complete

The new package name @tsgi-web/shared is consistently used across the workspace with no remaining references to the old package name.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining old package references
# Test: Search for old package name references
rg "@tsg-irlich-web/shared"

Length of output: 27


Script:

#!/bin/bash
# Search for new package name references
echo "=== Searching for new package name ==="
rg "@tsgi-web/shared"

echo -e "\n=== Checking package.json files ==="
fd package.json --exec cat {}

echo -e "\n=== Checking import/require statements ==="
ast-grep --pattern 'import $_ from "@tsgi-web/shared"'
ast-grep --pattern 'require("@tsgi-web/shared")'

Length of output: 7134

.cspell.json (1)

30-30: LGTM: Dictionary additions align with DOSB icons integration

The new words "Cheerleading", "dosb", and "tsgi" are appropriate additions to support the DOSB icons feature and maintain consistent spelling across the codebase.

Also applies to: 34-34, 81-81

apps/web/package.json (1)

26-26: LGTM: Workspace dependency properly configured

The addition of @tsgi-web/shared as a workspace dependency is correctly configured and aligns with the package structure changes.

apps/studio/schema.json (2)

605-625: LGTM: Well-structured season field addition

The new season field in trainingTime type is well-designed with appropriate values ("yearly", "summer", "winter") and is correctly marked as required.


5007-5071: LGTM: Comprehensive DOSB icons integration

The addition of DOSB sport icons provides a comprehensive list of supported sports activities, properly formatted as string enum values. The list includes common sports and activities like Badminton, Cheerleading, Fitness, etc.

apps/web/src/types/sanity.types.generated.ts (1)

123-124: LGTM! Improved type definitions for TrainingTime.

The changes enhance the type definitions by:

  • Adding season support ('yearly' | 'summer' | 'winter')
  • Switching to English weekday values for better internationalization

@kodiakhq kodiakhq bot merged commit 87872d9 into main Jan 26, 2025
11 checks passed
@kodiakhq kodiakhq bot deleted the 103-dosb-icons branch January 26, 2025 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Belongs to the Next.js App studio Belongs to the Sanity Studio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icons für die Gruppen in Sanity anlegen und definieren
1 participant