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

Frame card's content flickering even if not changed #1629

Closed
Far0n opened this issue Sep 19, 2022 · 0 comments
Closed

Frame card's content flickering even if not changed #1629

Far0n opened this issue Sep 19, 2022 · 0 comments
Labels
bug Bug in code ui Related to UI

Comments

@Far0n
Copy link

Far0n commented Sep 19, 2022

Wave SDK Version, OS

wave 0.22.0

Actual behavior

The content of the frame_card is flickering even if the card is not touched during a serve invokation:

firefox_RFH0Jqn7gn.mp4

Expected behavior

Contents of unchanged cards wont flicker.

Steps To Reproduce

  • Run the following app and press "click me" several times:
  • Tested in Firefox and Chrome
from h2o_wave import main, app, Q, ui

import plotly.graph_objects as go
fig = go.Figure(
    data=[go.Bar(y=[2, 1, 3])],
    layout_title_text="A Figure Displayed with fig.show()"
)
html = fig.to_html()


@app('/demo')
async def serve(q: Q):
    if not q.client.initialized:
        q.page['form1'] = ui.frame_card(box="1 1 -1 6", title="FrameCard", content=html)
        q.page['form2'] = ui.form_card(box="1 7 -1 1", items=[ui.button(name="btn", label="click me")])
        q.client.initialized = True
    else:
        # thw following is enough to make "form1" flicker on button click
        q.page['blub'] = ui.form_card(box="", items=[])

    await q.page.save()
@Far0n Far0n added the bug Bug in code label Sep 19, 2022
@mturoci mturoci added the ui Related to UI label Sep 19, 2022
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

No branches or pull requests

2 participants