Skip to content

Conversation

@hiroshisuga
Copy link
Owner

Problems remained

  • dark mode does not work (show normal mode)
  • tooltip not shown
  • depending on browser and OS, fullscreen in the same monitor does not expand the presentation (if you move to another monitor, it works). If it happens, you click the screen then tldraw realizes and the screen size has changed (but not always...).
  • the above problem is solved. Now zooming (by wheel or by clicking the zoom button) is the only problem remained. -> accidentally fixed(?) by 5726c9e, after the evaporation of cache??? -> solved by replacing requestAnimationFrame and cancelAnimationFrame with those of popup (cc3d507).
  • resize by dragging the resize handles does not work (focus is lost); dom.ts in tldraw causes the problem
  • the global variable HTMLElement is injected with that of popupWindow, fixing the problem above, yet other problems to be expected. -> indeed. We now back up the window.HTMLElement at utils/HTMLElementBackup and use the original value at for instance the chat message scroll (Fix: chat scrolls even with popped up presentation #232).
  • style panel including the color picker does not work well. When mouse-down, the mouse-up event is not caught, behaving as if mouse is kept down when hovered over the button, picking up every color that mouse hover. The reason is in this file: tldraw-alpha30/packages/tldraw/src/lib/ui/components/primitives/ButtonPicker.tsx
  • Fonts are not properly loaded on the popup, e. g., the var(--tl-font-draw) font which is the default on latin languages.
  • Frequent 3006 error from graphql since 3.0.13 or 14 (not happening on 3.0.11)
  • Firefox suffers an error of too much recursion of font measurement when the text font is changed more than twice (or once?). The tldraw files packages/editor/src/lib/editor/managers/TextManager.ts, packages/tldraw/src/lib/shapes/text/TextShapeUtil.tsx, and packages/editor/src/lib/utils/WeakMapCache.ts may account for it. -> fixed by 3113f60
  • slide zoom is not inherited to the popup (perhaps currentPresentationPageRef is initialised in whiteboard/component.jsx: see #23828

Additional features

  • disabled by default, to enable you have to toggle the parameter allowPopupPresentation.
  • on the popup, the hand icon turns red, being more visible in the screen of the real lecture.
  • add Kosugi-Maru font to look a text funnier for the Japanese locale -> Dev3.0.15 use better font #235 (only for popup)

ToDo

  • if the frequent 3006 error disappears. -> still appears on 3.0.15
  • video stop button appears. -> yes it does on 3.0.15

Caution
Tldraw2.0 internally (and implicitly) uses global variables/functions, making some conflicts with popup, including:

  • window.HTMLElement
  • window.requestAnimationFrame
  • window.cancelAnimationFrame

Fix: chat scrolls even with popped up presentation
When the messages are accumulated in the message panel with a user's scroll to above, a button appears to catch the newest message on the bottom . Previously the button did not work due to the global replacement of window.requestAnimationFrame by popup.rAF (and cAF)
I couldn't actually figure out to what these changes affect...
No change observed, so commented out. Leave as comments for a recording purpose.
This fixes the chronic problem of disability of fullscreen of the popup in the main monitor (sub monitor does not have the problem)
Tested window resizing with/without the change, but I didn't see any difference. I leave the change because the video alignment should not be affected by the popup window size.
Keep using the original code, in which window.rAF/cAF (replace with those of popup at presentation/component.jsx) is used.
Backup original rAF/cAF to avoid the bad effects from the globally replaced popup.rAF/cAF.

After the fix of zoom failure in the full-screened popup on the main monitor by hacking the window.requestAnimationFrame/window.cancelAnimationFrame, some of BBB's function including the 'catch the latest chat message' button is found broken. This PR fetches the original window.rAF/cAF and uses them for two BBB components (chat-graphql and video-provider/video-list). The emoji-rain component has left untouched (only leaving commented out codes) because no difference has been observed.
Revert 5b7dc91, because it breaks the shape handling on the main window when the popup is closed.
This was first merged by 0a78781, which nicely fixed the problem of style selector panel (button continue to be pushed. Actually the 'e.target.dispatchEvent(pointerUpEvent)' did not seem necessary even then.
However, this patch has a severe conflict with 2cdebe9 , which globally replace window.HTMLElement with popup.HTMLElement so that resize and rotate handle becomes operatable on the popup (a problem caused by dom.ts of tldraw which internally refers HTMLElement.
A 'Prefer default export on a file with single export' occurred because there is only one export in the file.
By mistake it had been sitting at inside of Fullscreen event listener.
change the name of a constant
See the comment. I force re-rendering of the slide SVG upon the popup window resizing.
Test3017merge
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.

2 participants