- Notifications
You must be signed in to change notification settings - Fork1k
fix(site): show available logs consistently on template creation page#19832
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
…mplatecreation page
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.
Conditional logic looks right to me, but the effects have me concerned
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
aslilac commentedSep 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
after staring at this for a while, I realized that the effects were weird because they're just in the wrong place. 😅 aaand that every place that uses this component re-implements the autoscrolling behavior itself. it should really just scroll itself, and that makes a bunch of complexity vanish. |
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.
I think this makes sense for a stopgap. I'm just not a fan of the randomlogs
expression used to suppress the Biome warnings
constref=useRef<HTMLDivElement>(null); | ||
useLayoutEffect(()=>{ | ||
logs; |
ParkreinerSep 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 feels janky to me. I think I'd rather have the Biome warning suppression, because it feels more "honest" about this not being a properly-defined synchronization effect
I think there's a "deeper" fix we can reach for to remove the effect entirely. I just don't know if it makes to do it now. ForBuildLogsDrawer
at least, we could:
- Update the logs component to accept a forwarded ref, and get rid of the old ref + layout logic
- Define the ref in
BuildLogsDrawer
- Update
useWatchVersionLogs
to accept anonMessage
callback that fires each time a new message comes in - Have
BuildLogsDrawer
pass the ref down to the logs component, and also pass anonMessage
callback to the hook that handles the scrolling behavior
ParkreinerSep 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
The big problem right now is that ideally these scrolls would be handled in an event handler, but the state isn't defined in a way that gives you a state setter function that's easy to wrap
Plus, there's five components currently using this
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.
one day we'll get signals...
ParkreinerSep 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
I mean, the problem with the React team is that they legitimately think that they don't need signals, and that the compiler is going to solve all of React's problems (which it probably won't). They've turned down a few signal proposals already
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.
it'll take a while, but I'm pretty sure the web platform will get signals soon, and then the react team will be forced to reckon with them.
also preact even jumped the gun and added signals. angular has signals now. the tide is turning!
f5fac29
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Closes#19704
The condition on this page was subtly wrong in a very annoying way. :^)