Commit cc8a92c0 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[DOC+FIX] User Doc (title) + warning (Types)

parent 4eac6682
......@@ -24,7 +24,6 @@ import Gargantext.Prelude (Unit, bind, const, discard, pure, show, unit, ($), (+
import Gargantext.Routes as Routes
import Gargantext.Sessions (Session, get, put, sessionId)
import Gargantext.Types (NodeType(..))
import Gargantext.Utils.Reactix as R2
display :: String -> Array R.Element -> R.Element
display title elems =
......
......@@ -54,37 +54,44 @@ ngramsViewCpt = R.hooksComponent "G.C.N.L.T.ngramsView" cpt
chartType <- R.useState' Histo
pure $ R.fragment
( charts tabNgramType chartType
<> [
NT.mainNgramsTable
{session, defaultListId, nodeId: corpusId, tabType, tabNgramType, withAutoUpdate: false}
]
)
$ charts tabNgramType chartType
<> [ NT.mainNgramsTable { session
, defaultListId
, nodeId: corpusId
, tabType
, tabNgramType
, withAutoUpdate: false
}
]
where
tabNgramType = modeTabType mode
tabType = TabCorpus (TabNgramType tabNgramType)
listId = defaultListId
path = {corpusId, listId, tabType, limit: (Just 1000)}
tabType = TabCorpus (TabNgramType tabNgramType)
listId = defaultListId
path = {corpusId, listId, tabType, limit: (Just 1000)}
charts CTabTerms (chartType /\ setChartType) = [
H.div { className: "row chart-type-selector" } [
H.div { className: "col-md-3" } [
R2.select { className: "form-control"
, on: { change: \e -> setChartType $ const $ fromMaybe Histo $ chartTypeFromString $ R2.unsafeEventValue e }
, on: { change: \e -> setChartType
$ const
$ fromMaybe Histo
$ chartTypeFromString
$ R2.unsafeEventValue e
}
, defaultValue: show chartType } [
H.option { value: show Histo } [ H.text $ show Histo ]
, H.option { value: show Scatter } [ H.text $ show Scatter ]
, H.option { value: show ChartBar } [ H.text $ show ChartBar ]
H.option { value: show Histo } [ H.text $ show Histo ]
, H.option { value: show Scatter } [ H.text $ show Scatter ]
, H.option { value: show ChartBar } [ H.text $ show ChartBar ]
, H.option { value: show ChartTree } [ H.text $ show ChartTree ]
]
]
]
, getChartFunction chartType $ { session, path }
]
charts _ _ = [ chart mode ]
chart Authors = pie { session, path }
chart Sources = bar { session, path }
chart Institutes = tree { session, path }
charts _ _ = [ chart mode ]
chart Authors = pie { session, path }
chart Sources = bar { session, path }
chart Institutes = tree { session, path }
chart Terms = metrics { session, path }
......@@ -46,6 +46,7 @@ type KeyProps = (
textsLayoutWithKey :: Record KeyProps -> R.Element
textsLayoutWithKey props = R.createElement textsLayoutWithKeyCpt props []
textsLayoutWithKeyCpt :: R.Component KeyProps
textsLayoutWithKeyCpt = R.hooksComponent "G.C.N.T.textsLayoutWithKey" cpt
where
cpt { frontends, nodeId, session } _ = do
......
......@@ -21,7 +21,9 @@ tabsCpt = R.hooksComponent "G.C.Tab.tabs" cpt
pure $
H.div {}
[ H.nav {}
[ H.div { className: "nav nav-tabs" }
[ H.div { className: "nav nav-tabs"
, title : "Tab for ngrams"
}
(mapWithIndex (button setActiveTab activeTab) props.tabs) ]
, H.div { className: "tab-content" } $ mapWithIndex (item activeTab) props.tabs ]
button setActiveTab selected index (name /\ _) =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment