-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[docs-infra] Fix React Compiler ESLint issues in website components #42566
Changes from all commits
fa963ae
b3fbbbb
3c7a2f6
8165005
f1212bc
5962883
923ee2f
7cefb38
d812862
0faeb0f
cd67a06
6b414c5
e861ac6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,10 @@ export const useResizeHandle = ( | |
if (target.current && dragging && clientX) { | ||
const objectRect = target.current.getBoundingClientRect(); | ||
const newWidth = clientX - objectRect.left + dragOffset; | ||
target.current.style.width = `clamp(${minWidth}, ${Math.floor(newWidth)}px, ${maxWidth})`; | ||
target.current.style.setProperty( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels strange: facebook/react#29832. |
||
'width', | ||
`clamp(${minWidth}, ${Math.floor(newWidth)}px, ${maxWidth})`, | ||
); | ||
} | ||
} | ||
function stopResize() { | ||
|
@@ -148,7 +151,7 @@ export default function MaterialStyling() { | |
// 1px border-width | ||
infoRef.current!.scroll({ top: scrollTo[index] * 18 + 16 - 1, behavior: 'smooth' }); | ||
|
||
objectRef.current!.style.width = '100%'; | ||
objectRef.current!.style.setProperty('width', '100%'); | ||
}, [index]); | ||
|
||
return ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,6 +166,7 @@ function PersistScroll(props) { | |
} | ||
|
||
return () => { | ||
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- useEnhancedEffect uses useEffect under the hood | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the plan with these comments? To fix it in the future or to keep the disable? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The plan is to keep the disable but remove the comment/TODO once we enable the corresponding ESLint plugin. |
||
savedScrollTop[slot] = scrollContainer.scrollTop; | ||
}; | ||
}, [enabled, slot]); | ||
|
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.
Is
ENABLE_REACT_COMPILER_PLUGIN
no longer useful?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.
For now we leave it always off for Base UI.