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(S1): 미연결 페이지를 연결 후 UI 업데이트 #89

Closed
dusunax opened this issue Aug 19, 2024 · 1 comment · Fixed by #98
Closed

fix(S1): 미연결 페이지를 연결 후 UI 업데이트 #89

dusunax opened this issue Aug 19, 2024 · 1 comment · Fixed by #98
Assignees
Labels
bug Something isn't working

Comments

@dusunax
Copy link
Contributor

dusunax commented Aug 19, 2024

아무 선택지에도 연결되지 않은 페이지를 새롭게 연결했을 때, 더 이상 미연결 페이지가 아니라 연결된 페이지로 표시되어야 합니다.

  • 선택지를 업데이트 했을 때, 페이지 데이터의 업데이트가 필요합니다.

업데이트 조건 선택

  1. 선택지를 추가/수정할 때마다 업데이트
  2. 선택지를 추가/수정할 때, 미연결 페이지에 연결하는 경우를 확인하여 업데이트

업데이트 방식 선택

  1. 페이지 데이터를 리패칭하여 업데이트한다.
  2. 요청이 성공했다면 페이지가 연결되었다는 것이므로, 상태를 업데이트하고 리패칭하지 않는다.
  3. 낙관적으로 상태를 변경하고, 리패칭하여 업데이트한다.
@dusunax dusunax added the bug Something isn't working label Aug 19, 2024
@dusunax dusunax self-assigned this Aug 22, 2024
@dusunax
Copy link
Contributor Author

dusunax commented Aug 22, 2024

상세

수정 대상

  • GameBuilderContent.tsxhandleFixChoice의 코드를 수정한다.
  • toPageId에 해당하는 페이지의 정보를 업데이트 한다.

업데이트 조건

  • 선택지를 추가/수정할 때마다 업데이트
  • 로직을 단순화할 것 /

업데이트 방식

  • 페이지 데이터를 리패칭하여 업데이트한다. (게임 전체)
  • 이유: depth를 클라이언트 로직에서 설정하지 않기 때문에, 페이지 데이터를 새로 받아서 새로 연결된 페이지의 depth를 확인해야 합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant