Support the 0.1.x plugin SDK and fix the pinned window anchor (BigBlueButton 4.0) - #10
Support the 0.1.x plugin SDK and fix the pinned window anchor (BigBlueButton 4.0)#10imdt-claudiop wants to merge 3 commits into
Conversation
…ton 4.0) Pin the build to the SDK that BigBlueButton 4.0 currently ships (0.1.26) and widen requiredSdkVersion to ^0.1.2, so the plugin also loads on 4.0 servers running an earlier 0.1.x SDK instead of being rejected at load time. Co-Authored-By: Guilherme Leme <leme.guilherme.p@gmail.com>
The window looked for '#chat-list-0', which no longer exists in BigBlueButton 4.0 (that id now belongs to a private chat item). The lookup returned null and the window fell back to its default position at the top left corner, overlapping the left navigation rail and the chat header. Use '#chat-list', which is present in both 3.0 and 4.0, so the window is placed next to the chat panel as intended. Co-Authored-By: Guilherme Leme <leme.guilherme.p@gmail.com>
The ts-code-compilation check runs `npx tsc`, which also typechecks the
declaration files shipped by our dependencies. On this branch the check is
red purely because of broken typings inside node_modules, never because of
a source file in this repository:
node_modules/react-markdown/lib/ast-to-react.d.ts (TS1259)
node_modules/react-markdown/lib/react-markdown.d.ts (TS1259)
Both errors reproduce on v0.1.x with no change from this pull request
applied, so they are pre-existing repository debt and not a regression
introduced here.
Turning on skipLibCheck keeps full typechecking of src while skipping the
declaration files of third-party packages. Three sibling plugins already
ship this option for the same reason: bbb-plugin-generic-link-share,
bbb-plugin-h5p and bbb-plugin-session-share.
The bundle produced by `npm run build-bundle` is byte for byte identical
before and after this change, so runtime behaviour is untouched.
Co-Authored-By: Guilherme Leme <leme.guilherme.p@gmail.com>
|
Pushed a small The gate runs
|
Why
BigBlueButton 4.0 ships version 0.1.26 of the plugin SDK. The server compares that
version against the
requiredSdkVersiondeclared in the plugin manifest and refuses toload anything that does not match, so on a 4.0 server this plugin is rejected before its
bundle is ever fetched:
This is the
v0.1.xline, which is the one that targets the 0.1.x SDK, so this makes the plugin load and work on BigBlueButton 4.0.What changed
manifest.json:requiredSdkVersionfrom~0.0.59to^0.1.2package.jsonandpackage-lock.json:bigbluebutton-html-plugin-sdkfrom0.0.73to0.1.26src/plugin-test/component.tsx: the floating window looked for#chat-list-0to position itself. That id does not exist in 4.0 any more (it now belongs to a private chat item), so the lookup returned null and the window fell back to its default corner position, on top of the left navigation rail and the chat header. It now looks for#chat-list, which exists in both 3.0 and 4.0.The plugin version itself was deliberately left alone. It is cut by the
publish-tagworkflow, which also updatespackage.jsonandpackage-lock.json, so it belongs to the release process rather than to this change.How to test
manifest.jsonanddist/BbbPluginPinMessage.jsfrom a URL the BigBlueButton server can reach. They have to sit next to each other, sincejavascriptEntrypointUrlis relative.Pin this message. The floating window appears next to the chat panel.bbb_graphqldatabase:loadFailureReasonmust be empty for this plugin.Validation
Checked against a BigBlueButton 4.0 server built from source on
v4.0.x-developat commit 93bc4864ab, shipping plugin SDK 0.1.24, with the plugin attached per meeting:npm run lintruns clean locally.npx tscstill reports the pre existing errors described in the notes below, which the base branch reports as wellloadFailureReasonand the client reports no page errorBefore and after, same server, same steps. Before, the window sits in the top left corner and covers the navigation rail and the chat header. After, it sits beside the chat panel.
Animated preview below, click the GIF to open the MP4 (larger, with controls):
In the video: the message is sent at 00:24, and the pinned window appears beside the chat panel at 00:32.
Re-verified after moving to SDK 0.1.26, on the pushed head:
npm ci,npm run lintandnpm run build-bundleall run clean, and the lock resolves the SDK to exactly 0.1.26.npx tscstill reports only the pre existingnode_moduleserrors described below.Notes
requiredSdkVersionis set to^0.1.2, so any 0.1.x SDK from 0.1.2 up is accepted. The build pins 0.1.26, the SDK that 4.0 currently ships, while the wider floor also lets the plugin load on 4.0 servers that are still on an earlier 0.1.x SDK. Caret rather than tilde because on a0.xfloor the two operators accept exactly the same versions, and caret is the one that still expresses the intended range once the SDK reaches 1.0.0; note that^0.1.2by itself does not admit a 1.0.0 SDK.npx tscreports two errors on type declarations insidenode_modules(react-markdownand@types/prop-types). Those are pre existing: the base branch reports them too, plus a third one coming from the older SDK typings, which this change removes. So this is one error fewer than before, and the two that remain are untouched pre existing debt.Co-authored with Guilherme Leme, who created the
v0.1.xbranches for these plugins.