JuliaGizmos / Escher.jl

Composable Web UIs in Julia
https://juliagizmos.github.io/Escher.jl
Other
335 stars 63 forks source link

`icon(::String)` generates nothing; tabs and pages display like plain text. #205

Open cihga39871 opened 6 years ago

cihga39871 commented 6 years ago

Code

using Escher

tabbar = tabs([
    hbox(icon("face"), hskip(1em), "File"),
    hbox(icon("explore"), hskip(1em), "View"),
    hbox(icon("explore"), hskip(1em), "Table"),
    hbox(icon("explore"), hskip(1em), "Stat"),
    hbox(icon("extension"), hskip(1em), "History"),
])

page_file = begin
    plaintext("Hello, World!")
end

page_view = begin
    plaintext("Hello, World!")
end

page_table = begin
    plaintext("Hello, World!")
end

page_stat = begin
    plaintext("Hello, World!")
end

page_history = begin
    plaintext("Hello, World!")
end

tabcontent = pages([
    page_file,
    page_view,
    page_table,
    page_stat,
    page_history
])

t, p = wire(tabbar, tabcontent, :tab_channel, :selected)

function main(window)
    vbox(t, p)
end

Result in Chrome

File View Table Stat History Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!

Environment

julia> VERSION
v"0.5.1"

julia> Pkg.status()
13 required packages:
 - ArgParse                      0.4.0              22f66720 (dirty)
 - BuildExecutable               0.1.1              f1a26459 (dirty)
 - ComposeDiff                   0.0.2
 - Crayons                       0.2.0
 - DataFrames                    0.8.5              49da3ccc (dirty)
 - DocOpt                        0.2.1
 - Escher                        0.3.3+             master
 - Gadfly                        0.5.3              bc5d4e13 (dirty)
 - HypothesisTests               0.5.1
 - OhMyREPL                      0.1.0
 - Plotly                        0.1.1+             master (dirty)
 - RCall                         0.6.4              a782a65f (dirty)
 - Rmath                         0.1.6              ee002e9e (dirty)
110 additional packages:
 - ASTInterpreter                0.0.4
 - AbstractTrees                 0.0.4
 - AxisAlgorithms                0.1.6              6cbd6b9f (dirty)
 - BinDeps                       0.4.7              461c08f8 (dirty)
 - Blink                         0.5.2              56042381 (dirty)
 - BufferedStreams               0.3.2              cf9b40bb (dirty)
 - COFF                          0.0.2
 - CRC                           1.2.0
 - Calculus                      0.2.0              35eb6eb3 (dirty)
 - CategoricalArrays             0.1.2              a4b9929a (dirty)
 - Codecs                        0.3.0              3413ecbd (dirty)
 - ColorTypes                    0.3.4              3fedf202 (dirty)
 - Colors                        0.7.3              d479df3f (dirty)
 - Combinatorics                 0.4.1
 - Compat                        0.19.0             9a955372 (dirty)
 - Compose                       0.4.5              2337062a (dirty)
 - Contour                       0.2.0              de133850 (dirty)
 - DBI                           0.0.0-             master (unregistered)
 - DWARF                         0.1.0
 - DataArrays                    0.3.12             2f235b4d (dirty)
 - DataStructures                0.5.3              63038135 (dirty)
 - DateParser                    0.1.1
 - Dates                         0.4.4
 - DiffBase                      0.0.4              f4e8031f (dirty)
 - Distances                     0.4.1              80b6c027 (dirty)
 - Distributions                 0.12.1             f4535a6f (dirty)
 - DocStringExtensions           0.3.3              657107d3 (dirty)
 - Documenter                    0.10.2
 - DualNumbers                   0.2.3              dfff5325 (dirty)
 - ELF                           0.1.0
 - Faker                         0.0.3
 - FileIO                        0.3.0              15058b17 (dirty)
 - FixedPointNumbers             0.3.4              852909e2 (dirty)
 - FixedSizeArrays               0.2.5              abcf7a6f (dirty)
 - Flax                          0.0.0-             master (unregistered)
 - ForwardDiff                   0.3.4              62ad04b6 (dirty)
 - FunctionalCollections         0.3.2
 - GZip                          0.2.20             69b67654 (dirty)
 - Gallium                       0.0.4
 - Genie                         0.0.0-             master (unregistered)
 - Gumbo                         0.3.0
 - Hexagons                      0.0.4              289b4a7c (dirty)
 - Hiccup                        0.1.1              dc648d31 (dirty)
 - HttpCommon                    0.2.7              8e0ddc5e (dirty)
 - HttpParser                    0.2.0              fcc85783 (dirty)
 - HttpServer                    0.2.0              d7ad86e2 (dirty)
 - Interpolations                0.3.7              422a9347 (dirty)
 - IterTools                     0.1.0
 - IterableTables                0.0.2
 - Iterators                     0.3.0              b332f562 (dirty)
 - JSON                          0.8.3              a145d09f (dirty)
 - JuliaParser                   0.7.4
 - Juno                          0.2.6              3c281453 (dirty)
 - KernelDensity                 0.3.0              cf968620 (dirty)
 - LaTeXStrings                  0.2.1              a72f3809 (dirty)
 - Lazy                          0.11.6             8ac86785 (dirty)
 - Libz                          0.2.4              2911ad2a (dirty)
 - LineSearches                  0.1.5              007640e2 (dirty)
 - Lint                          0.3.0
 - Loess                         0.1.0              e61cc8a1 (dirty)
 - Lumberjack                    2.1.1
 - MachO                         0.0.4
 - MacroTools                    0.3.4              8ded9288 (dirty)
 - Markdown                      0.3.0
 - MbedTLS                       0.4.5              173250ee (dirty)
 - Measures                      0.0.3              82bde724 (dirty)
 - Media                         0.2.5              424bcbd2 (dirty)
 - Memoize                       0.2.0
 - Millboard                     0.1.0
 - Mocking                       0.3.3
 - Mustache                      0.1.4              37fed255 (dirty)
 - Mux                           0.2.3              c83c0572 (dirty)
 - NaNMath                       0.2.2              6da4a4ea (dirty)
 - NamedTuples                   2.1.0
 - Nettle                        0.3.0
 - NullableArrays                0.1.0              55fcc416 (dirty)
 - ObjFileBase                   0.0.4
 - OpenGene                      0.1.10             10a3f9e6 (dirty)
 - Optim                         0.7.7              e95033d4 (dirty)
 - PDMats                        0.5.6              46876672 (dirty)
 - Patchwork                     0.4.0
 - PlotlyJS                      0.6.2              5330d71a (dirty)
 - Polynomials                   0.1.5
 - PositiveFactorizations        0.0.4              428ff4a0 (dirty)
 - PostgreSQL                    0.0.0-             master (unregistered)
 - QuadGK                        0.1.1              ac7bcfa9 (dirty)
 - Ratios                        0.0.4              d7264b6a (dirty)
 - Reactive                      0.5.2
 - Reexport                      0.0.3              bc6a5f90 (dirty)
 - Requests                      0.4.1              cf778031 (dirty)
 - Requires                      0.3.0
 - Roots                         0.4.0
 - SHA                           0.3.1              14aaef7a (dirty)
 - SearchLight                   0.0.0-             master (unregistered)
 - Showoff                       0.0.7              11a61348 (dirty)
 - SortingAlgorithms             0.1.0              daf91266 (dirty)
 - SpecialFunctions              0.1.1              6b686c0d (dirty)
 - StackTraces                   0.1.1
 - StatsBase                     0.13.1             cb2668ba (dirty)
 - StatsFuns                     0.4.0              d6edd545 (dirty)
 - StructIO                      0.0.2
 - TerminalUI                    0.0.2
 - TextWrap                      0.1.6              fb405bec (dirty)
 - TimeZones                     0.3.0
 - Tokenize                      0.1.8
 - URIParser                     0.1.8              933fbcd2 (dirty)
 - VT100                         0.1.0
 - WebSockets                    0.2.3              eb16f726 (dirty)
 - WoodburyMatrices              0.2.2              7b40319f (dirty)
 - YAML                          0.2.1
cihga39871 commented 6 years ago

The result in chrome is just the plain text.