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
6f08b72a
Commit
6f08b72a
authored
Oct 24, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/446-dev-cache-cta-rc0.x' into dev
parents
28871fe2
8726bce0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
39 deletions
+39
-39
Table.purs
src/Gargantext/Components/Table.purs
+35
-27
_list.sass
src/sass/_legacy/_list.sass
+4
-12
No files found.
src/Gargantext/Components/Table.purs
View file @
6f08b72a
...
@@ -4,14 +4,13 @@ import Gargantext.Prelude
...
@@ -4,14 +4,13 @@ import Gargantext.Prelude
import Data.Array as A
import Data.Array as A
import Data.Either (Either(..))
import Data.Either (Either(..))
import Data.Foldable (intercalate)
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Data.Sequence as Seq
import Data.Sequence as Seq
import Effect (Effect)
import Effect (Effect)
import Effect.Aff (launchAff_)
import Effect.Aff (launchAff_)
import Effect.Class (liftEffect)
import Effect.Class (liftEffect)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (
Elevation
(..), Variant(..))
import Gargantext.Components.Bootstrap.Types (
ButtonVariant
(..), Variant(..))
import Gargantext.Components.FolderView as FV
import Gargantext.Components.FolderView as FV
import Gargantext.Components.Forest.Tree.Node.Action.Rename (RenameValue(..), rename)
import Gargantext.Components.Forest.Tree.Node.Action.Rename (RenameValue(..), rename)
import Gargantext.Components.Nodes.Corpus (saveCorpus)
import Gargantext.Components.Nodes.Corpus (saveCorpus)
...
@@ -106,10 +105,28 @@ tableHeaderWithRenameBoxedLayout = R.createElement tableHeaderWithRenameBoxedLay
...
@@ -106,10 +105,28 @@ tableHeaderWithRenameBoxedLayout = R.createElement tableHeaderWithRenameBoxedLay
tableHeaderWithRenameBoxedLayoutCpt :: R.Component TableHeaderWithRenameBoxedLayoutProps
tableHeaderWithRenameBoxedLayoutCpt :: R.Component TableHeaderWithRenameBoxedLayoutProps
tableHeaderWithRenameBoxedLayoutCpt = here.component "tableHeaderWithRenameBoxedLayoutCpt" cpt
tableHeaderWithRenameBoxedLayoutCpt = here.component "tableHeaderWithRenameBoxedLayoutCpt" cpt
where
where
cpt { hyperdata: Hyperdata h, nodeId, session, cacheState, name, date, corpusInfoS} _ = do
cpt { hyperdata: Hyperdata h
, nodeId
, session
, cacheState
, name
, date
, corpusInfoS
} _ = do
-- | States
-- |
cacheState' <- T.useLive T.unequal cacheState
cacheState' <- T.useLive T.unequal cacheState
CorpusInfo {title, desc, query, authors} <- T.read corpusInfoS
CorpusInfo {title, desc, query, authors} <- T.read corpusInfoS
-- | Hooks
-- |
topBarPortalKey <- pure $ "portal-topbar::" <> show nodeId
mTopBarHost <- R.unsafeHooksEffect $ R2.getElementById "portal-topbar"
-- | Render
-- |
pure $
pure $
H.div
H.div
...
@@ -155,30 +172,24 @@ tableHeaderWithRenameBoxedLayoutCpt = here.component "tableHeaderWithRenameBoxed
...
@@ -155,30 +172,24 @@ tableHeaderWithRenameBoxedLayoutCpt = here.component "tableHeaderWithRenameBoxed
, onRename: onRenameQuery
, onRename: onRenameQuery
}
}
,
,
H.div
-- [To Topbar portal]
{ className: intercalate " "
-- @NOTE #446: UI flicker artfact when user toggle the CTA
[ "table-header-rename__cache"
-- This is due to a re-render + portal input focus -- lost
, cacheState' == NT.CacheOn ?
R2.createPortal' mTopBarHost
"table-header-rename__cache--on" $
[
""
R2.fragmentWithKey topBarPortalKey
]
}
[
[
H.span
B.button
{ className: "table-header-rename__cache__text"
{ className: "table-header-rename__cache-toolbar"
, on: { click: cacheClick cacheState }
, callback: cacheClick cacheState
, variant: cacheState' == NT.CacheOn ?
ButtonVariant Light $
OutlinedButtonVariant Light
}
}
[
[
H.text $ cacheText cacheState'
H.text $ cacheText cacheState'
]
]
,
]
B.iconButton
{ name: cacheToggle cacheState'
, className: "table-header-rename__cache__button"
, variant: Secondary
, elevation: Level1
, callback: cacheClick cacheState
}
]
]
]
]
,
,
...
@@ -232,9 +243,6 @@ tableHeaderWithRenameBoxedLayoutCpt = here.component "tableHeaderWithRenameBoxed
...
@@ -232,9 +243,6 @@ tableHeaderWithRenameBoxedLayoutCpt = here.component "tableHeaderWithRenameBoxed
save {fields: newFields, session, nodeId}
save {fields: newFields, session, nodeId}
cacheToggle NT.CacheOn = "toggle-on"
cacheToggle NT.CacheOff = "toggle-off"
cacheText NT.CacheOn = "Cache On"
cacheText NT.CacheOn = "Cache On"
cacheText NT.CacheOff = "Cache Off"
cacheText NT.CacheOff = "Cache Off"
...
...
src/sass/_legacy/_list.sass
View file @
6f08b72a
...
@@ -189,18 +189,10 @@ $renameable-icon-width: 16px
...
@@ -189,18 +189,10 @@ $renameable-icon-width: 16px
flex-grow
:
1
flex-grow
:
1
margin-left
:
space-x
(
4
)
margin-left
:
space-x
(
4
)
&
__cache
&
__cache-toolbar
margin-top
:
space-x
(
2
)
width
:
$topbar-fixed-button-width
margin-left
:
$topbar-item-margin
&
--on
margin-right
:
$topbar-item-margin
font-weight
:
bold
&
__button
margin-left
:
$renameable-button-margin
color
:
$secondary
&
__text
@include
clickable
&
__calendar
&
__calendar
...
...
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