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

메인페이지 Skeleton UI 적용 #217

Merged
merged 3 commits into from
Dec 7, 2022
Merged

Conversation

MinHK4
Copy link
Member

@MinHK4 MinHK4 commented Dec 6, 2022

개요

메인 페이지에서 로딩 되는 동안 컴포넌트가 없어서 푸터가 올라오는 문제가 있어서 Skeleton UI를 넣어서 보완하고자 함

변경 사항

  • 뷰어페이지에서 Skeleton UI를 적용했습니다

참고 사항

  • Skeleton UI 레퍼런스
  • 다른 페이지들에서 적용하면 좋을지 그리고 UI가 적합한지 피드백 주시면 감사하겠습니다 : )

스크린샷

Skeleton UI

관련 이슈

@MinHK4 MinHK4 added FE Frontend IMPROVE Improve Code labels Dec 6, 2022
@MinHK4 MinHK4 self-assigned this Dec 6, 2022
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

⚡️ Lighthouse report!

Category Score
🟠 Performance 76
🟢 Accessibility 94
🟢 Best Practices 92
🟢 SEO 97
🔴 PWA 20

Copy link
Member

@doputer doputer left a comment

Choose a reason for hiding this comment

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

UX 개선에 많은 노력을 해주셨네요.

저도 GitHub 로그인 페이지를 개선하고 싶다는 생각을 했는데 스피너를 활용해서 개선해봐야겠습니다.

@@ -12,19 +12,27 @@ export default function Home() {
const { data: newestBookList, execute: getNewestBookList } = useFetch(getOrderedBookListApi);
const { data: popularBookList, execute: getPopularBookList } = useFetch(getOrderedBookListApi);

const [isLoading, setIsLoading] = useState<boolean>(true);
Copy link
Member

Choose a reason for hiding this comment

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

로딩 중인 상태는 useFetch에서 제공해주는 것이 좋겠네요. 내일 중으로 개선해놓겠습니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

그럼 이 부분 제가 수정해서 이번 PR에 담아놓을게요!

Comment on lines +7 to +36
const SkeletonItem = styled.div`
width: 100%;
height: 30px;
background-color: #f2f2f2;
position: relative;
overflow: hidden;
border-radius: 4px;

@keyframes skeleton-gradient {
0% {
background-color: rgba(165, 165, 165, 0.1);
}
50% {
background-color: rgba(165, 165, 165, 0.3);
}
100% {
background-color: rgba(165, 165, 165, 0.1);
}
}

&:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
animation: skeleton-gradient 1.5s infinite ease-in-out;
}
`;
Copy link
Member

Choose a reason for hiding this comment

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

스켈레톤 UI 적용을 위해서 기존의 스타일 컴포넌트와 동일한 컴포넌트가 생성된게 맞을까요? 아니면 대체된거라고 보면 될까요?

스켈레톤에 해당하는 부분만 props로 처리할 수 있는지 같이 고민해보면 좋을 것 같습니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

UX적으로 편안함을 주기 위해서 최대한 유사한 스타일의 컴포넌트를 만들다 보니 복사 한 후 필요한 부분만 남긴거라 동일하다고 보기는 어려울 것 같아요!

개인적으로 props로 처리하면 오히려 원본 컴포넌트에 대한 이해가 낮을 것 같아서 새로운 컴포넌트 대체 방식이 좋을 것 같아요 : )

@MinHK4 MinHK4 merged commit 4530645 into develop Dec 7, 2022
@MinHK4 MinHK4 deleted the feature/skeleton_ui_kmh branch December 7, 2022 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE Frontend IMPROVE Improve Code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[50-2] 메인 페이지 Skeleton UI 적용
3 participants