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,12 +54,15 @@ 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)
......@@ -71,7 +74,12 @@ ngramsViewCpt = R.hooksComponent "G.C.N.L.T.ngramsView" cpt
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 ]
......@@ -83,7 +91,6 @@ ngramsViewCpt = R.hooksComponent "G.C.N.L.T.ngramsView" cpt
, getChartFunction chartType $ { session, path }
]
charts _ _ = [ chart mode ]
chart Authors = pie { session, path }
chart Sources = bar { session, path }
chart Institutes = tree { 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