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

Fix preview links and button for emails #7590

Merged
merged 6 commits into from
Apr 18, 2024
Merged

Conversation

merkushin
Copy link
Member

@merkushin merkushin commented Apr 15, 2024

Resolves #7458

In the issue it is said, that "View Email" link is broken, but when I started testing, other places had also incorrect link.

There were changes in Gutenberg that broke our preview buttons:

  • For example, changes in this PR made our EmailPreviewButton not working: Could we just delete this component and all related code?
    (I'm still looking for information about it more.)
  • Here is the change for the View post link, that was originally introduced here and later moved to this place with a new name. (Not sure about underlying changes.)

Proposed Changes

  • Filter the preview link.
  • Remove email-preview-button component.

Testing Instructions

  1. Go to Sensei LMS -> Settings -> Emails
  2. Open one of the email in the editor.
  3. Make sure the preview button in the top bar works, and the URL in the sidebar is also correct and works.
  4. Make a change in the email content and click "Update".
  5. The notice with text "View Email" appears.
  6. Click on "View Email" and make sure you see the email preview.
  7. Go to Posts/Pages/Courses and makes sure their View/Preview links work properly.

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Acceptance criteria is met
  • Decisions are publicly documented
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • New UIs match the designs
  • Different user privileges (admin, teacher, subscriber) are tested as appropriate
  • Legacy courses (course without blocks) are tested
  • Code is tested on the minimum supported PHP and WordPress versions
  • User interface changes have been tested on the latest versions of Chrome, Firefox and Safari
  • "Needs Documentation" label is added if this change requires updates to documentation
  • Known issues are created as new GitHub issues

@merkushin merkushin added this to the 4.23.1 milestone Apr 15, 2024
@merkushin merkushin requested a review from a team April 15, 2024 03:54
@merkushin merkushin self-assigned this Apr 15, 2024
Copy link

Test the previous changes of this PR with WordPress Playground.

Copy link

Test the previous changes of this PR with WordPress Playground.

@donnapep donnapep modified the milestones: 4.23.1, 4.23.2 Apr 15, 2024
@m1r0
Copy link
Member

m1r0 commented Apr 15, 2024

Is this ready for review?

Copy link

Test the previous changes of this PR with WordPress Playground.

Copy link

Test the previous changes of this PR with WordPress Playground.

Copy link

Test the previous changes of this PR with WordPress Playground.

@merkushin merkushin marked this pull request as ready for review April 17, 2024 08:07
Copy link
Collaborator

@donnapep donnapep left a comment

Choose a reason for hiding this comment

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

Works great!

@merkushin merkushin merged commit e337f4c into trunk Apr 18, 2024
23 checks passed
@merkushin merkushin deleted the fix/email-preview-link branch April 18, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking on "View Email" after editing email displays archive page
3 participants