diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..60b9b8cd4 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,2 @@ +needs-changelog: + - base-branch: ['trunk'] diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 000000000..52534ece6 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,36 @@ +name: "Pull Request Labeler" +on: + pull_request: + types: [closed] + +jobs: + labeler: + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'trunk' + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + + comment_pr: + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'trunk' + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + name: Comment about the change log label + steps: + - name: Comment PR + uses: thollander/actions-comment-pull-request@v3 + with: + message: | + Hey @${{ github.event.pull_request.assignee.login }}, good job getting this PR merged! :tada: + + Now, the `needs-changelog` label has been added to it. + + Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. + + If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. + + Thank you! :heart: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 064fef262..704e1550b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Label when approved - uses: pullreminders/label-when-approved-action@master + uses: abinoda/label-when-approved-action@master env: APPROVALS: '1' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index b89a54ea4..0b512b54d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +# [3.4.0](https://github.com/Automattic/newspack-newsletters/compare/v3.3.3...v3.4.0) (2024-11-11) + + +### Bug Fixes + +* avoid double notice components ([#1703](https://github.com/Automattic/newspack-newsletters/issues/1703)) ([b8e9130](https://github.com/Automattic/newspack-newsletters/commit/b8e913013b035e824452566943a4576a304f7527)) +* avoid race condition between post-save sync & test ([#1679](https://github.com/Automattic/newspack-newsletters/issues/1679)) ([7bde119](https://github.com/Automattic/newspack-newsletters/commit/7bde1190aa83e09e7b411db25c38884bddb92506)) +* avoid Redux usage and related errors in non-newsletter email editors ([#1688](https://github.com/Automattic/newspack-newsletters/issues/1688)) ([d3f1f37](https://github.com/Automattic/newspack-newsletters/commit/d3f1f37a110d663cdd5fb31b8807f8e443eee3b5)) +* correct button stacking on sent newsletters ([#1695](https://github.com/Automattic/newspack-newsletters/issues/1695)) ([4e2688e](https://github.com/Automattic/newspack-newsletters/commit/4e2688e01600376d7c0e8dc397c7c9c9f748860d)) +* dont html encode ampersands in subject ([#1686](https://github.com/Automattic/newspack-newsletters/issues/1686)) ([f178b23](https://github.com/Automattic/newspack-newsletters/commit/f178b2355cd1198531972eee36939de70524eb93)) +* **mailchimp:** avoid duplicate audiences in Mailchimp UIs ([#1685](https://github.com/Automattic/newspack-newsletters/issues/1685)) ([44c1b12](https://github.com/Automattic/newspack-newsletters/commit/44c1b12d54773a0badbaf462175ed42185e70839)) +* move Preview, Send buttons to match Publish button location ([#1689](https://github.com/Automattic/newspack-newsletters/issues/1689)) ([72897f2](https://github.com/Automattic/newspack-newsletters/commit/72897f206058af5c63afdd7fd2ab9946a9a0b923)) +* preview & send buttons on WP 6.7 ([49450d3](https://github.com/Automattic/newspack-newsletters/commit/49450d32c206435a60e0fbab36f179d75ee2bf46)) +* remove behavior to hide post title in newsletter editor ([#1701](https://github.com/Automattic/newspack-newsletters/issues/1701)) ([8a15cf5](https://github.com/Automattic/newspack-newsletters/commit/8a15cf5393f6dcf6cbbe3a326d9e996610711649)) + + +### Features + +* display list remote name on settings page ([#1672](https://github.com/Automattic/newspack-newsletters/issues/1672)) ([562d396](https://github.com/Automattic/newspack-newsletters/commit/562d396ea5c5fef5683fe1e37bb2b26690ac4b75)) + +## [3.3.3](https://github.com/Automattic/newspack-newsletters/compare/v3.3.2...v3.3.3) (2024-11-07) + + +### Bug Fixes + +* **send-lists:** temporary fix for searching many mailchimp audiences ([#1693](https://github.com/Automattic/newspack-newsletters/issues/1693)) ([e41f3b6](https://github.com/Automattic/newspack-newsletters/commit/e41f3b69ed58ea8a2442d56a5a4e7c24d4e81242)) + ## [3.3.2](https://github.com/Automattic/newspack-newsletters/compare/v3.3.1...v3.3.2) (2024-10-29) diff --git a/newspack-newsletters.php b/newspack-newsletters.php index 53c58a3a5..6b53f8192 100644 --- a/newspack-newsletters.php +++ b/newspack-newsletters.php @@ -8,7 +8,7 @@ * License: GPL2 * Text Domain: newspack-newsletters * Domain Path: /languages - * Version: 3.3.2 + * Version: 3.4.0 * * @package Newspack_Newsletters */ diff --git a/package-lock.json b/package-lock.json index 59be8ec7f..71685e4e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "newspack-newsletters", - "version": "3.3.2", + "version": "3.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "newspack-newsletters", - "version": "3.3.2", + "version": "3.4.0", "license": "GPL-2.0-or-later", "dependencies": { "classnames": "^2.5.1", "mjml-browser": "^4.15.3", - "newspack-components": "^3.0.0", + "newspack-components": "^3.1.0", "qs": "^6.13.0" }, "devDependencies": { @@ -17261,8 +17261,9 @@ } }, "node_modules/newspack-components": { - "version": "3.0.0", - "license": "GPL-2.0-or-later", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/newspack-components/-/newspack-components-3.1.0.tgz", + "integrity": "sha512-jQjFWmO3Z52a57ZFwKPV/rMpoUKSeNHPGrCHDTziJpRclapidqJyk9pIp4FKbks8Xc8g0zP4hH397Bk/treTJQ==", "dependencies": { "@wordpress/base-styles": "^5.0.0", "@wordpress/components": "^28.0.0", diff --git a/package.json b/package.json index dce92eb38..20e8fb021 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "newspack-newsletters", - "version": "3.3.2", + "version": "3.4.0", "description": "", "scripts": { "cm": "newspack-scripts commit", @@ -41,7 +41,7 @@ "dependencies": { "classnames": "^2.5.1", "mjml-browser": "^4.15.3", - "newspack-components": "^3.0.0", + "newspack-components": "^3.1.0", "qs": "^6.13.0" }, "devDependencies": { diff --git a/src/components/send-button/index.js b/src/components/send-button/index.js index e8df44af2..273d1c25d 100644 --- a/src/components/send-button/index.js +++ b/src/components/send-button/index.js @@ -245,7 +245,7 @@ export default compose( [ // For sent newsletters, display the generic button text. if ( isPublished || sent ) { return ( - +
); } diff --git a/src/newsletter-editor/editor/index.js b/src/newsletter-editor/editor/index.js index f84ec5fe0..81b14f2a5 100644 --- a/src/newsletter-editor/editor/index.js +++ b/src/newsletter-editor/editor/index.js @@ -49,7 +49,6 @@ const Editor = compose( [ ), meta, sent, - isPublic: meta.is_public, newsletterSendErrors: meta.newsletter_send_errors, isCustomFieldsMetaBoxActive: getAllMetaBoxes().some( box => box.id === 'postcustom' ), }; @@ -82,7 +81,6 @@ const Editor = compose( [ createNotice, html, isCustomFieldsMetaBoxActive, - isPublic, lockPostAutosaving, lockPostSaving, meta, @@ -136,6 +134,7 @@ const Editor = compose( [ // Show an editor notice if the newsletter has been sent. createNotice( 'success', successNote + dateTime, { + id: 'newspack-newsletters-campaign-sent-notice', isDismissible: false, } ); @@ -153,6 +152,7 @@ const Editor = compose( [ 'newspack-newsletters' ), { + id: 'newspack-newsletters-custom-fields-warning', isDismissible: false, actions: [ { @@ -198,16 +198,6 @@ const Editor = compose( [ } }, [ html ] ); - useEffect( () => { - // Hide post title if the newsletter is a not a public post. - const editorTitleEl = document.querySelector( '.editor-post-title' ); - if ( editorTitleEl ) { - editorTitleEl.classList[ isPublic ? 'remove' : 'add' ]( - 'newspack-newsletters-post-title-hidden' - ); - } - }, [ isPublic ] ); - return createPortal( , publishEl ); } ); diff --git a/src/newsletter-editor/editor/style.scss b/src/newsletter-editor/editor/style.scss index 1f819f8bf..751f8f839 100644 --- a/src/newsletter-editor/editor/style.scss +++ b/src/newsletter-editor/editor/style.scss @@ -1,15 +1,4 @@ .post-type-newspack_nl_cpt { - .editor-post-title { - &.newspack-newsletters-post-title-hidden { - font-size: 1em; - height: 0; - margin: -4rem 0 calc(-1 * var(--wp--style--block-gap)); - opacity: 0; - padding: 0; - pointer-events: none; - } - } - .components-button.editor-post-publish-button__button.is-primary { display: none; } diff --git a/src/newsletter-editor/store.js b/src/newsletter-editor/store.js index 53a6e81a6..f2a02df0b 100644 --- a/src/newsletter-editor/store.js +++ b/src/newsletter-editor/store.js @@ -175,7 +175,6 @@ export const fetchSendLists = debounce( async ( opts, replace = false ) => { const { name } = getServiceProvider(); const args = { type: 'list', - limit: 10, provider: name, ...opts, };