Skip to content

Conversation

@juhaj77
Copy link
Contributor

@juhaj77 juhaj77 commented Dec 9, 2024

📄 Pull Request Overview

Added HeroDevelopmentPage and its associated HeroMenuAsDropdown, which differs from the HeroNavMenuAsDropdown component, where the routing logic has been replaced with a callback function. The hero selected from the dropdown is set as the state of HeroDevelopmentPage. The component also has states adjusted by the AttributesPricing component. These states control the content displayed within HeroDevelopmentPage.

closes #280

🔧 Changes Made

  1. [Briefly describe changes you made]
    Added initializeHeroGroups hero-specific stat data.
  2. [Any refactoring or clean-up tasks]

Checklist Before Submission

  • Functionality: I have tested my code, and it works as expected.
  • JSDoc: I have added or updated JSDoc comments for all relevant code.
  • Debugging: No console.log() or other debugging statements are left.
  • Clean Code: Removed commented-out or unnecessary code.
  • Tests: Added new tests or updated existing ones for the changes made.
    Removed AttributesPricing.test.tsx. The AttributesPricing component has been modified to adjust external states, making it no longer testable as an isolated unit.
  • Documentation: Documentation has been updated (if applicable).

📝 Additional Information

Provide any additional context or information that reviewers may need to know:

  • Screenshots: [Include any screenshots or videos if the changes affect the UI]
  • Dependencies: [Mention any new dependencies or breaking changes]
  • Known Issues: [List any known issues or limitations]
    Warning: Cannot update a component (HeroDevelopmentPage) while rendering a different component (AttributesPricing3)

heeroKehitys

import darkBlue from '@/shared/assets/images/heros/textBgColors/dark-blue_cropped.webp';
import purpleBg from '@/shared/assets/images/heros/textBgColors/purple.webp';
import { GroupInfo, HeroGroup, HeroSlug } from '../types/hero';
import { statData } from '@/entities/Hero/model/stats/statsDataV2';
Copy link
Member

Choose a reason for hiding this comment

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

should be "@/entities/Hero" according to https://feature-sliced.design/

import { statsPricingData } from '../../model/stats/statsPricingData';
import { AttributePricingHelper } from '../../model/stats/AttributesPricingHelper';
import cls from './AttributesPricing.module.scss';
import { statValue } from '@/entities/Hero/model/stats/statsDataV2';
Copy link
Member

Choose a reason for hiding this comment

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

should be "@/entities/Hero" according to https://feature-sliced.design/

import userEvent from '@testing-library/user-event';
import { useClientTranslation } from '@/shared/i18n';
import { HeroSlug } from '@/entities/Hero';
import HeroMenuAsDropdown from '@/features/NavigateHeroes/ui/HeroMenuAsDropdown';
Copy link
Member

Choose a reason for hiding this comment

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

instead "import HeroMenuAsDropdown from '@/features/NavigateHeroes/ui/HeroMenuAsDropdown';" should be "./HeroMenuAsDropdown"

import cls from './HeroDevelopmentPage.module.scss';
import { HeroManager, AttributesPie } from '@/entities/Hero';
import { HeroWithGroup, HeroSlug, Stat } from '@/entities/Hero/types/hero';
import { BarChart } from '@/entities/Hero/ui/BarChart/BarChart';
Copy link
Member

Choose a reason for hiding this comment

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

should be "@/entities/Hero" according to https://feature-sliced.design/

import Image from 'next/image';
import cls from './HeroDevelopmentPage.module.scss';
import { HeroManager, AttributesPie } from '@/entities/Hero';
import { HeroWithGroup, HeroSlug, Stat } from '@/entities/Hero/types/hero';
Copy link
Member

Choose a reason for hiding this comment

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

should be "@/entities/Hero" according to https://feature-sliced.design/

import { HeroManager, AttributesPie } from '@/entities/Hero';
import { HeroWithGroup, HeroSlug, Stat } from '@/entities/Hero/types/hero';
import { BarChart } from '@/entities/Hero/ui/BarChart/BarChart';
import { color, rarityClassNames } from '@/entities/Hero/model/stats/statsDataV2';
Copy link
Member

Choose a reason for hiding this comment

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

should be "@/entities/Hero" according to https://feature-sliced.design/

import { HeroWithGroup, HeroSlug, Stat } from '@/entities/Hero/types/hero';
import { BarChart } from '@/entities/Hero/ui/BarChart/BarChart';
import { color, rarityClassNames } from '@/entities/Hero/model/stats/statsDataV2';
import { statsPricingData } from '@/entities/Hero/model/stats/statsPricingData';
Copy link
Member

Choose a reason for hiding this comment

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

should be "@/entities/Hero" according to https://feature-sliced.design/

import { useClientTranslation } from '@/shared/i18n';
import useSizes from '@/shared/lib/hooks/useSizes';
import { classNames, Mods } from '@/shared/lib/classNames/classNames';
import { AttributesPricing3 } from '@/entities/Hero/ui/AttributesPricing3/AttributesPricingV3';
Copy link
Member

Choose a reason for hiding this comment

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

should be "@/entities/Hero" according to https://feature-sliced.design/

import useSizes from '@/shared/lib/hooks/useSizes';
import { classNames, Mods } from '@/shared/lib/classNames/classNames';
import { AttributesPricing3 } from '@/entities/Hero/ui/AttributesPricing3/AttributesPricingV3';
import HeroMenuAsDropdown from '@/features/NavigateHeroes/ui/HeroMenuAsDropdown';
Copy link
Member

Choose a reason for hiding this comment

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

should be "@/features/NavigateHeroes" according to https://feature-sliced.design/

@leolabdev leolabdev added this to the Heroes milestone Dec 10, 2024
@juhaj77 juhaj77 requested a review from leolabdev December 12, 2024 16:36
@juhaj77
Copy link
Contributor Author

juhaj77 commented Dec 12, 2024

Screenshot from 2024-12-12 21-56-00
Now it look like this and imports are fixed.

@leolabdev leolabdev merged commit 87eafac into dev Dec 17, 2024
1 check passed
@leolabdev leolabdev deleted the juha/feature/280-add-hero-development-page branch December 17, 2024 10:01
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