-
Notifications
You must be signed in to change notification settings - Fork 360
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
feat: replace clone function with structuredClone and add polyfill #7624
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
e9db3e1
to
a9696fc
Compare
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.
seems like .swcrc
is not working as expected
We only use swc for transpilation in dev -- in production we use esbuild. Can you confirm the swc polyfill method works on older browsers with a production bundle? |
After adding the polyfill back, I've checked the preview link on chrome 97 and it works. |
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.
tested on local chromium v93 and its mostly good in production mode
but polyfill is not applied on dev mode. do we wanna support it in dev mode too?
circling back, i'm noticing that by default the old can we replace calls that would have been shallow clones with the object spread instead to keep the semantics consistent? |
I looked at this, as the old clone = (data: any, deep = true): any => // ... |
64c6504
to
dfedc63
Compare
@ashtonG do you think polyfill should be applied in dev? or we expect engineers to use the latest browser so it doesn't matter? |
i'd be suprised the polyfill isn't working in dev -- barring an explicit IS_DEV switch, i'd expect the module doing the pollyfilling to work the same regardless. @thiagodallacqua-hpe can you investigate what's happening here? |
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.
Looks mostly good, but i got an issue in the new exp table.
in Chrome v116, the new exp table doesn't show data correctly. I didn't see the issue in main branch so i think this PR introduced the issue.
Screen.Recording.2023-08-21.at.11.26.37.AM.mov
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.
Could you change the appropriate PR title?
Ticket: WEB-946
This PR intends to convert the current structure into using the available
structuredClone
and add a polyfill for it.Description
Test Plan
there're a few places where the
clone
function is used, I suggest testing with the hyperparameter search modal, as it clones with the previous arg fordeep
astrue
.Commentary (optional)
Checklist
docs/release-notes/
.See Release Note for details.
Ticket