GithubHelp home page GithubHelp logo

cuba-platform / frontend Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 13.0 18.09 MB

Monorepo for CUBA Platform Frontend Tools and Libraries

License: Apache License 2.0

JavaScript 10.67% CSS 0.12% HTML 7.87% TypeScript 60.89% Java 14.49% Shell 0.08% Less 0.45% SCSS 0.05% EJS 5.39%

frontend's People

Contributors

abarinovhaulmont avatar ange-diambote avatar bryanyin avatar coldhamix avatar dependabot[bot] avatar hegelpro avatar knstvk avatar vadimbasko avatar vyacheslav-pushkin avatar web-devel 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

frontend's Issues

Support all possible entity property types

  • ✅ Add support for remaining temporal fields:
localDate, localTime, localDateTime, offsetDateTime, offsetTime
  • ✅ Render InputNumber for numeric fields:
long, decimal, int, double

Support for big numbers is tracked under separate ticket #99 as it depends on REST API changes

  • ✅ Add support for masked fields. Render masked field for uuid.
  • ✅ Fix displaying of Associations:
    • Values of many-to-many Associations are not displayed in DataTable
    • Associations should be shown in the same manner as in the Generic UI:
        - One-to-many Associations are not shown anymore at the owning side
        - One-to-one Associations are not shown anymore at the inverse side
  • ✅ Do not display byteArray (similar to Generic UI)
  • ✅ Support long, uuid and all temporal types in DataTable's custom filters

React hooks support

  • update mobX
  • design data componts hooks

QA Notes

It is adviced to fully test the entity editor created with react-typescript:entity-management-hooks.

PWA approach

Document current state of the art and think of what can be improved

DataTable: filters on non-displayed fields

To reproduce

Create a dataCollection with a filter on field Х.
Feed it to a DataTable which shall not be displaying field X.

ER

No Clear filters button is shown.
Field X filter stays applied regardless of changes to the table's filters/sorters.

AR

Clear filters button is shown.
Any change to table's filters/sorters cancels the field X filter.

Resolve edit\browse component imports with same class name

Relates to scaffold editor \ browse component.
There could be case, where there is two import with same class name from different packages.

import { User } from "./cuba/entities/sec_Users";
import { User } from "./cuba/entities/app/mobile_Users";

To resolve this we need to use something like
import { User as <USER_ENTITY_NAME> } from "./cuba/entities/sec_Users";

Unclear error message when Studio cannot be reached

To reproduce

Launch a generator using CLI without providing project model and without Studio running.

ER

A message informing that Studio shall be launched / integration shall be enabled.

AR

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:48561
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Emitted 'error' event at:
    at Socket.socketErrorListener (_http_client.js:392:9)
    at Socket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Warning: SubMenu has no key prop

routing.ts is scaffolded with an example of using sub-menu.

The following warning is displayed if the code sample is applied:

Warning: Each child in a list should have a unique "key" prop.

Check the render method of `AppComponent`. See https://fb.me/react-warning-keys for more information.
    in SubMenu (at App.tsx:95)
    in AppComponent (created by inject-AppComponent-with-mainStore)
    in inject-AppComponent-with-mainStore (created by Context.Consumer)
    in injectIntl(inject-AppComponent-with-mainStore) (created by Route)
    in Route (at src/index.tsx:30)
    in Router (created by HashRouter)
    in HashRouter (at src/index.tsx:29)
    in LocaleProvider (created by Context.Consumer)
    in LocaleReceiver (created by ConfigProvider)
    in ConfigProvider (created by _class)
    in IntlProvider (created by _class)
    in _class (created by Context.Consumer)
    in Provider (created by Context.Consumer)
    in CubaAppProvider (at src/index.tsx:24)

sample-sales.zip

Need more detailed api doc

Hi,

Is there a plan to detail the api.
Currently , most of API is lacking for description. It's hard for using.

Component name generation improvements

  1. Capitalize component class name. Compilation fails if component class starts not from capital letter. There is no validation of component class name in studio, however we could capitalize component class name unconditionally in generator.
  2. Create human readable menu caption by splitting component name: CarManagement → Car Management

Provide methods to un-register listeners

Listeners like onTokenExpiry should have a corresponding remove.. method, otherwise they could point to stale objects.

For example, in my app I use mobx-state-tree to automatically keep track of auth state by tracking token validity, and I register a listener in the afterCreate lifecycle action (in MST terminology).
If the model is "destroyed" or invalidated, and then I create a new instance, the CubaApp instance would still point to the old (stale) object. In addition, this hard reference will prevent proper garbage collection of my state model.
With a remove method, I could call it in the beforeDestroy lifecycle method, thus cleaning up before destroying.

If you see fit, I'll open a PR for this as soon as I have some spare time.

Paolo

Provide paging solution out of the box

Loading unlimited amount of items make app very slow. For all pages based on collection of items (list, card, data table) paging should be switched on by default.
Current page and page size should be reflected in page url /carManagement?page=2&pageSize=10.

EntityProperty custom renderer

<EntitProperty entityName='User' 
                        propertyName='active' 
                        value={user.active}
                        renderer={(value) => <div className={'user' + value} />}>

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.