-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
resizeable broadcast sides #17280
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
resizeable broadcast sides #17280
Conversation
|
could also be a solution for tournaments #12995 (or could make the description/chat togglable) |
|
the behavior:
it's a combo of initial reuse of the previous size while still allowing specific broadcasts to differ. this strategy will not always get it right, but is arguably an improvement over global flex & grid constraints |
| key: 'relay-games', | ||
| id: resizeId, | ||
| min: () => 48, | ||
| max: () => 48 * study.chapters.list.size(), |
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.
silently hardcoding the expected rendered height of a chapter in the list. Just mentioning it.
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.
every time i look at it, i feel liberated.
|
after resizing the page from col2 to col1 (which can happen if you rotate your tablet from horizontal to vertical), the slider elements are removed, but the mutation observers remain, and an exception is thrown due to const onDomChange = () => {
const el = divider.previousElementSibling as HTMLElement;
if (el.style.height) return; |
|
good catches. |
|
some of the hooks and indirections in analysis chat are gone. there is one ChatCtrl instance per page boot and chat views are constructed inline with VNodes. round and tournament chat still use the external snabbdom patch, mostly because i don't want to pull on these noodles at the moment. teams patches as well because that javascript has no controller. but i think chat/patch.ts goes away eventually. |
| window.removeEventListener('pointercancel', up); | ||
| const height = parseInt(el.style.height); | ||
| heightStore(o.key, height); | ||
| if (o.id) heightStore(`${o.key}.${o.id}`, height); |
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.
this is a default/global stored height mechanism. Setting a height somewhere also sets the (default) height of similar elements (for o.key) on other pages (o.id).
I just ran into a user issue due to it:
- open a broadcast with one board, like https://lichess.org/broadcast/fide-womens-world-chess-championship-2025/shanghai--game-5/xeyMoz7D
- try out the boards list resizer, it won't move much in this case, but it sets a new default to 48px as there is one board
- browse to another broadcast with more boards, like https://lichess.org/broadcast/25th-european-womens-chess-championship-2025/round-8/jGnDcYrv
the boards list uses the default value that was set to 48px. It only shows one board and it's not obvious that there are many more.
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.
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.
maybe only chat size needs a generic category fallback store. good catch and you're right, we should track game picker size individually with no generic fallback, instead always default to min(fit-content, initialHeight / 2).
|
I see liveboard code, but I don't see any liveboard on a broadcast page. |
| window.removeEventListener('pointercancel', up); | ||
| const height = parseInt(el.style.height); | ||
| heightStore(o.key, height); | ||
| if (o.id) heightStore(`${o.key}.${o.id}`, height); |
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.
ui/analyse/src/view/main.ts
Outdated
| const { study, gamebookPlayView, gaugeOn } = ctx; | ||
|
|
||
| return renderMain(ctx, [ | ||
| console.log(ctrl.opts.chat); |
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.
debug
yeah but it's tough to keep it close to chat because it competes with the resize bar. at least inside the box neat it's clearly part of the element to be resized rather than dangling underneath. could it be integrated with the "Please be nice in the chat" placeholder text? "i.e. viewers so be nice!" since we no longer list individual chat members, we could conceivably just move it somewhere else. like above the game selector. |
|
we could integrate it with the divider control? |
interesting idea |
|
try that one |
|
github no longer lets me push to this PR, I can't tell if they're wrong or if I am. |
Screencast_20250331_163344.webm