Skip to content

Commit

Permalink
Merge branch 'main' into tooltip-position-wiggle
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolinisoup authored Feb 29, 2024
2 parents 1ca64c7 + 9e6ed29 commit ba8bbe6
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 59 deletions.
5 changes: 0 additions & 5 deletions .changeset/curvy-fireants-promise.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fair-trainers-battle.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/khaki-schools-lay.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/nervous-dogs-change.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/old-peas-cross.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/spicy-cobras-hunt.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tall-spiders-pay.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/warm-steaks-fry.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/young-bikes-kneel.md

This file was deleted.

4 changes: 2 additions & 2 deletions contributor-docs/deprecating-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ When Primer team is ready to promote the newly developed component in the main b

Here is a checklist for developers who are going through the promotion process. Although this is a step-by-step guide, it is not a strict process and please use this as a reference.

Note: Component v1 is refered to the component that is going to be moved to the deprecated bundle and component v2 is the one that is going to be promoted to the main bundle.
Note: Component v1 is referred to the component that is going to be moved to the deprecated bundle and component v2 is the one that is going to be promoted to the main bundle.

#### Source Code

Expand Down Expand Up @@ -83,7 +83,7 @@ Primer maintainers should reach out to #accessibility any time a component is pl
### Removing the deprecated component

After about 6 months of living in the deprecated bundle, a component is retired/deleted from the codebase. This is also a breaking change and Primer team releases it in the upcoming major release.
At this point, consumers are expected to plan migration work and Primer team annouces the deletion in Primer Changelog as they do for the deprecation.
At this point, consumers are expected to plan migration work and Primer team announces the deletion in Primer Changelog as they do for the deprecation.

## FAQ

Expand Down
8 changes: 4 additions & 4 deletions contributor-docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

## Strategy

We aim to follow the behavioral testing paradigm as our testing strategy where we focus on testing the interface of the component with the given input and expected output rather than implementation details. This approach helps us think the possible ways of how an end-user would interact with, or use, the component therefore help us cover both happy and unhappy paths.
We aim to follow the behavioral testing paradigm as our testing strategy where we focus on testing the interface of the component with the given input and expected output rather than implementation details. This approach helps us think of the possible ways of how an end-user would interact with, or use, the component therefore help us cover both happy and unhappy paths.

As we heavily rely on the behavioral testing paradigm to test our components, the traditional percentage-base testing coverage is not always helpful for us to use as a metric. To measure the level of our testing coverage or in other words, the definition of "Tested" for us is more like a checklist than a number. Below are some examples can be used as a starting point to help measure the test coverage:
As we heavily rely on the behavioral testing paradigm to test our components, the traditional percentage-base testing coverage is not always helpful for us to use as a metric. To measure the level of our testing coverage or in other words, the definition of "Tested" for us is more like a checklist than a number. Below are some examples that can be used as a starting point to help measure the test coverage:

- Variants of the component (I.e. default, primary, success, error)
- The states of the component (I.e. open/closed, selected, disabled)
Expand Down Expand Up @@ -92,13 +92,13 @@ We are slowly moving away from using `Jest` snapshots as a way to test visual ch

### As A Part Of Unit Tests

We write our unit tests from a user perspective rather than focusing on implementation details. Simulating events to test user interations is a core part of our testing practise.
We write our unit tests from a user perspective rather than focusing on implementation details. Simulating events to test user interactions is a core part of our testing practise.

We write user interaction tests leveraging [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/)’s [userEvent](<[userEvent](https://testing-library.com/docs/user-event/intro/)>) testing helper.

### Storybook Interaction Tests

We use [Storybook interactions tests](https://storybook.js.org/docs/react/writing-tests/interaction-testing) to simulate and test some complex user interactions. They are particularly useful for cases where writing unit tests are not practical due the limitation of the mock browser functionalities of JSDOM. For example testing out a component's overflow behaviour whose responsiveness is managed by its own dynamic width.
We use [Storybook interactions tests](https://storybook.js.org/docs/react/writing-tests/interaction-testing) to simulate and test some complex user interactions. They are particularly useful for cases where writing unit tests are not practical due to the limitation of the mock browser functionalities of JSDOM. For example testing out a component's overflow behaviour whose responsiveness is managed by its own dynamic width.

Storybook tests are authored within the components's source directory with the file name of `interactions.stories.tsx`

Expand Down
6 changes: 3 additions & 3 deletions contributor-docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ semver bump: **minor**

When a type is broadened, it is now possible for that type to include both the
existing value and additional values. As a result, this maintains backwards
compatability while providing new functionality to the library.
compatibility while providing new functionality to the library.

```diff
// v0.1.0
Expand All @@ -82,7 +82,7 @@ compatability while providing new functionality to the library.
// v0.2.0
+ export type Example = number | string;

// Maintains compatability across versions
// Maintains compatibility across versions
const t1: Example = 1;
```

Expand All @@ -102,7 +102,7 @@ work.
// v0.2.0
+ export type Example = 'a' | 'b' | 'c';

// Does not maintain compatability across versions, the change must be a major
// Does not maintain compatibility across versions, the change must be a major
// change
const t1: Example = 'd';
```
Expand Down
2 changes: 1 addition & 1 deletion examples/app-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@primer/react": "36.9.0",
"@primer/react": "36.10.0",
"next": "^14.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@primer/octicons-react": "^18.2.0",
"@primer/react": "36.9.0",
"@primer/react": "36.10.0",
"next": "^14.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"build:components.json": "npm run build:components.json -w @primer/react",
"lint": "eslint '**/*.{js,ts,tsx,md,mdx}' --max-warnings=0",
"lint:fix": "npm run lint -- --fix",
"lint:md": "markdownlint-cli2 \"**/*.{md,mdx}\" \"!.github\" \"!.changeset\" \"!**/node_modules/**\" \"!CHANGELOG.md\"",
"lint:md": "markdownlint-cli2 \"**/*.{md,mdx}\" \"!.github\" \"!.changeset\" \"!**/node_modules/**\" \"!**/CHANGELOG.md\"",
"test": "jest",
"test:update": "npm run test -- --updateSnapshot",
"test:watch": "npm run test -- --watch",
Expand Down
24 changes: 24 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @primer/react

## 36.10.0

### Minor Changes

- [#4233](https://github.com/primer/react/pull/4233) [`fcd05284039b9768e37f687d65eece9242e4e2f8`](https://github.com/primer/react/commit/fcd05284039b9768e37f687d65eece9242e4e2f8) Thanks [@pksjce](https://github.com/pksjce)! - Add a new experimental component ActionBar

### Patch Changes

- [#4321](https://github.com/primer/react/pull/4321) [`94052a35167b2b8f024ebbb2b676acf24641b245`](https://github.com/primer/react/commit/94052a35167b2b8f024ebbb2b676acf24641b245) Thanks [@siddharthkp](https://github.com/siddharthkp)! - experimental/SelectPanel: Fix anchored position inside a Dialog

- [#4279](https://github.com/primer/react/pull/4279) [`a68e2e206eed4ecb8bbf9b0646271c776c301c1a`](https://github.com/primer/react/commit/a68e2e206eed4ecb8bbf9b0646271c776c301c1a) Thanks [@joshblack](https://github.com/joshblack)! - Add aria-labelledby to listbox within draft SelectPanel

- [#4278](https://github.com/primer/react/pull/4278) [`9ec7262fd0bfad6de689c7a73fad71e800cf5620`](https://github.com/primer/react/commit/9ec7262fd0bfad6de689c7a73fad71e800cf5620) Thanks [@langermank](https://github.com/langermank)! - Address a few v8 color bugs

- [#4294](https://github.com/primer/react/pull/4294) [`5ca5c0a6239029abbf285a0e7190e1c766dcab8b`](https://github.com/primer/react/commit/5ca5c0a6239029abbf285a0e7190e1c766dcab8b) Thanks [@siddharthkp](https://github.com/siddharthkp)! - experimental/SelectPanel: Cancel + close panel when user clicks outside

- [#4263](https://github.com/primer/react/pull/4263) [`590486ff650a81637a07f67624497f01303091b4`](https://github.com/primer/react/commit/590486ff650a81637a07f67624497f01303091b4) Thanks [@joshblack](https://github.com/joshblack)! - Update Checkbox to mirror `aria-checked` and the input's `checked` property

- [#4317](https://github.com/primer/react/pull/4317) [`0e744e20620a3e2fefebe94e9e33f71dcb0ee19c`](https://github.com/primer/react/commit/0e744e20620a3e2fefebe94e9e33f71dcb0ee19c) Thanks [@broccolinisoup](https://github.com/broccolinisoup)! - Tooltip: Take position:absolute back that was introduced in https://github.com/primer/react/pull/4250 since causing flickering issues and update v2 id to be the same with v1 for the new docs site.

- [#4239](https://github.com/primer/react/pull/4239) [`03d8d35c4d2be0dc2b1af67d5a3f57e255406453`](https://github.com/primer/react/commit/03d8d35c4d2be0dc2b1af67d5a3f57e255406453) Thanks [@langermank](https://github.com/langermank)! - Update the font-weight of the Dialog subtitle component to be normal

- [#4295](https://github.com/primer/react/pull/4295) [`e1dbd6adb4ea2f302722b11c62a631b9c43277c2`](https://github.com/primer/react/commit/e1dbd6adb4ea2f302722b11c62a631b9c43277c2) Thanks [@langermank](https://github.com/langermank)! - Fix `placeholder` selector for form components

## 36.9.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@primer/react",
"version": "36.9.0",
"version": "36.10.0",
"description": "An implementation of GitHub's Primer Design System using React",
"main": "lib/index.js",
"module": "lib-esm/index.js",
Expand Down

0 comments on commit ba8bbe6

Please sign in to comment.