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

LinkPreview widget #399

Open
Tishka17 opened this issue May 5, 2024 · 2 comments
Open

LinkPreview widget #399

Tishka17 opened this issue May 5, 2024 · 2 comments
Labels
core Something, that affects core functionality enhancement New feature or request widget New widget request, or some widget fixes

Comments

@Tishka17
Copy link
Owner

Tishka17 commented May 5, 2024

  1. If there is now LinkPreview in window - it is disabled. Can be also disabled in widget itself
  2. If it is rendered before ant text - show_above_text=True. Can be overriden by widget itself.
  3. URL - is any Text widget
  4. prefer_small_media and other bool flags can be set in widget

For example, in this code, link is shown above or below the text depedinging on when

Const("A", when="a")
LinkPreview()
Const("B", when="b")
@Tishka17
Copy link
Owner Author

Tishka17 commented May 5, 2024

this feature requires refactoring in window rendering logic

@Tishka17 Tishka17 added enhancement New feature or request widget New widget request, or some widget fixes core Something, that affects core functionality labels May 12, 2024
@Latand
Copy link
Contributor

Latand commented Sep 9, 2024

I'd do that not with a separate widget, but with link_preview_options argument in the Window class
then we just need to extend the api.entities.new_message.NewMessage class, if that's possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Something, that affects core functionality enhancement New feature or request widget New widget request, or some widget fixes
Projects
None yet
Development

No branches or pull requests

2 participants