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: support opening new tab in markdown button #12213

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

bowenliang123
Copy link
Contributor

@bowenliang123 bowenliang123 commented Dec 30, 2024

Summary

We need to define one new attribute data-link.

  • data-link: controls the URL for new page

Note:

  • NO breaking chages in frontend usage. Previously, markdown display supported opending URLs in <a href="..."></a>

  • Example:

<button data-link="http://https://dify.ai/" data-variant="primary" data>Dify</button>

Screenshots

Before After
... image

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code. 💪 enhancement New feature or request labels Dec 30, 2024
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Dec 30, 2024
@bowenliang123
Copy link
Contributor Author

cc @crazywoola

@bowenliang123 bowenliang123 changed the title feat: support open new tab with link in markdown button feat: support opening new tab in markdown button Dec 30, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 30, 2024
@crazywoola crazywoola merged commit ab469aa into langgenius:main Dec 30, 2024
4 checks passed
@bowenliang123 bowenliang123 deleted the md-button-link branch December 31, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants