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

feat(flavored-markdown): add support for file url clicks #2225

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

bsahitya
Copy link
Collaborator

Description

  • File url click support in Markdown and FlavoredMarkdown components
  • Theming for code-editor web component

What's included?

  • Add an input property called fileLinkExtensions and an output event called fileClicked in Markdown and FlavoredMarkdown components.
  • For all the links which end with the provided file extensions the default click behavior will be prevented and an output event will be emitted. Consumers can capture this event and handle the click logic.
  • When the hostedUrl property is set, this will be prepended to all file links.
  • Theming for code-editor web component. Note: We might need to create custom themes for supported languages.

Test Steps

  • npm run start
  • Run the docs app
  • Open Markdown or FlavoredMarkdown component demos and pass the hostedURL and fileLinkExtensions properties. Add links which end with these extensions in the markdown content and verify the click action.

General Tests for Every PR

  • npm run start still works.
  • npm run lint passes.
  • npm run stylelint passes.
  • npm test passes and code coverage is not lower.
  • npm run build still works.
Screenshots or link to StackBlitz/Plunker

File links
filelinks

Code-editor
Screenshot 2024-08-15 at 5 34 53 PM
Screenshot 2024-08-15 at 5 35 06 PM

@bsahitya bsahitya changed the title feat(flavored-markdown): add suuport for file url clicks feat(flavored-markdown): add support for file url clicks Aug 15, 2024
Copy link
Collaborator

@owilliams320 owilliams320 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@owilliams320 owilliams320 merged commit 51f4a3c into main Aug 19, 2024
7 checks passed
@owilliams320 owilliams320 deleted the feat/flavored-markdown-file-urls branch August 19, 2024 14:12
@owilliams320
Copy link
Collaborator

🎉 This PR is included in version 8.20.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

2 participants