diff --git a/docs/index.html b/docs/index.html index 85996290b0..15a09c6d96 100644 --- a/docs/index.html +++ b/docs/index.html @@ -103,6 +103,143 @@

Cheat Sheet

TODO

Graphics

TODO

+

Change Log

+

Migration Guide

Before you begin, it is highly recommended that you download a release and run the interactive tour.py that ships with the release to get a feel for what Q programs look like in practice.

What has changed?

@@ -216,7 +353,28 @@

Breaking changes

listen('/my/app/route', main)

Removed: q.dashboard() and q.notebook().

-

Every page in Q is a dashboard page. Instead of creating a separate dashboard or notebook, simply add cards to a page and arrange it the way you want. Cards can be created by using one of the several ui.*_card() APIs. Also see the dashboard, layout and sizing examples to learn how to lay out several cards on a page.

+

Every page in Q is a dashboard page. Instead of creating a separate dashboard or notebook, simply add cards to a page and arrange it the way you want. Cards can be created by using one of the several ui.*_card() APIs. Also see the dashboard, layout and sizing examples to learn how to lay out several cards on a page.

+

If you want to display a notebook-style vertical stack of markdown, html or other content, use text() and frame() contained inside a form_card(), like this:

+

Before:

+
ui.notebook([ui.notebook_section([
+  ui.markdown_cell(content='Foo'),
+  ui.frame_cell(source=html_foo, height='200px'),
+  ui.markdown_cell(content='Bar'),
+  ui.frame_cell(source=html_bar, height='200px'),
+])])
+
+
+

After: Note the parameter name change frame_cell(source=...) to frame(content=...).

+
ui.form_cell(
+  box='1 5 2 4', 
+  items=[
+    ui.text(content='Foo'),
+    ui.frame(content=html_foo, height='200px'),
+    ui.text(content='Bar'),
+    ui.frame(content=html_bar, height='200px'),
+  ],
+)
+

Changed: buttons(), expander() and tabs() accept a list of items instead of var args *args.

Before:

ui.buttons(ui.button(...), ui.button(...), ui.button(...))
@@ -1808,6 +1966,82 @@ 

Form / File Upload

] ) +page.save() +
+

Form / Frame

+

Use a frame component in a form card to display HTML content inline.

+
from h2o_q import site, ui
+
+html = '''
+<!DOCTYPE html>
+<html>
+<body>
+  <h1>Hello World!</h1>
+</body>
+</html>
+'''
+
+page = site['/demo']
+
+page['example'] = ui.form_card(
+    box='1 1 2 2',
+    items=[
+        ui.frame(content=html, height='100px')
+    ]
+)
+
+page.save()
+
+

Form / Frame / Path

+

Use a frame component in a form card to display external web pages.

+
from h2o_q import site, ui
+
+page = site['/demo']
+
+page['example'] = ui.form_card(
+    box='1 1 6 5',
+    items=[
+        ui.frame(path='https://example.com', height='400px')
+    ]
+)
+
+page.save()
+
+

Frame

+

Use a frame card to display HTML content.

+
from h2o_q import site, ui
+
+html = '''
+<!DOCTYPE html>
+<html>
+<body>
+  <h1>Hello World!</h1>
+</body>
+</html>
+'''
+
+page = site['/demo']
+
+page['example'] = ui.frame_card(
+    box='1 1 2 2',
+    title='Example',
+    content=html,
+)
+
+page.save()
+
+

Frame / Path

+

Use a frame card to display external web pages.

+
from h2o_q import site, ui
+
+page = site['/demo']
+
+page['example'] = ui.frame_card(
+    box='1 1 6 5',
+    title='Example',
+    path='https://example.com',
+)
+
 page.save()
 

Lists

@@ -4438,6 +4672,7 @@

Index

  • Basics
  • Cheat Sheet
  • Graphics
  • +
  • Change Log
  • Migration Guide
  • +

    Frame

    + +
  • +
  • FrameCard