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
141
Issues
141
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
gargantext
purescript-gargantext
Commits
058fa2fe
Verified
Commit
058fa2fe
authored
Sep 08, 2023
by
Przemyslaw Kaminski
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ngrams] remove ngramsValidPatch from state
parent
09b2a0e7
Pipeline
#4586
failed with stage
in 0 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
14 deletions
+4
-14
Types.purs
src/Gargantext/Components/Document/Types.purs
+0
-1
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+0
-1
Tree.purs
src/Gargantext/Components/NgramsTable/Tree.purs
+0
-1
Functions.purs
src/Gargantext/Core/NgramsTable/Functions.purs
+4
-9
Types.purs
src/Gargantext/Core/NgramsTable/Types.purs
+0
-2
No files found.
src/Gargantext/Components/Document/Types.purs
View file @
058fa2fe
...
...
@@ -35,7 +35,6 @@ initialState
initialState {loaded: {ngramsTable: Versioned {version}}} =
{ ngramsLocalPatch: mempty
, ngramsStagePatch: mempty
, ngramsValidPatch: mempty
, ngramsSelection : mempty
, ngramsVersion: version
}
...
...
src/Gargantext/Components/NgramsTable.purs
View file @
058fa2fe
...
...
@@ -93,7 +93,6 @@ initialState =
{ ngramsLocalPatch: mempty
, ngramsSelection: mempty
, ngramsStagePatch: mempty
, ngramsValidPatch: mempty
, ngramsVersion: 0
}
...
...
src/Gargantext/Components/NgramsTable/Tree.purs
View file @
058fa2fe
...
...
@@ -340,7 +340,6 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt
tbl :: NgramsTable
tbl = applyNgramsPatches { ngramsLocalPatch
, ngramsStagePatch: mempty
, ngramsValidPatch: mempty
, ngramsVersion: 0 } ngramsTable
getNgramsChildren' :: NgramsTerm -> Array NgramsTerm
getNgramsChildren' n = A.fromFoldable $ ngramsChildren n
...
...
src/Gargantext/Core/NgramsTable/Functions.purs
View file @
058fa2fe
...
...
@@ -362,8 +362,8 @@ applyNgramsTablePatch (NgramsTablePatch ngramsPatches) (NgramsTable m) =
applyPatchMap applyNgramsPatch ngramsPatches m.ngrams_repo_elements }
applyNgramsPatches :: forall s. CoreState s -> NgramsTable -> NgramsTable
applyNgramsPatches {
ngramsLocalPatch, ngramsStagePatch, ngramsValidPatch
} =
applyNgramsTablePatch (
ngramsLocalPatch <> ngramsStagePatch <> ngramsValidPatch
)
applyNgramsPatches {
ngramsLocalPatch, ngramsStagePatch
} =
applyNgramsTablePatch (
ngramsLocalPatch <> ngramsStagePatch
)
-- First the valid patch, then the stage patch, and finally the local patch.
{-
...
...
@@ -436,9 +436,7 @@ syncPatches props state callback = do
s {
ngramsLocalPatch = fromNgramsPatches mempty
, ngramsStagePatch = fromNgramsPatches mempty
, ngramsValidPatch = fromNgramsPatches mempty
-- , ngramsValidPatch = fromNgramsPatches newPatch <> ngramsLocalPatch <> s.ngramsValidPatch
-- First the already valid patch, then the local patch, then the newly received newPatch.
-- First the local patch, then the newly received newPatch.
, ngramsVersion = newVersion
}) state
here.log2 "[syncPatches] ngramsVersion" newVersion
...
...
@@ -449,7 +447,6 @@ syncPatchesAsync :: forall p s. CoreParams p -> R.State (CoreState s) -> (Unit -
syncPatchesAsync props@{ listIds, tabType }
({ ngramsLocalPatch: ngramsLocalPatch@{ ngramsPatches }
, ngramsStagePatch
, ngramsValidPatch
, ngramsVersion
} /\ setState) callback = do
when (isEmptyNgramsTablePatch ngramsStagePatch) $ do
...
...
@@ -463,8 +460,7 @@ syncPatchesAsync props@{ listIds, tabType }
s {
ngramsLocalPatch = fromNgramsPatches mempty
, ngramsStagePatch = fromNgramsPatches mempty
, ngramsValidPatch = fromNgramsPatches newPatch <> ngramsLocalPatch <> s.ngramsValidPatch
-- First the already valid patch, then the local patch, then the newly received newPatch.
-- First the local patch, then the newly received newPatch.
, ngramsVersion = newVersion
}
here.log2 "[syncPatches] ngramsVersion" newVersion
...
...
@@ -526,7 +522,6 @@ coreDispatch _ state (CommitPatch pt) =
coreDispatch _ state ResetPatches =
T.modify_ (_ { ngramsLocalPatch = mempty :: NgramsTablePatch
, ngramsSelection = mempty :: Set NgramsTerm
-- , ngramsValidPatch = mempty :: NgramsTablePatch
}) state
isSingleNgramsTerm :: NgramsTerm -> Boolean
...
...
src/Gargantext/Core/NgramsTable/Types.purs
View file @
058fa2fe
...
...
@@ -507,8 +507,6 @@ type CoreState s =
, ngramsStagePatch :: NgramsTablePatch
-- ^ These patches are staged (scheduled for synchronization).
-- Requests are being performed at the moment.
, ngramsValidPatch :: NgramsTablePatch
-- ^ These patches have been synchronized with the server.
, ngramsVersion :: Version
| s
}
...
...
Przemyslaw Kaminski
@cgenie
mentioned in commit
77ad2d50
·
Sep 28, 2023
mentioned in commit
77ad2d50
mentioned in commit 77ad2d504ff471ef1d629ab2d703bd7c587d8e6b
Toggle commit list
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