Skip to content

Commit

Permalink
Merge pull request #3361 from openedx/release-23.x
Browse files Browse the repository at this point in the history
sync: release-23.x to next
  • Loading branch information
edx-requirements-bot authored Dec 12, 2024
2 parents b82ef74 + 92c43c3 commit 2bbef87
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lockfileversion-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ name: Lockfile Version check
on:
push:
branches:
- master
- next
- release-*
pull_request:

jobs:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Release CI

on:
workflow_dispatch:
push:
branches:
- master
- alpha
- beta
- next
- release-*
jobs:
release:
name: Release
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Sync alpha with master
name: Sync next with 23.x
on:
push:
branches:
- master
- release-23.x
workflow_dispatch:

jobs:
Expand All @@ -11,18 +11,23 @@ jobs:
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: '.nvmrc'
- name: Create Pull Request
id: cpr
uses: tretuna/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.requirements_bot_github_token }}
FROM_BRANCH: master
TO_BRANCH: alpha
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FROM_BRANCH: release-23.x
TO_BRANCH: next
- name: Auto-approve pull request for sync
uses: hmarr/auto-approve-action@v2
with:
pull-request-number: ${{ steps.cpr.outputs.PULL_REQUEST_NUMBER }}
github-token: ${{ secrets.requirements_bot_github_token }}
- name: Enable Pull Request Automerge
uses: peter-evans/enable-pull-request-automerge@v2
with:
Expand Down
7 changes: 3 additions & 4 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"branches": [
"master",
"next",
{ "name": "alpha", "prerelease": true },
{ "name": "beta", "prerelease": true }
{ "name": "release-22.x", "range": "22.x", "channel": "22.x" },
{ "name": "release-23.x" },
{ "name": "next", "prerelease": true, "channel": "next" }
],
"plugins": [
"@semantic-release/commit-analyzer",
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ Note that if you are using ``@edx/frontend-platform``'s ``AppProvider`` componen

## Contributing

The branch to target with your PR depends on the type of change you are contributing to Paragon.

| Branch to Target | Type of Change | Documentation Site |
| - | - | - |
| [`release-22.x`](https://github.com/openedx/paragon/tree/release-22.x) | Bug fix/security patch | https://paragon-openedx-v22.netlify.app/ |
| [`release-23.x`](https://github.com/openedx/paragon/tree/release-23.x) | Bug fix/security patch/new (non-breaking) feature | https://paragon-openedx-v23.netlify.app/ |
| [`next`](https://github.com/openedx/paragon/tree/next) | Breaking change | https://paragon-openedx.netlify.app/ |

Please refer to the ["How to Contribute"](https://openedx.org/r/how-to-contribute) documentation and [Code of Conduct](https://openedx.org/code-of-conduct/) from Open edX.

The Paragon Working Group accepts bug fixes, new features, documentation, and security patches. You may find open issues [here](https://github.com/openedx/paragon/issues) or by visiting the Paragon Working Group [project board](https://github.com/orgs/openedx/projects/43/views/15).
Expand Down Expand Up @@ -475,11 +483,6 @@ perf(pencil): remove graphiteWidth option
BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reason.
```

#### Opening Pull Requests for Breaking Changes

Pull requests that include Breaking Changes must be opened against the `next` branch instead of `release-x.x`.
This ensures that breaking changes are accumulated and released together in the next major version, minimizing disruption for consumers.

## Treeshaking

Paragon is distributed on npm as ES6 modules. This means that webpack can use treeshaking on any Paragon components that a consuming app is not using, resulting in greatly reduced bundle sizes.
Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"@babel/preset-env": "^7.16.8",
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
"@edx/eslint-config": "^4.2.0",
"@edx/eslint-config": "^4.3.0",
"@edx/stylelint-config-edx": "^2.3.0",
"@edx/typescript-config": "^1.1.0",
"@formatjs/cli": "^5.0.2",
Expand Down
1 change: 1 addition & 0 deletions src/Card/CardFallbackDefaultImage.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Card/CardImageCap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import Skeleton from 'react-loading-skeleton';
import CardContext from './CardContext';
import cardSrcFallbackImg from './fallback-default.png';
import { cardSrcFallbackImg } from './CardFallbackDefaultImage';

const SKELETON_HEIGHT_VALUE = 140;
const LOGO_SKELETON_HEIGHT_VALUE = 41;
Expand Down
Binary file removed src/Card/fallback-default.png
Binary file not shown.
6 changes: 3 additions & 3 deletions src/Card/tests/CardImageCap.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import renderer from 'react-test-renderer';
import { render, fireEvent, screen } from '@testing-library/react';
import CardImageCap from '../CardImageCap';
import CardContext from '../CardContext';
import { cardSrcFallbackImg } from '../CardFallbackDefaultImage';

// eslint-disable-next-line react/prop-types
function CardImageCapWrapper({ orientation = 'vertical', isLoading, ...props }) {
Expand Down Expand Up @@ -119,13 +120,12 @@ describe('<CardImageCap />', () => {
expect(logoImg.className).toEqual('pgn__card-logo-cap');
});

it('hiding component if it isn`t fallbackSrc and src don`t work', () => {
it('renders the default image if both src and fallbackSrc fail to load', () => {
render(<CardImageCapWrapper src="fakeURL" fallbackSrc="fakeURL" srcAlt="Src alt text" />);

const srcImg = screen.getByAltText('Src alt text');
fireEvent.load(srcImg);
fireEvent.error(srcImg);
// test-file-stub is what our fileMock.js returns for all images
expect(srcImg.src.endsWith('test-file-stub')).toEqual(true);
expect(srcImg.src).toEqual(cardSrcFallbackImg);
});
});

0 comments on commit 2bbef87

Please sign in to comment.