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

Markdown table formatting has been broken #2339

Closed
dulajra opened this issue Jun 4, 2024 · 4 comments · Fixed by #2341
Closed

Markdown table formatting has been broken #2339

dulajra opened this issue Jun 4, 2024 · 4 comments · Fixed by #2341
Labels
bug Bug in code ui Related to UI

Comments

@dulajra
Copy link
Contributor

dulajra commented Jun 4, 2024

Wave SDK Version, OS

Wave 1.1.0

Actual behavior

Screenshot 2024-06-04 at 16 01 43

Expected behavior

Screenshot 2024-06-04 at 16 02 26

Steps To Reproduce

from h2o_wave import site, ui, main


def make_markdown_row(values):
    return f"| {' | '.join([str(x) for x in values])} |"


def make_markdown_table(fields, rows):
    return '\n'.join([
        make_markdown_row(fields),
        make_markdown_row('-' * len(fields)),
        '\n'.join([make_markdown_row(row) for row in rows]),
    ])


page = site['/demo']

fields = ['Column 1', 'Column 2']
rows = [['Row 1 Column 1', 'Row 1 Column 2'], ['Row 2 Column 1', 'Row 2 Column 2']]

v = page.add('example', ui.form_card(
    box='1 1 4 5',
    items=[
        ui.text(make_markdown_table(
            fields=fields,
            rows=rows
        ),),
    ],
))

page.save()

@dulajra dulajra added the bug Bug in code label Jun 4, 2024
@dulajra
Copy link
Contributor Author

dulajra commented Jun 4, 2024

@mturoci Can you please check? Assign option is disabled for me. cc: @jakubhava

@jakubhava
Copy link
Collaborator

We are not looking necessarily for a fix @mturoci , if you could please suggest a workaround if any, that would be great as well

@mturoci
Copy link
Collaborator

mturoci commented Jun 4, 2024

Seems like a build problem of some sort:

image

@marek-mihok any ideas?

@mturoci mturoci added the ui Related to UI label Jun 4, 2024
marek-mihok added a commit that referenced this issue Jun 4, 2024
marek-mihok added a commit that referenced this issue Jun 5, 2024
@marek-mihok
Copy link
Contributor

@marek-mihok any ideas?

@mturoci, vite build had problem with this React.useEffect(() => { import('./markdown.css') }, []), also if awaited.

Fixed by #2341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in code ui Related to UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants