Giter Site home page Giter Site logo

scommons / scommons-react-native Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 2.0 20.99 MB

Scala.js facades for react-native and expo APIs and components

Home Page: https://scommons.github.io/scommons-react-native/

License: Apache License 2.0

Scala 97.86% JavaScript 2.06% Shell 0.08%
scala scalajs scalajs-reactjs react-native scala-facade reactnative mobile facades expo scala-facades

scommons-react-native's Introduction

CI Coverage Status scala-index Scala.js

Scala Commons Client

Common Scala.js, React.js web-client utilities and components.

Showcase/Demo UI

To see the showcase/demo UI with all the components live use the following link:

https://scommons.github.io/scommons-client/showcase/

How to add it to your project

val scommonsApiVer = "1.0.0-SNAPSHOT"
val scommonsReactVer = "1.0.0-SNAPSHOT"
val scommonsClientVer = "1.0.0-SNAPSHOT"
val scommonsServiceVer = "1.0.0-SNAPSHOT"

libraryDependencies ++= Seq(
  // shared
  "org.scommons.api" %%% "scommons-api-core" % scommonsApiVer,
  "org.scommons.api" %%% "scommons-api-joda-time" % scommonsApiVer,

  // client/js only
  "org.scommons.api" %%% "scommons-api-xhr" % scommonsApiVer,
  "org.scommons.client" %%% "scommons-client-ui" % scommonsClientVer,
  "org.scommons.react" %%% "scommons-react-test-dom" % scommonsReactVer % "test",

  // server/jvm only
  "org.scommons.service" %% "scommons-service-play" % scommonsServiceVer,
  "org.scommons.api" %% "scommons-api-play-ws" % scommonsApiVer % "test"
)

Latest SNAPSHOT version is published to Sonatype Repo, just make sure you added the proper dependency resolver to your build.sbt settings:

resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

How to use it

How to Build

To build and run all the tests use the following command:

sbt clean test

How to Run Showcase/Demo locally

Please, see the README.md in showcase sub-project page.

Documentation

You can find more documentation here

scommons-react-native's People

Contributors

dependabot[bot] avatar viktor-podzigun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

myyk capesepias

scommons-react-native's Issues

barest bones hello world example required

newcomers would be confused if they are just to understand how everything is wired. a barest bone hello world example, will be helpful in getting to understand the just the wiring.

Alert does not show up right after Modal was hidden

In the scommons.reactnative.app.AppTaskManagerUi component's render method we display react-native's Modal (via LoadingPopup) first and then if there is any error we hide it and show ErrorPopup which uses react-native's Alert API to show native alert popup:

    <.>()(
      <(TaskLogger())(^.wrapped := TaskLoggerProps(statusMessage))(),
      
      if (props.showLoading) Some(
        <(LoadingPopup())(^.wrapped := loadingProps)()
      ) else if (showError) Some(
        <(ErrorPopup())(^.wrapped := ErrorPopupProps(
          error = errorMessage,
          onClose = props.onCloseErrorPopup,
          details = props.errorDetails
        ))()
      ) else None
    )

Current issue is that Alert is not always shows up. When Modal is not used the Alert is always shows up. So, the issue is clearly related to the previously shown Modal.

As a quick fix for now we may consider inserting small delay, ~100ms should be enough (we should test it!) before Alert is shown to let Modal completely disappear:

    useEffect({ () =>
      if (!showDetails) {
        // fix Alert is not showing just after loading modal is closed
        setTimeout({ () =>
          showAlert()
        }, 100)
      }
      else {
        showAlert()
      }
      ()
    }, List(showDetails))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.