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

Page penta updates #579

Merged
merged 4 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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\`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We've renamed the \`isTertiaryNavGrouped\` prop to \`isHorizontalSubnavGrouped\`.
We've renamed the `isTertiaryNavGrouped` prop to `isHorizontalSubnavGrouped` on Page.

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.


#### Examples

In:

```jsx
%inputExample%
```

Out:

```jsx
%outputExample%
```
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',
},
],
},
],
});
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\`.`,
},
},
}),
};
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 />
);
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 />
);
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\`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to comment above.


#### Examples

In:

```jsx
%inputExample%
```

Out:

```jsx
%outputExample%
```
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',
},
],
},
],
});
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\`.`,
},
},
}),
};
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 />
);
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 />
);
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\`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above.


#### Examples

In:

```jsx
%inputExample%
```

Out:

```jsx
%outputExample%
```
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',
},
],
},
],
});
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\`.`,
},
},
}),
};
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 />;
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 />;
Loading