Skip to content

Conversation

@seoyoonyi
Copy link
Contributor

@seoyoonyi seoyoonyi commented Nov 17, 2024

🚀 풀 리퀘스트 제안

closes #120

📋 작업 내용

  • 기본 스타일링으로 돌아가는 문제를 방지하기 위해 border: none; 대신 border: 0;로 변경했습니다.
    border: none;은 border-width가 기본값(medium)으로 남아 있는 문제가 발생할 수 있으므로 이를 방지하기 위해 border: 0;을 사용하여 border-width: 0으로 명시적으로 설정했습니다.

  • !important 사용을 제거했고, 이를 대체하기 위해 두 가지 방법을 적용했습니다.

    • 클래스 우선순위를 높임: className을 별도로 정의하여 우선순위를 높이는 방식으로 해결
    • 선택자 재정의: 동일한 선택자를 사용하여 기존 스타일을 덮어쓰는 방식으로 처리
  • 마이페이지 들어가시면 테스트용 코드 볼수 있습니다.

🔧 변경 사항

  • 📃 README.md
  • 📦 package.json
  • 🔥 파일 삭제
  • 🧹 그 외 ex) .gitignore 등

주요 변경 사항을 요약해 주세요.

📸 스크린샷 (선택 사항)

image

📄 기타

추가적으로 전달하고 싶은 내용이나 특별한 요구 사항이 있으면 작성해 주세요.

Sourcery에 의한 요약

기본 스타일링 문제를 방지하기 위해 'border: none;'을 'border: 0;'으로 교체하여 border-width가 명시적으로 0으로 설정되도록 CSS 스타일을 리팩토링합니다. 스타일에서 '!important'를 제거하고 클래스 우선순위와 선택자 재정의를 조정하여 의도한 스타일링을 유지합니다. 테스트 목적으로 TraderMyPage에 테스트 컴포넌트를 추가합니다.

향상된 기능:

  • 기본 스타일링 문제를 방지하고 border-width를 명시적으로 0으로 설정하기 위해 'border: none;'을 'border: 0;'으로 교체합니다.
  • 스타일에서 '!important'를 제거하고 클래스 우선순위와 선택자 재정의를 조정하여 의도한 스타일링을 유지합니다.

테스트:

  • 테스트 목적으로 TraderMyPage에 테스트 컴포넌트 InputTestPage와 PaginationTestPage를 추가합니다.
Original summary in English

Summary by Sourcery

Refactor CSS styles by replacing 'border: none;' with 'border: 0;' to ensure border-width is explicitly set to 0, preventing default styling issues. Remove '!important' from styles and adjust class priorities and selector overrides to maintain intended styling. Add test components to TraderMyPage for testing purposes.

Enhancements:

  • Replace 'border: none;' with 'border: 0;' to explicitly set border-width to 0 and prevent default styling issues.
  • Remove '!important' from styles and adjust class priorities and selector overrides to maintain intended styling.

Tests:

  • Add test components InputTestPage and PaginationTestPage to TraderMyPage for testing purposes.

@seoyoonyi seoyoonyi added the 🔨 Refactor 코드 리팩토링 label Nov 17, 2024
@seoyoonyi seoyoonyi self-assigned this Nov 17, 2024
@sourcery-ai
Copy link

sourcery-ai bot commented Nov 17, 2024

리뷰어 가이드 by Sourcery

이 PR은 두 가지 주요 리팩토링 변경 사항을 구현합니다: 더 나은 브라우저 호환성을 위해 border: noneborder: 0으로 대체하고, 대체 CSS 특이성 접근 방식을 사용하여 !important 선언을 제거합니다. 이러한 변경 사항은 여러 구성 요소에 걸친 CSS 수정으로 구현되며, 코드 품질을 개선하면서 동일한 시각적 외관을 유지하는 데 중점을 둡니다.

CSS 리팩토링 변경 사항에 대한 클래스 다이어그램

classDiagram
    class Input {
        +border: 0
        +border-color: theme.colors.main.alert
    }
    class Pagination {
        +className: active
        +background-color: theme.colors.teal[50]
        +color: theme.colors.teal[600]
    }
    class VerificationInput {
        +border-color: theme.colors.gray[300]
    }
    class StrategyTitleSection {
        +border: 0
    }
    class StatisticsTable {
        +border: 0
    }
    class Button {
        +border: 0
    }
    class Terms {
        +list-style-type: disc
        +margin-left: 16px
    }
Loading

파일 수준 변경 사항

변경 사항 세부 사항 파일
기본 테두리 너비 문제를 방지하기 위해 border: noneborder: 0으로 대체
  • 버튼 구성 요소의 테두리 속성 변경
  • 테이블 및 행 테두리 속성 업데이트
  • 아이콘 버튼 스타일 수정
src/components/common/Button.tsx
src/components/page/strategy-detail/StrategyTitleSection.tsx
src/components/page/strategy-detail/tabmenu/StatisticsTable.tsx
src/components/common/Input.tsx
CSS 특이성을 개선하여 !important 선언 제거
  • 클래스 기반 선택자로 활성 버튼 스타일 대체
  • 입력 오류 처리를 위한 특정 호버 및 포커스 상태 추가
  • 직접 선택자를 사용하여 목록 스타일 업데이트
  • 상태 관리를 위한 의사 클래스 선택자 구현
src/components/common/Pagination.tsx
src/components/common/Input.tsx
src/components/page/signup/VerificationInput.tsx
src/components/terms/style.ts
검증을 위한 트레이더 마이 페이지에 테스트 페이지 추가
  • InputTestPage 구성 요소 추가
  • PaginationTestPage 구성 요소 추가
src/pages/mypage/trader/TraderMyPage.tsx

연결된 문제에 대한 평가

문제 목표 해결됨 설명
#120 기본 테두리 너비 문제를 방지하기 위해 'border: none'을 'border: 0'으로 대체
#120 CSS 스타일에서 '!important' 선언 제거

잠재적으로 연결된 문제


팁 및 명령어

Sourcery와 상호작용하기

  • 새 리뷰 트리거: 풀 리퀘스트에 @sourcery-ai review라고 댓글을 남깁니다.
  • 토론 계속하기: Sourcery의 리뷰 댓글에 직접 답장합니다.
  • 리뷰 댓글에서 GitHub 이슈 생성: 리뷰 댓글에 답장하여 Sourcery에게 이슈 생성을 요청합니다.
  • 풀 리퀘스트 제목 생성: 풀 리퀘스트 제목 어디에나 @sourcery-ai를 작성하여 언제든지 제목을 생성합니다.
  • 풀 리퀘스트 요약 생성: 풀 리퀘스트 본문 어디에나 @sourcery-ai summary를 작성하여 언제든지 PR 요약을 생성합니다. 이 명령을 사용하여 요약이 삽입될 위치를 지정할 수도 있습니다.

경험 맞춤화

대시보드에 액세스하여:

  • Sourcery가 생성한 풀 리퀘스트 요약, 리뷰어 가이드 등과 같은 리뷰 기능을 활성화하거나 비활성화합니다.
  • 리뷰 언어를 변경합니다.
  • 사용자 정의 리뷰 지침을 추가, 제거 또는 편집합니다.
  • 기타 리뷰 설정을 조정합니다.

도움 받기

  • 질문이나 피드백이 있는 경우 지원 팀에 문의하십시오.
  • 자세한 가이드와 정보를 보려면 문서를 방문하십시오.
  • X/Twitter, LinkedIn 또는 GitHub에서 Sourcery 팀을 팔로우하여 소식을 받아보세요.
Original review guide in English

Reviewer's Guide by Sourcery

This PR implements two main refactoring changes: replacing border: none with border: 0 for better browser compatibility, and removing !important declarations by using alternative CSS specificity approaches. The changes are implemented through CSS modifications across multiple components, focusing on maintaining the same visual appearance while improving code quality.

Class diagram for CSS refactoring changes

classDiagram
    class Input {
        +border: 0
        +border-color: theme.colors.main.alert
    }
    class Pagination {
        +className: active
        +background-color: theme.colors.teal[50]
        +color: theme.colors.teal[600]
    }
    class VerificationInput {
        +border-color: theme.colors.gray[300]
    }
    class StrategyTitleSection {
        +border: 0
    }
    class StatisticsTable {
        +border: 0
    }
    class Button {
        +border: 0
    }
    class Terms {
        +list-style-type: disc
        +margin-left: 16px
    }
Loading

File-Level Changes

Change Details Files
Replace border: none with border: 0 to prevent default border-width issues
  • Changed border property in button components
  • Updated table and row border properties
  • Modified icon button styles
src/components/common/Button.tsx
src/components/page/strategy-detail/StrategyTitleSection.tsx
src/components/page/strategy-detail/tabmenu/StatisticsTable.tsx
src/components/common/Input.tsx
Remove !important declarations by improving CSS specificity
  • Replaced active button styles with class-based selectors
  • Added specific hover and focus states for input error handling
  • Updated list styles to use direct selectors
  • Implemented pseudo-class selectors for state management
src/components/common/Pagination.tsx
src/components/common/Input.tsx
src/components/page/signup/VerificationInput.tsx
src/components/terms/style.ts
Add test pages to trader my page for verification
  • Added InputTestPage component
  • Added PaginationTestPage component
src/pages/mypage/trader/TraderMyPage.tsx

Assessment against linked issues

Issue Objective Addressed Explanation
#120 Replace 'border: none' with 'border: 0' to prevent default border-width issues
#120 Remove '!important' declarations from CSS styles

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions
Copy link

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

안녕하세요 @seoyoonyi - 변경 사항을 검토한 결과 해결해야 할 몇 가지 문제가 발견되었습니다.

차단 문제:

  • 프로덕션 컴포넌트에서 테스트 페이지 제거 (링크)
검토 중에 확인한 내용
  • 🟢 일반 문제: 모두 양호
  • 🔴 보안: 차단 문제 1개
  • 🟢 테스트: 모두 양호
  • 🟢 복잡성: 모두 양호
  • 🟢 문서화: 모두 양호

Sourcery는 오픈 소스에 무료입니다 - 리뷰가 마음에 드셨다면 공유를 고려해 주세요 ✨
더 유용하게 도와주세요! 각 댓글에 👍 또는 👎를 클릭해 주시면 피드백을 사용하여 리뷰를 개선하겠습니다.
Original comment in English

Hey @seoyoonyi - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Remove test pages from production component (link)
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🔴 Security: 1 blocking issue
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

<div>
<h1>나의 전략 리스트</h1>
<p>트레이더가 마이페이지로 이동했을 때 나타나는 페이지입니다.</p>
<InputTestPage />
Copy link

Choose a reason for hiding this comment

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

🚨 issue (security): 프로덕션 컴포넌트에서 테스트 페이지 제거

테스트 페이지는 테스트 유틸리티가 최종 사용자에게 노출될 수 있으므로 프로덕션 컴포넌트에 포함되어서는 안 됩니다.

Original comment in English

🚨 issue (security): Remove test pages from production component

Test pages should not be included in production components as they may expose testing utilities to end users.

Copy link
Contributor

@ssuminii ssuminii left a comment

Choose a reason for hiding this comment

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

border: none; 처리해도 border-width가 기본값(medium)으로 남아 있을 수 있는걸 첨알았네요.. 감사합니다 승인완료 !! 💗

Copy link
Contributor

@jizerozz jizerozz left a comment

Choose a reason for hiding this comment

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

히익 .. 급하게 한다고 확인을 제대로 못했네요 ㅠㅠㅠㅠ 수정해주셔서 감사합니다...

@seoyoonyi seoyoonyi merged commit fcc23fe into develop Nov 17, 2024
3 checks passed
@seoyoonyi seoyoonyi deleted the fix/border-none-remove-#120 branch November 17, 2024 15:28
@Panda-raccoon
Copy link
Contributor

감사합니다ㅜㅜ

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

Labels

🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants