-
Notifications
You must be signed in to change notification settings - Fork 19
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
Page penta updates #579
Merged
thatblindgeye
merged 4 commits into
patternfly:main
from
Dominik-Petrik:page-penta-updates
Feb 28, 2024
Merged
Page penta updates #579
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...src/rules/v6/pageRenameIsTertiaryNavGrouped/page-rename-isTertiaryNavGrouped.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
### page-rename-isTertiaryNavGrouped [(#9948)](https://github.com/patternfly/patternfly-react/pull/9948) | ||
|
||
We've renamed the \`isTertiaryNavGrouped\` prop to \`isHorizontalSubnavGrouped\`. | ||
|
||
#### Examples | ||
|
||
In: | ||
|
||
```jsx | ||
%inputExample% | ||
``` | ||
|
||
Out: | ||
|
||
```jsx | ||
%outputExample% | ||
``` |
25 changes: 25 additions & 0 deletions
25
...mods/src/rules/v6/pageRenameIsTertiaryNavGrouped/page-rename-isTertiaryNavGrouped.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const ruleTester = require('../../ruletester'); | ||
import * as rule from './page-rename-isTertiaryNavGrouped'; | ||
|
||
ruleTester.run('page-rename-isTertiaryNavGrouped', rule, { | ||
valid: [ | ||
{ | ||
code: `<Page isTertiaryNavGrouped />`, | ||
}, | ||
{ | ||
code: `import { Page } from '@patternfly/react-core'; <Page someOtherProp />`, | ||
}, | ||
], | ||
invalid: [ | ||
{ | ||
code: `import { Page } from '@patternfly/react-core'; <Page isTertiaryNavGrouped />`, | ||
output: `import { Page } from '@patternfly/react-core'; <Page isHorizontalSubnavGrouped />`, | ||
errors: [ | ||
{ | ||
message: `We've renamed the \`isTertiaryNavGrouped\` prop to \`isHorizontalSubnavGrouped\`.`, | ||
type: 'JSXOpeningElement', | ||
}, | ||
], | ||
}, | ||
], | ||
}); |
15 changes: 15 additions & 0 deletions
15
...-codemods/src/rules/v6/pageRenameIsTertiaryNavGrouped/page-rename-isTertiaryNavGrouped.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { renameProps } from '../../helpers'; | ||
|
||
// https://github.com/patternfly/patternfly-react/pull/9948 | ||
module.exports = { | ||
meta: { fixable: 'code' }, | ||
create: renameProps({ | ||
Page: { | ||
isTertiaryNavGrouped: { | ||
newName: 'isHorizontalSubnavGrouped', | ||
message: () => | ||
`We've renamed the \`isTertiaryNavGrouped\` prop to \`isHorizontalSubnavGrouped\`.`, | ||
}, | ||
}, | ||
}), | ||
}; |
5 changes: 5 additions & 0 deletions
5
...emods/src/rules/v6/pageRenameIsTertiaryNavGrouped/pageRenameIsTertiaryNavGroupedInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Page } from '@patternfly/react-core'; | ||
|
||
export const PageRenameIsTertiaryNavGroupedInput = () => ( | ||
<Page isTertiaryNavGrouped /> | ||
); |
5 changes: 5 additions & 0 deletions
5
...mods/src/rules/v6/pageRenameIsTertiaryNavGrouped/pageRenameIsTertiaryNavGroupedOutput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Page } from '@patternfly/react-core'; | ||
|
||
export const PageRenameIsTertiaryNavGroupedInput = () => ( | ||
<Page isHorizontalSubnavGrouped /> | ||
); |
17 changes: 17 additions & 0 deletions
17
...v6/pageRenameIsTertiaryNavWidthLimited/page-rename-isTertiaryNavWidthLimited.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
### page-rename-isTertiaryNavWidthLimited [(#9948)](https://github.com/patternfly/patternfly-react/pull/9948) | ||
|
||
We've renamed the \`isTertiaryNavWidthLimited\` prop to \`isHorizontalSubnavWidthLimited\`. | ||
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. Similar to comment above. |
||
|
||
#### Examples | ||
|
||
In: | ||
|
||
```jsx | ||
%inputExample% | ||
``` | ||
|
||
Out: | ||
|
||
```jsx | ||
%outputExample% | ||
``` |
25 changes: 25 additions & 0 deletions
25
...ules/v6/pageRenameIsTertiaryNavWidthLimited/page-rename-isTertiaryNavWidthLimited.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const ruleTester = require('../../ruletester'); | ||
import * as rule from './page-rename-isTertiaryNavWidthLimited'; | ||
|
||
ruleTester.run('page-rename-isTertiaryNavWidthLimited', rule, { | ||
valid: [ | ||
{ | ||
code: `<Page isTertiaryNavWidthLimited />`, | ||
}, | ||
{ | ||
code: `import { Page } from '@patternfly/react-core'; <Page someOtherProp />`, | ||
}, | ||
], | ||
invalid: [ | ||
{ | ||
code: `import { Page } from '@patternfly/react-core'; <Page isTertiaryNavWidthLimited />`, | ||
output: `import { Page } from '@patternfly/react-core'; <Page isHorizontalSubnavWidthLimited />`, | ||
errors: [ | ||
{ | ||
message: `We've renamed the \`isTertiaryNavWidthLimited\` prop to \`isHorizontalSubnavWidthLimited\`.`, | ||
type: 'JSXOpeningElement', | ||
}, | ||
], | ||
}, | ||
], | ||
}); |
15 changes: 15 additions & 0 deletions
15
...src/rules/v6/pageRenameIsTertiaryNavWidthLimited/page-rename-isTertiaryNavWidthLimited.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { renameProps } from '../../helpers'; | ||
|
||
// https://github.com/patternfly/patternfly-react/pull/9948 | ||
module.exports = { | ||
meta: { fixable: 'code' }, | ||
create: renameProps({ | ||
Page: { | ||
isTertiaryNavWidthLimited: { | ||
newName: 'isHorizontalSubnavWidthLimited', | ||
message: () => | ||
`We've renamed the \`isTertiaryNavWidthLimited\` prop to \`isHorizontalSubnavWidthLimited\`.`, | ||
}, | ||
}, | ||
}), | ||
}; |
5 changes: 5 additions & 0 deletions
5
...rules/v6/pageRenameIsTertiaryNavWidthLimited/pageRenameIsTertiaryNavWidthLimitedInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Page } from '@patternfly/react-core'; | ||
|
||
export const PageRenameIsTertiaryNavWidthLimitedInput = () => ( | ||
<Page isTertiaryNavWidthLimited /> | ||
); |
5 changes: 5 additions & 0 deletions
5
...ules/v6/pageRenameIsTertiaryNavWidthLimited/pageRenameIsTertiaryNavWidthLimitedOutput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Page } from '@patternfly/react-core'; | ||
|
||
export const PageRenameIsTertiaryNavWidthLimitedInput = () => ( | ||
<Page isHorizontalSubnavWidthLimited /> | ||
); |
17 changes: 17 additions & 0 deletions
17
...lugin-pf-codemods/src/rules/v6/pageRenameTertiaryNav/page-rename-tertiaryNav.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
### page-rename-tertiaryNav [(#9948)](https://github.com/patternfly/patternfly-react/pull/9948) | ||
|
||
We've renamed the \`tertiaryNav\` prop to \`horizontalSubnav\`. | ||
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. Similar to above. |
||
|
||
#### Examples | ||
|
||
In: | ||
|
||
```jsx | ||
%inputExample% | ||
``` | ||
|
||
Out: | ||
|
||
```jsx | ||
%outputExample% | ||
``` |
25 changes: 25 additions & 0 deletions
25
...int-plugin-pf-codemods/src/rules/v6/pageRenameTertiaryNav/page-rename-tertiaryNav.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const ruleTester = require('../../ruletester'); | ||
import * as rule from './page-rename-tertiaryNav'; | ||
|
||
ruleTester.run('page-rename-tertiaryNav', rule, { | ||
valid: [ | ||
{ | ||
code: `<Page tertiaryNav />`, | ||
}, | ||
{ | ||
code: `import { Page } from '@patternfly/react-core'; <Page someOtherProp />`, | ||
}, | ||
], | ||
invalid: [ | ||
{ | ||
code: `import { Page } from '@patternfly/react-core'; <Page tertiaryNav />`, | ||
output: `import { Page } from '@patternfly/react-core'; <Page horizontalSubnav />`, | ||
errors: [ | ||
{ | ||
message: `We've renamed the \`tertiaryNav\` prop to \`horizontalSubnav\`.`, | ||
type: 'JSXOpeningElement', | ||
}, | ||
], | ||
}, | ||
], | ||
}); |
15 changes: 15 additions & 0 deletions
15
...s/eslint-plugin-pf-codemods/src/rules/v6/pageRenameTertiaryNav/page-rename-tertiaryNav.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { getFromPackage, renameProps } from '../../helpers'; | ||
|
||
// https://github.com/patternfly/patternfly-react/pull/9948 | ||
module.exports = { | ||
meta: { fixable: 'code' }, | ||
create: renameProps({ | ||
Page: { | ||
tertiaryNav: { | ||
newName: 'horizontalSubnav', | ||
message: () => | ||
`We've renamed the \`tertiaryNav\` prop to \`horizontalSubnav\`.`, | ||
}, | ||
}, | ||
}), | ||
}; |
3 changes: 3 additions & 0 deletions
3
...lint-plugin-pf-codemods/src/rules/v6/pageRenameTertiaryNav/pageRenameTertiaryNavInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Page } from '@patternfly/react-core'; | ||
|
||
export const PageRenameTertiaryNavInput = () => <Page tertiaryNav />; |
3 changes: 3 additions & 0 deletions
3
...int-plugin-pf-codemods/src/rules/v6/pageRenameTertiaryNav/pageRenameTertiaryNavOutput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Page } from '@patternfly/react-core'; | ||
|
||
export const PageRenameTertiaryNavInput = () => <Page horizontalSubnav />; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
just to have the props as inline code in the README. We can leave the backticks escaped in the rule/tests, just add the "on Page." at the end of the message in those files as well.