wave icon indicating copy to clipboard operation
wave copied to clipboard

Icon not rendered for ui.stat

Open mtanco opened this issue 2 years ago • 4 comments

Wave SDK Version, OS

0.21.0 - tested locally OSK and also in the Editable Tour in Internal

Actual behavior

No waving blue hand next to 100 (grey hand to show this is a valid icon image

Expected behavior

(A clear and concise description of what you expected to happen.)

Steps To Reproduce

from h2o_wave import main, app, Q, ui


@app('/')
async def serve(q: Q):
    q.page['example'] =  ui.tall_stats_card(
        box='1 1 2 4',
        items=[
            ui.stat(label='Fake', value='100', caption='test', icon='WavingHand', icon_color='blue'),
            ui.stat(label='PARAMETER NAME', value='125%'),
            ui.stat(label='PARAMETER NAME', value='578 Users'),
            ui.stat(label='PARAMETER NAME', value='25K')
        ]
    )
    q.page["header"] = ui.header_card(
        box="1 1 -1 1",
        title="",
        subtitle="",
        icon="WavingHand"
    )
    
    await q.page.save()

mtanco avatar May 18 '22 17:05 mtanco

Hm.. although the API allows for icon, there is no accompanying implementation. According to https://github.com/h2oai/wave/issues/1067, the proposed design does not include icons, but I would say they can be beneficial. The question is, where should those be placed though.

mturoci avatar May 19 '22 13:05 mturoci

I'm personally okay with just getting rid of the icon... I just saw something that wasn't working.

But if we keep it probably before the Value

mtanco avatar May 19 '22 16:05 mtanco

Agree, however, we cannot get rid of APIwise so I will add a comment to tall_stats that icons are not yet supported until we figure out the proper designs.

Done in ed54c4183ac49287f46f76c2e68cdb9fff943c79

mturoci avatar May 20 '22 07:05 mturoci

it'd be useful to have this feature / icons in a tall stats card

azim-b avatar May 20 '22 23:05 azim-b