Giter Club home page Giter Club logo

artgallery's Introduction

Server Driven UI with Jetpack Compose version

Artboard

Features

  • Tooltips
  • Compose navigation by
  • Macrobenchmark test
  • KSP processor

Art Gallery is based on Server Driven UI, only provide a JSON and UI definition.

The SDUI allows you send new features and create reusable componentes as possible.

Definition

  1. Each JSON component must follow the following definition:

    1. render is an enum of RenderType and is the record of each component in the list.
    2. index is the component's position in the list and must not be duplicated.
    3. resource is a JSON object and therefore can be converted to some data class. Definition
  2. You must create a model capable of containing all these components, for example DataContentModel, here the header and body of our JSON are specified. Definition DataContentModel

Do it!

To create a new UI component you must follow the following steps:

  1. In the RenderType class you must register the name of the new component

  2. Create a model specific to the resource you need to convert

  3. Add the @RenderModel annotation to the model and pass the new render type you created as a parameter RenderClass

  4. Create a render factory class that extends DynamicListFactory and that will take care of managing the component

    1. The class asks for a list of compatible renders, add the one you created.
    2. If that component has an onboarding tooltip then add hasShowCaseConfigured = true
    3. In the CreateComponent function add your composable element
    4. In the CreateSkeleton function create a plain copy of your composable element, this is a skeleton!
    5. Do not forget annotate it with @ComponentFactory
  5. On the main screen add the ContextView component as follows

    1. title is the title of the screen
    2. viewModel you must create a ViewModel that extends from ContextViewModel that contains the screen information
    3. destinationsNavigator is a navigation instance
      1. dynamicListRequestModel here goes a DynamicListRequestModel object or via rememberDynamicListRequestState ContextView

Used libraries

artgallery's People

Contributors

davidsebastianfp avatar javierpe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

artgallery's Issues

Error when compile and execute

Good Morning.

Today I probe your repository but when I install the app return an error, the error is follow:
çFATAL EXCEPTION: main
Process: com.nucu.dynamiclistcompose, PID: 21616
java.lang.IllegalStateException: The NavDeepLink must have an uri, action, and/or mimeType.
at androidx.navigation.NavDeepLinkDslBuilder.build$navigation_common_release(NavDeepLinkDslBuilder.kt:60)
at androidx.navigation.NavDeepLinkDslBuilderKt.navDeepLink(NavDeepLinkDslBuilder.kt:26)
at com.javi.places.page.impl.destinations.PlacesPageDestination.getDeepLinks(PlacesPageDestination.kt:33)

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.