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

Create HTML elements #56

Closed
7 tasks
Tracked by #50
mofojed opened this issue Sep 18, 2023 · 1 comment · Fixed by #47
Closed
7 tasks
Tracked by #50

Create HTML elements #56

mofojed opened this issue Sep 18, 2023 · 1 comment · Fixed by #47

Comments

@mofojed
Copy link
Member

mofojed commented Sep 18, 2023

Add a deephaven.ui.html package that contains some basic building blocks for HTML elements.

Example usage:

import deephaven.ui as ui
import deephaven.ui.html as html

@ui.component
def my_component():
  return html.div(
    html.h1('Hello'),
    html.span('Some red text', color='#ff0000')
  )

Element should be generic to allow any basic HTML tag with any serializable attributes. Event listeners are not required for this.

Some example HTML elements:

  • div
  • span
  • h1 - h6
  • p
  • a
  • ul, ol, li
  • table, thead, tbody, tr, th, td
@dsmmcken
Copy link
Contributor

I think this is way way lower priority.

I wouldn't want people unintentionally using raw html elements when a better equivalent spectrum component exists. Also they will lack a consistent way to be styled which gives them limited utility. I am not sure we get much value from offering these a components, and would rather take a more hand holding approach.

div is a view
p is text
h1 - h6 is heading
a is link
table is tableview, but we also have our tables

span and list is absent, but we kind of have that if we do a markdown component, which I think is more valuable. If there aren't event listeners, this doesn't add much value. If you are thinking of these as something users could use as building blocks for higher level components, I would say that should be done as a js plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants