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(Markdown): filter styles from video #2954

Merged
merged 12 commits into from
Oct 16, 2024
Merged

fix(Markdown): filter styles from video #2954

merged 12 commits into from
Oct 16, 2024

Conversation

dreamwasp
Copy link
Contributor

@dreamwasp dreamwasp commented Oct 15, 2024

Overview

Enables source tags from Video and filters out videos with a style prop

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: [ABC-123]
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

  1. Head to the Markdown story
  2. See the stories look correct
  3. Check out the portal-app PR env
  4. See the article rendering

PR Links and Envs

Repository PR Link PR Env
Portal Portal Link Portal Env

@dreamwasp dreamwasp changed the title try fix in portal fix(markdown): filter styles from video Oct 15, 2024
@dreamwasp dreamwasp changed the title fix(markdown): filter styles from video fix(Markdown): filter styles from video Oct 15, 2024
@dreamwasp dreamwasp marked this pull request as ready for review October 15, 2024 19:31
@dreamwasp dreamwasp requested a review from a team as a code owner October 15, 2024 19:31
`video`s with an `src` will be rendered by our Video component, otherwise they'll render as stated.

<video src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" title="video" />
`video`s with an `src` or a `source` video file will be rendered by our Video component, otherwise they'll render the original code. Videos with a `style` prop or another restricted prop will render their original code.
Copy link
Member

Choose a reason for hiding this comment

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

if removing the style prop works this will need to change

Copy link
Member

@jakemhiller jakemhiller left a comment

Choose a reason for hiding this comment

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

barring any weird QA discoveries this looks good to me!

renderView({ text: table });
expect(document.querySelectorAll('div.tableWrapper table').length).toEqual(
1
);
});

it('Skips rendering custom tables in markdown when skipProcessing.table is true', () => {
jest.spyOn(console, 'error').mockImplementation(jest.fn());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tried a few different ways to format the Markdown here and it all errors, can come back to the tables later

@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]

@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://670edc803a69266d1f5da908--gamut-preview.netlify.app

Deploy Logs

@dreamwasp dreamwasp added the Ship It :shipit: Automerge this PR when possible label Oct 16, 2024
@codecademydev codecademydev merged commit 51e34e4 into main Oct 16, 2024
18 of 19 checks passed
@codecademydev codecademydev removed the Ship It :shipit: Automerge this PR when possible label Oct 16, 2024
@codecademydev codecademydev deleted the cass-video-fix branch October 16, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants