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

fix: circular selection with keyboard (#2), #6

Merged
merged 5 commits into from
May 21, 2021
Merged

Conversation

jajugoguma
Copy link
Contributor

Please check if the PR fulfills these requirements

  • It's the right issue type on the title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has a description of the breaking change

Description

as-is
2021-05-18 13-08-28 2021-05-18 13_08_39

to-be
2021-05-18 13-11-48 2021-05-18 13_11_57


Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

@jajugoguma jajugoguma requested a review from lja1018 May 20, 2021 09:04
Comment on lines 273 to 276
index += direction + length;
index %= length;

return index;
Copy link
Member

Choose a reason for hiding this comment

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

return (index + direction + length) % length; 한줄로 줄일 수 있을 것 같네요

Copy link
Member

@jung-han jung-han left a comment

Choose a reason for hiding this comment

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

완료입니다

for (; index < items.length && index >= 0; index += direction) {
index = this.getItemIndex(index, length, direction);

while (index < length && index >= 0) {

Choose a reason for hiding this comment

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

index >= 0 조건이 필요하나요?

Copy link

@jungeun-cho jungeun-cho left a comment

Choose a reason for hiding this comment

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

리뷰완료합니다.

Comment on lines +68 to +69
// 'IE11',
// 'Edge',
Copy link

Choose a reason for hiding this comment

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

주석처리한 이유가 있나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

테스트가 정상 진행되지 않아 주석처리 했습니다.
IE11의 경우 테스트를 수행하고자 하는 흔적(브라우저가 켜져 있는 등)이 있으나 Error response status: 13, UnknownError - An unknown server-side error occurred while processing the command.를 출력하며 테스트가 정상 진행되지 않았습니다.
따라서 주석 처리 후 IE11 상에서 동작 테스트를 대신 진행했습니다.

* @param {number} direction - direction to move
* @return {number}
*/
getItemIndex(index, length, direction) {
Copy link

Choose a reason for hiding this comment

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

public API로 나가는거에요? 그럴만한 메서드가 아닌 것 같아서요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

JSDoc 삭제해서 올리겠습니다!

Copy link

@js87zz js87zz left a comment

Choose a reason for hiding this comment

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

리뷰 완료입니다!

Copy link

@lja1018 lja1018 left a comment

Choose a reason for hiding this comment

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

리뷰완료합니다.

@jajugoguma jajugoguma merged commit 0cfebee into master May 21, 2021
@jajugoguma jajugoguma deleted the fix/selection-loop branch May 21, 2021 07:31
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.

5 participants