-
Notifications
You must be signed in to change notification settings - Fork 2
[feat/MAT-272] content-renderer 패키지 개발 #268
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
4a52c35
feat: scaffold @repo/pointer-content-renderer package
sterdsterd 05fd686
feat: implement document, chat, and overview rendering modes
sterdsterd 51ce4c4
feat: add native ContentWebView component and useContentBridge hook
sterdsterd 9fbaf4f
fix: handle hardBreak node type as <br> in serializer
sterdsterd 69544c1
feat: add tab navigation to overview mode, remove scrollToSection/vis…
sterdsterd 89e3100
fix: overview scroll by removing position:fixed, chat auto-scroll onl…
sterdsterd 6cd208a
fix: use sticky-to-bottom intent tracking for chat auto-scroll
sterdsterd a5f40c9
fix: show first pointing divider in chat, fix tab scroll tracking, sp…
sterdsterd a9a304a
refactor: move yes/no buttons inside bubble instead of separate conta…
sterdsterd 2d5c43e
feat(pointer-content-renderer): enhance overview and chat modes
sterdsterd 1b11ffc
fix(pointer-content-renderer): add `bridgeReady` message for WebView-RN
sterdsterd fb43a3a
fix(pointer-content-renderer): add abort signal handling and cleanup
sterdsterd 1201fd4
build(native): support dynamic WebView HTML asset handling
sterdsterd 4136a6e
fix(pointer-content-renderer): handle KaTeX load errors gracefully
sterdsterd 96ed406
fix(pointer-content-renderer): correct document node content structure
sterdsterd c5253ba
feat(pointer-content-renderer): add bookmark icon states and toggle
sterdsterd f1335ec
refactor(pointer-content-renderer): centralize bookmark button state
sterdsterd dc65360
fix(pointer-content-renderer): remove redundant margin-bottom in
sterdsterd 4f43171
fix(pointer-content-renderer): improve bookmark rollback logic to
sterdsterd 5b2de1d
fix(pointer-content-renderer): skip malformed pointings in chat
sterdsterd ecf9a2f
fix(pointer-content-renderer): prevent answer misalignment in chat
sterdsterd a8ad355
fix(pointer-content-renderer): re-inject initMessage on change
sterdsterd da6281a
fix(renderer): add safePositiveInt for attribute validation
sterdsterd 20745af
fix(pointer-content-renderer): add requestId to bookmark handling
sterdsterd 265df3a
feat(pointer-content-renderer): add bookmark state management module
sterdsterd 7fc4f1c
feat(pointer-content-renderer): add chat resume and answer event
sterdsterd 454352c
fix(native): resolve React duplicate instance in monorepo
sterdsterd 6f3d358
style(pointer-content-renderer): fix formatting inconsistencies
sterdsterd e6b67a6
style(native): remove unnecessary trailing commas in metro.config.js
sterdsterd 5fa9339
style(pointer-content-renderer): correct CSS attribute selector quotes
sterdsterd f83bd77
feat(ci): update CI scripts to include pointer-content-renderer
sterdsterd 73d9fb5
fix(pointer-content-renderer): update CSS selector for `.document-mode`
sterdsterd 24a736d
fix(pointer-content-renderer): correct scroll behavior for instant mode
sterdsterd 44894d1
fix(pointer-content-renderer): prevent memory leak in delay function
sterdsterd da7524b
fix(pointer-content-renderer): prevent duplicate message listeners
sterdsterd ddacf93
fix(pointer-content-renderer): update typecheck script for dual configs
sterdsterd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
| dist | ||
| dist-ssr | ||
| *.local | ||
|
|
||
| # Editor directories and files | ||
| .vscode/* | ||
| !.vscode/extensions.json | ||
| .idea | ||
| .DS_Store | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| import { isRNWebView } from '../src/web/bridge'; | ||
| import type { RNToWebViewMessage } from '../src/types'; | ||
|
|
||
| import { | ||
| mockDocumentContent, | ||
| mockChatScenario, | ||
| mockOverviewSections, | ||
| mockAllLeftSections, | ||
| mockAllRightSections, | ||
| mockChatResumeAfterQuestion, | ||
| mockChatResumeAfterFirstPointing, | ||
| mockChatResumeMidSecond, | ||
| mockChatResumeAllComplete, | ||
| } from './mock-data'; | ||
|
|
||
| function sendMockMessage(msg: RNToWebViewMessage): void { | ||
| window.dispatchEvent(new MessageEvent('message', { data: JSON.stringify(msg) })); | ||
| } | ||
|
|
||
| function createDevPanel(): void { | ||
| if (isRNWebView()) return; | ||
|
|
||
| const panel = document.createElement('div'); | ||
| panel.style.cssText = 'position:fixed;bottom:8px;right:8px;z-index:9999;display:flex;gap:6px;'; | ||
|
|
||
| const modes = [ | ||
| { | ||
| label: '문제(document)', | ||
| action: () => | ||
| sendMockMessage({ | ||
| type: 'init', | ||
| mode: 'document', | ||
| content: mockDocumentContent, | ||
| backgroundColor: '#ffffff', | ||
| }), | ||
| }, | ||
| { | ||
| label: '포인팅(chat)', | ||
| action: () => | ||
| sendMockMessage({ | ||
| type: 'init', | ||
| mode: 'chat', | ||
| scenario: mockChatScenario, | ||
| }), | ||
| }, | ||
| { | ||
| label: 'chat resume: Q1 answered', | ||
| action: () => | ||
| sendMockMessage({ | ||
| type: 'init', | ||
| mode: 'chat', | ||
| scenario: mockChatScenario, | ||
| userAnswers: mockChatResumeAfterQuestion, | ||
| }), | ||
| }, | ||
| { | ||
| label: 'chat resume: P1 done', | ||
| action: () => | ||
| sendMockMessage({ | ||
| type: 'init', | ||
| mode: 'chat', | ||
| scenario: mockChatScenario, | ||
| userAnswers: mockChatResumeAfterFirstPointing, | ||
| }), | ||
| }, | ||
| { | ||
| label: 'chat resume: mid P2', | ||
| action: () => | ||
| sendMockMessage({ | ||
| type: 'init', | ||
| mode: 'chat', | ||
| scenario: mockChatScenario, | ||
| userAnswers: mockChatResumeMidSecond, | ||
| }), | ||
| }, | ||
| { | ||
| label: 'chat resume: all done', | ||
| action: () => | ||
| sendMockMessage({ | ||
| type: 'init', | ||
| mode: 'chat', | ||
| scenario: mockChatScenario, | ||
| userAnswers: mockChatResumeAllComplete, | ||
| }), | ||
| }, | ||
| { | ||
| label: '학습 마무리(overview)', | ||
| action: () => | ||
| sendMockMessage({ | ||
| type: 'init', | ||
| mode: 'overview', | ||
| variant: 'summary', | ||
| sections: mockOverviewSections, | ||
| }), | ||
| }, | ||
| { | ||
| label: '포인팅 전체보기 L(overview)', | ||
| action: () => | ||
| sendMockMessage({ | ||
| type: 'init', | ||
| mode: 'overview', | ||
| variant: 'pointing', | ||
| sections: mockAllLeftSections, | ||
| }), | ||
| }, | ||
| { | ||
| label: '포인팅 전체보기 R(overview)', | ||
| action: () => | ||
| sendMockMessage({ | ||
| type: 'init', | ||
| mode: 'overview', | ||
| variant: 'pointing', | ||
| sections: mockAllRightSections, | ||
| }), | ||
| }, | ||
| ] as const; | ||
|
|
||
| for (const mode of modes) { | ||
| const btn = document.createElement('button'); | ||
| btn.textContent = mode.label; | ||
| btn.style.cssText = | ||
| 'padding:6px 12px;border:1px solid #ccc;border-radius:6px;background:#fff;cursor:pointer;font-size:12px;'; | ||
| btn.addEventListener('click', () => { | ||
| const content = document.getElementById('content'); | ||
| if (content) content.innerHTML = ''; | ||
| document.body.className = ''; | ||
| mode.action(); | ||
| }); | ||
| panel.appendChild(btn); | ||
| } | ||
|
|
||
| document.body.appendChild(panel); | ||
| } | ||
|
|
||
| createDevPanel(); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ci:typecheckandci:buildwere changed from filtered runs toturbo run typecheck/turbo buildfor the whole monorepo. This can significantly increase CI time and may run tasks for packages that weren’t previously validated in CI. If the intent is only to include@repo/pointer-content-renderer, consider keeping filters consistent (or document why full-monorepo CI is required).