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

[20] Fix NextJS example "showExperiments" query string and update contributing guide #21

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
17 changes: 17 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@ N.B. See changelogs for individual packages, where most change will occur:

This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).

## [0.10.3] - 2025-02-07

### Fixed

- Updated the `CONTRIBUTING.md`:
- Clarification regarding changes needing to be committed for the `danger:local` script to be effective.
- Added a `danger:local:staged` command to augment the above
- Clarification regarding write access or forking being needed to open a pull request.
- Updated main `README.md`:
- Linked to `CONTRIBUTING.md`
- Added link to repo discussions, alongside the issues

### Changed

- Modified some playwright screenshots from the "serve" example, false negatives assumed due to subtle change in Linux Chromium in latest Ubuntu? Will need a new issue to make less flaky!
- Updated the `danger` version

## [0.10.2] - 2024-12-26

### Fixed
Expand Down
9 changes: 9 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ On this project we follow mainline development (or trunk based development), and

Therefore you need to branch / fork from `main` and merge into `main`.

> [!NOTE]
> To contribute a pull request, [you will need to fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) or be given [write access](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request), so get in touch to discuss the latter!

### Coding style

Generally try to match the style and conventions of the code around your changes. Ultimately we want code that is clear, concise, consistent and easy to read.
Expand All @@ -35,6 +38,12 @@ npm run test:unit
npm run test:automation
npm run danger:local
```
> [!NOTE]
> N.B. The `danger:local` script requires staged changes to be committed, otherwise you will receive the message:
>
> `No git changes detected between head and main`
>
> If you'd like to check just staged commits, you can instead run `npm run danger:local:staged`

## Opening a PR

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Please see separate [examples documentation](../examples/README.md).

### 🔜 Future Plans

Please see [issues](https://github.com/ASOS/web-toggle-point/issues) and please consider contributing!
Please see [discussions](https://github.com/ASOS/web-toggle-point/discussions) and [issues](https://github.com/ASOS/web-toggle-point/issues), and please consider [contributing](./CONTRIBUTING.md)!

### 🔗 Links

Expand Down
4 changes: 2 additions & 2 deletions examples/express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Some example applications based on an [express](https://expressjs.com/) router

1. [animals](./src/routes/animals/README.md)

This is a basic example using the [`webpack`](../packages/webpack/docs/README.md) package.
This is a basic example using the [`webpack`](../../packages/webpack/docs/README.md) package.

2. [config](./src/routes/config/README.md)

This example shows the use of the [`react-pointcuts`](../packages/react-pointcuts/docs/README.md), [`features`](../packages/features/docs/README.md), [`ssr`](../packages/ssr/docs/README.md) and [`webpack`](../packages/webpack/docs/README.md) packages.
This example shows the use of the [`react-pointcuts`](../../packages/react-pointcuts/docs/README.md), [`features`](../../packages/features/docs/README.md), [`ssr`](../../packages/ssr/docs/README.md) and [`webpack`](../../packages/webpack/docs/README.md) packages.
6 changes: 6 additions & 0 deletions examples/express/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.4] - 2024-02-07

### Fixed

- corrected some links to packages from the examples readme.

## [0.2.3] - 2024-12-24

### Changed
Expand Down
2 changes: 1 addition & 1 deletion examples/express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-toggle-point-express-example",
"version": "0.2.3",
"version": "0.2.4",
"type": "module",
"engines": {
"node": ">=20.6.0"
Expand Down
6 changes: 6 additions & 0 deletions examples/next/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.3] - 2025-02-07

### Fixed

- fixed a regression in the ability to use `?showExperiments` query in the experiments fixtures, regressed in version `0.2.0`.

## [0.2.2] - 2024-12-24

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion examples/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-toggle-point-next-example",
"version": "0.2.2",
"version": "0.2.3",
"private": true,
"type": "module",
"scripts": {
Expand Down
9 changes: 4 additions & 5 deletions examples/next/src/app/fixtures/experiments/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ const Example = ({ children, experiments }) => {
const searchParams = useSearchParams();
const FeaturesProvider = providerFactory();
return (
<div
className={`${styles.experiments} ${
searchParams.get("showExperiments") ? styles.debug : ""
}`}
>
<div className={styles.experiments}>
{searchParams.has("showExperiments") ? (
<code className={styles.code}>{JSON.stringify(experiments)}</code>
) : undefined}
<FeaturesProvider value={experiments}>
<div>{children}</div>
</FeaturesProvider>
Expand Down
33 changes: 12 additions & 21 deletions examples/next/src/app/fixtures/experiments/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,16 @@
}
}

.debug {
& script {
display: inline;
font-family: monospace;
width: 100%;
padding: 2px;
margin: 2px;
flex: 0 0 auto;
background: #eee;
border: 1px solid #ccc;
}
& script[id$="decisions"]{
&::before {
content: "decisions: ";
}
}
& script[id$="audience"] {
&::before {
content: "audience: ";
}
}
.code {
padding: 0.2em;
background: #eee;
border: 1px solid #ccc;
text-indent: -7em;
}
.code::before {
content: "experiments: ";
position: relative;
left: 5.5em;
top: -1.7em;
font-family: 'Didact Gothic', 'Didact Gothic Fallback';
}
7 changes: 7 additions & 0 deletions examples/serve/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.3] - 2025-02-07

### Changed

- updated some linux playwright snapshots
- no code changes, so this must be a change in linux chromium. Assets look identical to eye, so presumably need to relax the fuzziness.

## [0.2.2] - 2024-12-17

### Removed
Expand Down
2 changes: 1 addition & 1 deletion examples/serve/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-toggle-point-serve-example",
"version": "0.2.0",
"version": "0.2.3",
Copy link
Contributor Author

@TomStrepsil TomStrepsil Feb 9, 2025

Choose a reason for hiding this comment

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

N.B. prior version was errant, missed in refix of the versioning for OSS release. Should have matched Changelog. Probably need a new danger rule to ensure a match (or perhaps adoption of https://github.com/release-it/keep-a-changelog (perhaps not tied to "release-it"), https://www.npmjs.com/package/@firefoxic/update-changelog, or similar - as long as these work for monorepos)

"type": "module",
"private": true,
"scripts": {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading