question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Markdown isn't showing/rendering after cleaning the page

See original GitHub issue

Description

My app contains multiple logical pages (I am cleaning the page and adding the needed objects for the needed page).

I am using Markdown to render some texts within one of these pages (help page). I saw that when I run the page containing the markdown object, it renders correctly, but if I go to another page within the same app, and go back to the page containing the Markdown, it shows nothing.

Code example to reproduce the issue:

    def help_page(e):
        page.clean()
        add_basic_buttons(page) ### Func to add the basic buttons above
        help_msg = """ 
## About...

- aa
- bb
- cc
        """
        page. Add(
            Markdown(
                value=help_msg,
                selectable=True,
                extension_set="commonMark",
                on_tap_link=lambda e: page.launch_url(e.data),
                expand=True,
                )
        )

Describe the results you received: As said, first click on ‘Help page’ it shows the below rendered: Screenshot 2022-09-28 at 14 59 14

If I go to another page, and then come back to ‘Help page’, it doesn’t show the Markdown

Describe the results you expected:

I expect every time to render the Markdown and show the result.

Flet version (pip show flet): Name: flet Version: 0.1.52 Summary: Flet for Python - easily build interactive multi-platform apps in Python Home-page: Author: Author-email: Appveyor Systems Inc. hello@flet.dev License: MIT Requires: beartype, repath, websocket-client Required-by:

Operating system:

macOS

Additional environment details: NA

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
FeodorFitsnercommented, Sep 29, 2022

Not exactly. Before 0.1.60 Markdown control was always wrapped into “ListView” hence the requirement to make it “expand”. In 0.1.60 Markdown is no longer wrapped into ListView, so to make it scrollable you have to wrap it into ListView or put on a page with scrolling enabled. This is the issue: https://github.com/flet-dev/flet/issues/359#issuecomment-1252835569

I updated Markdown examples: A single Markdown control on a scrollable page: https://github.com/flet-dev/examples/blob/main/python/controls/markdown/markdown-test.py Multiple Markdown controls in ListViews: https://github.com/flet-dev/examples/blob/main/python/controls/markdown/markdown-listviews.py

0reactions
mkhachfehcommented, Sep 29, 2022

omg, so scrolling has been resolved on flet==0.1.60 by removing page.scroll from the code

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gatsby won't render images in Markdown but everything ...
Gatsby won't render images in Markdown but everything else works - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing ...
Read more >
Is anyone having trouble with images showing up on ...
I use django and and markdown to render ".md" blog posts. However, I cant seem to have stored images show up on my...
Read more >
SDS - Troubleshooting in R Markdown - GitHub Pages
One common way this can occur is if you failed to load a data frame provided by a package (that doesn't use lazy...
Read more >
Problems with embedding images in distill blog posts
I have a problem with images not embedding in individual blog posts on my website (built with the distill package). I've kept an...
Read more >
GitLab Flavored Markdown (GLFM)
When you view a Markdown file rendered by GitLab, front matter is displayed as-is, ... If this section isn't rendered correctly, view it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found