Skip to content
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

[Tooltip] Deprecate *Component and *Props for v6 #44350

Merged
merged 37 commits into from
Nov 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
beaef75
deprecate *Component and *Props
lhilgert9 May 2, 2024
03649bf
add codemod
lhilgert9 May 4, 2024
0879d75
add docs for deprecation
lhilgert9 May 4, 2024
67370a3
add test-cases
lhilgert9 May 4, 2024
64d66bf
update docs to not use deprecated apis
lhilgert9 May 4, 2024
710f3c0
fix popper apply className from slotsProps and PopperProps
lhilgert9 May 4, 2024
1d2463b
Merge remote-tracking branch 'upstream/next' into deprecate-tooltip-p…
lhilgert9 May 4, 2024
df9b984
fix popperOptions
lhilgert9 May 4, 2024
2d9ea98
pnpm docs:typescript:formatted
lhilgert9 May 4, 2024
77566bd
pnpm prettier
lhilgert9 May 4, 2024
b4f8457
fix externalForwardedProps working with components prop
lhilgert9 May 4, 2024
ee0d1f5
fix misspelling transition
lhilgert9 May 4, 2024
987be9a
migrate Tooltips.test.js to not use deprecated apis
lhilgert9 May 4, 2024
bb3007d
prettier
lhilgert9 May 4, 2024
a3bfdf8
Revert "migrate Tooltips.test.js to not use deprecated apis"
lhilgert9 May 7, 2024
12e084f
resolve SlotProps for popperOptions
lhilgert9 May 10, 2024
c76a3fc
pnpm prettier
lhilgert9 May 10, 2024
b7da024
pnpm proptypes
lhilgert9 May 10, 2024
f62066a
Merge remote-tracking branch 'upstream/next' into deprecate-tooltip-p…
lhilgert9 May 25, 2024
40c35e5
prettier
lhilgert9 May 25, 2024
5457455
Merge remote-tracking branch 'upstream/next' into deprecate-tooltip-p…
lhilgert9 May 30, 2024
eb3f24d
fix migrate-from-deprecated-apis
lhilgert9 May 30, 2024
9f398dc
Merge branch 'master' of https://github.com/mui/material-ui into depr…
siriwatknp Nov 8, 2024
74630db
restore
siriwatknp Nov 8, 2024
b42fe84
update Tooltip to use `useSlot`
siriwatknp Nov 8, 2024
afaf99d
revert unrelated change
siriwatknp Nov 8, 2024
07e7cd9
add test for slots and slotProps
siriwatknp Nov 8, 2024
7e3fd6d
Merge branch 'master' of https://github.com/mui/material-ui into depr…
siriwatknp Nov 8, 2024
2e44cee
run proptypes and docs:api
siriwatknp Nov 11, 2024
19caedc
Merge branch 'master' of https://github.com/mui/material-ui into depr…
siriwatknp Nov 14, 2024
ffe15aa
apply suggestion
siriwatknp Nov 14, 2024
ac68ee0
update conformance tests
siriwatknp Nov 14, 2024
768fa24
apply suggestion
siriwatknp Nov 15, 2024
bb874cc
run proptypes and docs:api
siriwatknp Nov 15, 2024
2db1eac
Merge branch 'master' of https://github.com/mui/material-ui into depr…
siriwatknp Nov 18, 2024
514a4e6
update slots name
siriwatknp Nov 18, 2024
2fcd5a2
fix indentation
siriwatknp Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
prettier
  • Loading branch information
lhilgert9 committed May 4, 2024
commit bb3007d9c5abb790f8dfad0d0fe491d20fd2beef
56 changes: 34 additions & 22 deletions packages/mui-material/src/Tooltip/Tooltip.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,13 @@ describe('<Tooltip />', () => {
}

render(
<Tooltip title="Hello World" placement="top" slots={{
popper: PopperSpy
}}>
<Tooltip
title="Hello World"
placement="top"
slots={{
popper: PopperSpy,
}}
>
<button id="testChild" type="submit">
Hello World
</button>
Expand All @@ -291,7 +295,7 @@ describe('<Tooltip />', () => {
enterDelay={enterDelay}
title="Hello World"
slotProps={{
transition: { timeout: transitionTimeout }
transition: { timeout: transitionTimeout },
}}
>
<button id="testChild" type="submit">
Expand Down Expand Up @@ -390,7 +394,7 @@ describe('<Tooltip />', () => {
open
title="Movie quote"
slotProps={{
transition: { timeout: transitionTimeout }
transition: { timeout: transitionTimeout },
}}
>
<button />
Expand Down Expand Up @@ -434,7 +438,7 @@ describe('<Tooltip />', () => {
leaveTouchDelay={leaveTouchDelay}
title="Hello World"
slotProps={{
transition: { timeout: transitionTimeout }
transition: { timeout: transitionTimeout },
}}
>
<button type="submit">Hello World</button>
Expand Down Expand Up @@ -536,7 +540,7 @@ describe('<Tooltip />', () => {
enterNextDelay={30}
leaveDelay={5}
slotProps={{
transition: { timeout: 6 }
transition: { timeout: 6 },
}}
>
<button id="testChild" type="submit">
Expand Down Expand Up @@ -582,7 +586,7 @@ describe('<Tooltip />', () => {
enterDelay={enterDelay}
title="tooltip"
slotProps={{
transition: { timeout: transitionTimeout }
transition: { timeout: transitionTimeout },
}}
>
<button id="testChild" type="submit">
Expand Down Expand Up @@ -723,7 +727,7 @@ describe('<Tooltip />', () => {
enterDelay={100}
leaveDelay={111}
slotProps={{
transition: { timeout: 10 }
transition: { timeout: 10 },
}}
>
<button id="testChild" type="submit">
Expand Down Expand Up @@ -754,7 +758,7 @@ describe('<Tooltip />', () => {
enterDelay={100}
leaveDelay={111}
slotProps={{
transition: { timeout: 10 }
transition: { timeout: 10 },
}}
>
<button id="testChild" type="submit">
Expand Down Expand Up @@ -782,9 +786,13 @@ describe('<Tooltip />', () => {
describe('prop: PopperProps', () => {
it('should pass PopperProps to Popper Component', () => {
render(
<Tooltip title="Hello World" open slotProps={{
popper: { 'data-testid': 'popper' }
}}>
<Tooltip
title="Hello World"
open
slotProps={{
popper: { 'data-testid': 'popper' },
}}
>
<button id="testChild" type="submit">
Hello World
</button>
Expand Down Expand Up @@ -813,7 +821,7 @@ describe('<Tooltip />', () => {
},
],
},
}
},
}}
>
<button id="testChild" type="submit">
Expand Down Expand Up @@ -851,7 +859,7 @@ describe('<Tooltip />', () => {
},
],
},
}
},
}}
>
<button id="testChild" type="submit">
Expand Down Expand Up @@ -939,7 +947,7 @@ describe('<Tooltip />', () => {
open
title="Some information"
slotProps={{
transition: { timeout: transitionTimeout }
transition: { timeout: transitionTimeout },
}}
>
<button onBlur={() => eventLog.push('blur')} />
Expand Down Expand Up @@ -1086,9 +1094,13 @@ describe('<Tooltip />', () => {
return <div data-testid="CustomPopper" />;
}
render(
<Tooltip title="Hello World" open slots={{
popper: CustomPopper
}}>
<Tooltip
title="Hello World"
open
slots={{
popper: CustomPopper,
}}
>
<button id="testChild" type="submit">
Hello World
</button>
Expand All @@ -1110,7 +1122,7 @@ describe('<Tooltip />', () => {
open
followCursor
slotProps={{
popper: { 'data-testid': 'popper' }
popper: { 'data-testid': 'popper' },
}}
>
<button data-testid="target" type="submit">
Expand Down Expand Up @@ -1264,7 +1276,7 @@ describe('<Tooltip />', () => {
leaveTouchDelay={leaveTouchDelay}
title="Hello World"
slotProps={{
transition: { timeout: transitionTimeout }
transition: { timeout: transitionTimeout },
}}
>
<button type="submit">Hello World</button>
Expand Down Expand Up @@ -1307,7 +1319,7 @@ describe('<Tooltip />', () => {
leaveTouchDelay={leaveTouchDelay}
title="Hello World"
slotProps={{
transition: { timeout: transitionTimeout }
transition: { timeout: transitionTimeout },
}}
>
<button type="submit">Hello World</button>
Expand Down
Loading