Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
d26926f4
Commit
d26926f4
authored
Aug 25, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Accessibility] Handed Symetric Tree is ok
parent
84bea376
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
8 deletions
+20
-8
Tree.css
dist/styles/Tree.css
+3
-0
Tree.sass
dist/styles/Tree.sass
+4
-2
Forest.purs
src/Gargantext/Components/Forest.purs
+9
-4
Tree.purs
src/Gargantext/Components/Forest/Tree.purs
+2
-1
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+2
-1
No files found.
dist/styles/Tree.css
View file @
d26926f4
...
...
@@ -13,6 +13,9 @@
.tree
.node-actions
.update-button.disabled
{
cursor
:
wait
;
}
.tree
.lefthanded
ul
{
margin-right
:
19px
;
}
.tree
.lefthanded
li
.leaf
{
justify-content
:
flex-end
;
}
...
...
dist/styles/Tree.sass
View file @
d26926f4
...
...
@@ -10,8 +10,10 @@
&
.disabled
cursor
:
wait
.lefthanded
li
.leaf
ul
margin-right
:
19px
li
.leaf
justify-content
:
flex-end
.righthanded
...
...
src/Gargantext/Components/Forest.purs
View file @
d26926f4
...
...
@@ -15,7 +15,7 @@ import Gargantext.Components.Forest.Tree (treeView)
import Gargantext.Ends (Frontends)
import Gargantext.Routes (AppRoute)
import Gargantext.Sessions (Session(..), Sessions, OpenNodes, unSessions)
import Gargantext.Types (Reload, Handed)
import Gargantext.Types (Reload, Handed
(..)
)
import Gargantext.Utils.Reactix as R2
type Props =
...
...
@@ -49,7 +49,8 @@ forestCpt = R.hooksComponent "G.C.Forest.forest" cpt where
)
(cpt' openNodes asyncTasks reload showLogin)
cpt' openNodes asyncTasks reload showLogin (frontends /\ route /\ sessions /\ _ /\ _ /\ _ /\ _ /\ handed) = do
pure $ R.fragment $ A.cons (plus showLogin) trees
--pure $ R.fragment $ A.cons (plus showLogin) trees
pure $ R2.row $ [plus handed showLogin] <> trees
where
trees = tree <$> unSessions sessions
tree s@(Session {treeId}) =
...
...
@@ -63,8 +64,11 @@ forestCpt = R.hooksComponent "G.C.Forest.forest" cpt where
, session: s
}
plus :: R2.Setter Boolean -> R.Element
plus showLogin =
plus :: Handed -> R2.Setter Boolean -> R.Element
plus handed showLogin = H.div {className: if handed == RightHanded
then "flex-start"
else "flex-end"
} [
H.button { on: {click}
, className: "btn btn-default"
}
...
...
@@ -75,6 +79,7 @@ plus showLogin =
--, H.div { "type": "", className: "fa fa-plus-circle fa-lg"} []
--, H.div { "type": "", className: "fa fa-minus-circle fa-lg"} []
]
]
-- TODO same as the one in the Login Modal (same CSS)
-- [ H.i { className: "material-icons md-36"} [] ]
where
...
...
src/Gargantext/Components/Forest/Tree.purs
View file @
d26926f4
...
...
@@ -133,7 +133,8 @@ loadedTreeView p = R.createElement loadedTreeViewCpt p []
, session
, tasks
, tree
} _ = pure $ H.ul { className: "tree"}
} _ = pure $ H.ul { className: "tree"
}
[ H.div { className: if handed == GT.RightHanded
then "righthanded"
else "lefthanded"
...
...
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
d26926f4
...
...
@@ -142,7 +142,8 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, handed, session } = R.createEl
{ className: "leaf " <> (dropClass droppedFile isDragOver)
, on: { drop: dropHandler droppedFile
, dragOver: onDragOverHandler isDragOver
, dragLeave: onDragLeave isDragOver } }
, dragLeave: onDragLeave isDragOver }
}
where
dropClass (Just _ /\ _) _ = "file-dropped"
dropClass _ (true /\ _) = "file-dropped"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment