lowcode icon indicating copy to clipboard operation
lowcode copied to clipboard

Codegen: 7f Generate application index/home page

Open mat-app opened this issue 4 years ago • 1 comments

Dependencies

  1. This issue is dependent on #103

Description

Goal of this story is to generate application index page which will contains menu for generated entities. This page will be generated from template.

Proposed Solution

  • add generateAppIndexPage(template) to AppGenerator
  • this function will generate application index page according to selected ui framework
  • pick template according to ui library and replace everything what is needed
  • extend generatePages() with calling of this new method and save this file as index.tsx
  • we also have to include translate messages definitions (generated files by #101) and use them in format provider like here https://github.com/iteria-app/example-material-ui/blob/622f17a1288c83814a58d7ce9c56fc4e2e0204f7/src/App.tsx#L15 and https://github.com/iteria-app/example-material-ui/blob/622f17a1288c83814a58d7ce9c56fc4e2e0204f7/src/index.tsx#L16 and here for grommet https://github.com/iteria-app/example-grommet/blob/4c4a39c955566899c1f2f2eb46e42f9c22e62f24/src/index.tsx#L44
  • we need to use generated routes here for building menu (generating routes will be done here #91)
  • menu items for entities will be pluralized
  • text of menu item is localized message

Acceptance criteria

  • [ ] GIVEN choose to generate Customer and Product WHEN i run generatePages() THEN application index page will be generated and will contains menu item for Customers and Products

mat-app avatar May 19 '21 15:05 mat-app

We need #117 first - addMenuItem() (see https://app.diagrams.net/#G173Xc2ZPGThGWlei9SPGh6IQfGnaYiefc)

jozef-slezak avatar Jun 08 '21 04:06 jozef-slezak