Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
P
purescript-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 135
    • Issues 135
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 5
    • Merge Requests 5
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • purescript-gargantext
  • Issues
  • #402

Closed
Open
Opened May 25, 2022 by arturo@pdominique
  • Report abuse
  • New issue
Report abuse New issue

[ngrams] Auto sync request handling should return an Either

As a user, when I'm navigating on a Node Document, I can modify and add ngrams. Each modifications are now saved automatically. When saving has been made, the spinner stops accordingly. Unfortunately, when an error occur (eg. Backend issue), no visual difference is shown. I want a UI feedback underlying to me that an error occurred.

Coding steps

  • in the Gargantext.Components.NgramsTable.Core module, this type should have a result property returning an Either instead of a Unit
type AutoSyncOutput =
  -- @XXX: cannot use an Either here due to the mecanism of `syncPatches` only
  --       returning an `Aff Unit`
  -- ( result :: T.Box (Maybe (Either RESTError Unit))
  ( result    :: T.Box (Maybe Unit)
  , onPending :: T.Box Boolean
  )
  • in the same module, the syncPatches variable should log on Left::Either the error

  • in the same module, the syncPatches variable should return an Effect (Either RESTError Unit) instead of a Effect Unit, so that later process could handle differently the request response (ie. late UI changes)

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
toDiscuss
Assign labels
  • View project labels
Reference: gargantext/purescript-gargantext#402