You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+12-13
Original file line number
Diff line number
Diff line change
@@ -55,8 +55,8 @@ Run `npm test` in the top folder to test all packages, or `npm test` in the desi
55
55
- Tense: Use the imperative present tense (e.g. "Add feature", not "Added feature") to describe what changed from the consumer's perspective in the commit summary.
56
56
57
57
| <imgsrc="https://imgs.xkcd.com/comics/git_commit.png"alt="xkcd comic about commit messages"/> |
See more guidelines for contributors and maintainers in the [Principles, Patterns, and Guidelines](principles-patterns-guidelines.md) doc.
62
62
@@ -65,17 +65,16 @@ See more guidelines for contributors and maintainers in the [Principles, Pattern
65
65
Once you have made a change and verified that it works locally including in the Styleguidist website, put up a PR. The author should own seeking review and merging/publishing. Publishing packages to npm is automated with Relay when a PR is merged to `main` or `releases/alpha` if Lerna detects a new version in a package's `package.json` that doesn't yet exist on npm.
66
66
67
67
1.**Branch**: Create a PR from your branch. Note that we usually push the branch directly to this repository rather than a fork.
68
-
- Target the `main` branch (the default branch) if the change should be published upon merge.
69
-
- Target the `releases/alpha` branch if it includes a breaking change.
70
-
- Target a feature branch if the change shouldn't be released yet. For example, a "feature" or "integration" branch can be used if you want to batch up multiple changes into a single release, which would then need to be followed up with another PR from that branch to `main` for a release.
68
+
- Target the `main` branch (the default branch) if the change should be published upon merge.
69
+
- Target the `releases/alpha` branch if it includes a breaking change.
70
+
- Target a feature branch if the change shouldn't be released yet. For example, a "feature" or "integration" branch can be used if you want to batch up multiple changes into a single release, which would then need to be followed up with another PR from that branch to `main` for a release.
71
71
2.**Changelog**: Add a line about your change to the package's CHANGELOG.md.
72
-
- Add a heading with the release date. Note that you may use "Unreleased" if it's not going to be released yet.
73
-
- Add context and be specific about the change by prefixing the change with the component affected and referencing props by name.
72
+
- Add a heading with the release date. Note that you may use "Unreleased" if it's not going to be released yet.
73
+
- Add context and be specific about the change by prefixing the change with the component affected and referencing props by name.
74
74
3.**Version**: Update the version to be published, following [semver](https://semver.org/) for patch, minor, and major versions. Note that alpha versions also follow semver, in the form `6.0.0-alpha.3`.
75
-
- Increment the version in the appropriate `package.json` files, e.g. [packages/react-components/package.json](packages/react-components/package.json).
76
-
- Also increment the version in the corresponding `package-lock.json` files. When updating a single package, this is most easily done by simply manually incrementing the `version` field in the `package-lock.json` file to match, but can also be done by running `npm install`, though you may have to run `git clean -dfX` first to force them to update.
77
-
- Note: Other packages in this project that depend on the incremented package may also need to be udpated to point to the new version, otherwise, you could end up with multiple versions due to the use of lockfiles.
75
+
- Increment the version in the appropriate `package.json` files, e.g. [packages/react-components/package.json](packages/react-components/package.json).
76
+
- Also increment the version in the corresponding `package-lock.json` files. When updating a single package, this is most easily done by simply manually incrementing the `version` field in the `package-lock.json` file to match, but can also be done by running `npm install`, though you may have to run `git clean -dfX` first to force them to update.
77
+
- Note: Other packages in this project that depend on the incremented package may also need to be udpated to point to the new version, otherwise, you could end up with multiple versions due to the use of lockfiles.
78
78
4.**Review**: Get a +1 on the PR. Feel free to ping people to find a reviewer. The [design-system-codeowners](https://github.com/orgs/puppetlabs/teams/design-system-codeowners/members) team should be able to help.
79
-
5.**Merge**: Merge the PR. Merging to `main` or `releases/alpha` will trigger a Relay workflow that runs the `npm run release` command.
80
-
6.**Notification**: Wait for a successful notification in the #alerts-design-system Slack channel, which could take a half hour or so.
81
-
7.**Verify**: Verify the new version got published, e.g. by checking [https://www.npmjs.com/package/@puppet/react-components](https://www.npmjs.com/package/@puppet/react-components).
79
+
5.**Merge**: Merge the PR. Merging to `main` or `releases/alpha` will trigger a github workflow that runs the `npm run publish` command.
80
+
6.**Verify**: Verify the new version got published, e.g. by checking [https://www.npmjs.com/package/@puppet/react-components](https://www.npmjs.com/package/@puppet/react-components).
To improve accessibility and event handling, the `Menu` component provides the `Menu.Item`[HOC](https://reactjs.org/docs/higher-order-components.html) for managing its internal focusable elements and adding common event handlers. To use, wrap any component that accepts an `innerRef` prop with the `Menu.Item` function.
72
72
73
-
####Focus
73
+
### Focus
74
74
75
75
`Menu.Item` uses the 'roving focus' pattern and is meant to be used for simple menu navigation. The tab index will be tracked automatically according to its x/y location on the page. For more complex menus, it's recommended you add your own focus management.
76
76
77
-
####Controlled vs Uncontrolled
77
+
### Controlled vs Uncontrolled
78
78
79
79
`Menu.Item` will add basic open and close handlers, allowing for a simple uncontrolled menu. `onKeydown` events for the space & enter key will be added to match the onClick event provided to the menu item component.
80
80
81
81
_To control the menu while using components wrapped in the `Menu.Item` HOC, pass a boolean value to the `open` prop. Setting `closeOnSelect` to false will keep the menu open after selections are made_
For a more compact view, columns can be set to true, for two columns, or a number for more than two columns. It's not recommended to display more than 3 columns in a menu.
0 commit comments