Skip to content

Conversation

@cjw783
Copy link
Contributor

@cjw783 cjw783 commented Jun 19, 2025

Details

  • vue2, vue3 빌드 실패 관련하여 index.umd.ts 수정
  • reactive api 문서 업데이트

@cjw783 cjw783 requested review from daybrush and malangfox June 19, 2025 06:25
@cjw783 cjw783 marked this pull request as draft June 19, 2025 07:08
@cjw783 cjw783 marked this pull request as ready for review June 20, 2025 09:44
* Reactive state properties for Flicking
* @ko Flicking의 반응형 상태 속성들
* @interface
* @property {boolean} isReachStart - Whether Flicking has reached the first panel<ko>첫 번째 패널에 도달했는지 여부</ko>
Copy link
Member

Choose a reason for hiding this comment

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

여기 @Property는 안쓰셔도 될거dpdy.

아래에서 쓰고 있어서

Copy link
Contributor Author

Choose a reason for hiding this comment

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

연규님, 이 부분 빼버리면 문서에서 정보가 많이 빠지게 되는데 차라리 이건 유지하고 property에 직접 단 주석을 빼는 건 어떨까요?

@property 유지 시

스크린샷 2025-06-25 오후 4 14 55

@property 삭제 시

스크린샷 2025-06-25 오후 4 11 16

* @property {Flicking | null} flicking - Flicking instance or null<ko>Flicking 인스턴스 또는 null</ko>
*/
export interface FlickingReactiveData {
flicking: Flicking | null;
Copy link
Member

Choose a reason for hiding this comment

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

@Property가 아니라 property에 직접 주석을 달아주세요. 위에 처럼

Comment on lines 179 to 191
const options = getProps().options;

// options를 고려하지 않고 초기값을 설정해도 동작에는 아무런 문제가 없으나, 이 시점의 초기값과 컴포넌트 init 단계에서의 초기값이 다르면 화면 리렌더링이 발생할 수 있으므로
// 이렇게 미리 옵션을 통해서 예측할 수 있는 부분들은 맞춰둔다.
const reactiveObj: FlickingReactiveObject = reactive({
isReachStart: false, // 이 값을 전달 받은 옵션을 이용해서 설정. getProps()를 통해 전달된 옵션을 사용하여 설정할 수 있습니다.
isReachEnd: false, //
totalPanelCount: 0, //
currentPanelIndex: 0, //
progress: 0, //
indexProgress: 0, //
isReachStart: (options?.defaultIndex === 0 && !options.circular),
isReachEnd: false,
totalPanelCount: 0,
currentPanelIndex: options?.defaultIndex ?? 0,
progress: 0,
indexProgress: 0,
moveTo
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@daybrush 님, 전달받은 옵션을 통해서 미리 맞춰둘 수 있는 초기값은 isReachStart, currentPanelIndex 정도인 것 같아서 이 정도로만 일단 작성했습니다.
얘기하신게 이게 맞는지 한번 확인 부탁드리고, 혹시 다른 값들도 미리 맞춰둘 수 있는 게 있다고 보시면 말씀 부탁드립니다.

onInit((inst, data) => {
flicking = data.flicking;
if (flicking === null) return;
if (flicking === undefined) return;
Copy link
Member

Choose a reason for hiding this comment

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

== null

const reactiveObj: FlickingReactiveObject = reactive({
isReachStart: false,
isReachStart: (options?.defaultIndex === 0 && !options.circular),
isReachEnd: false,
Copy link
Member

Choose a reason for hiding this comment

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

totalPanelCount에 대한 options도 있었으면 좋겠습니다.

currentPanelIndex: 0,
currentPanelIndex: options?.defaultIndex ?? 0,
progress: 0,
indexProgress: 0,
Copy link
Member

Choose a reason for hiding this comment

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

indexProgress: options?.defaultIndex ?? 0,

@cjw783 cjw783 merged commit fff9eb1 into naver:master Jun 30, 2025
2 of 3 checks passed
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