Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Create app flow should use the latest dsl version #5324

Open
hetunandu opened this issue Jun 22, 2021 · 3 comments
Open

[Feature] Create app flow should use the latest dsl version #5324

hetunandu opened this issue Jun 22, 2021 · 3 comments
Assignees
Labels
Enhancement New feature or request UI Building Product Issues related to the UI Building experience UI Performance Issues related to UI performance

Comments

@hetunandu
Copy link
Member

Summary

When the client does not send a DSL for app creation, the server falls back to using an old default DSL. This causes an updated layout right after the app is created. Instead, the client should send a DSL with the latest version number to avoid this migration later on

Motivation

Improve testability, avoid unnecessary update calls, improve load time performance on new apps

@hetunandu hetunandu added Enhancement New feature or request UI Building Product Issues related to the UI Building experience UI Performance Issues related to UI performance labels Jun 22, 2021
@somangshu somangshu assigned ashit-rath and unassigned somangshu Aug 6, 2021
@sharat87
Copy link
Member

sharat87 commented Aug 10, 2021

@hetunandu, what do you think about updating the default DSL in the backend itself, instead of having the client send the initial DSL on every create-application request?

It appears to be pointing at version 4 currently:

public static String DEFAULT_PAGE_LAYOUT = "{\n" +
" \"widgetName\": \"MainContainer\",\n" +
" \"backgroundColor\": \"none\",\n" +
" \"rightColumn\": 1224,\n" +
" \"snapColumns\": 16,\n" +
" \"detachFromLayout\": true,\n" +
" \"widgetId\": \"0\",\n" +
" \"topRow\": 0,\n" +
" \"bottomRow\": 1254,\n" +
" \"containerStyle\": \"none\",\n" +
" \"snapRows\": 33,\n" +
" \"parentRowSpace\": 1,\n" +
" \"type\": \"CANVAS_WIDGET\",\n" +
" \"canExtend\": true,\n" +
" \"dynamicBindingPathList\": [],\n" +
" \"version\": 4,\n" +
" \"minHeight\": 1292,\n" +
" \"parentColumnSpace\": 1,\n" +
" \"leftColumn\": 0,\n" +
" \"children\": []\n" +
"}";

@hetunandu
Copy link
Member Author

@hetunandu, what do you think about updating the default DSL in the backend itself, instead of having the client send the initial DSL on every create-application request?

It appears to be pointing at version 4 currently:

public static String DEFAULT_PAGE_LAYOUT = "{\n" +
" \"widgetName\": \"MainContainer\",\n" +
" \"backgroundColor\": \"none\",\n" +
" \"rightColumn\": 1224,\n" +
" \"snapColumns\": 16,\n" +
" \"detachFromLayout\": true,\n" +
" \"widgetId\": \"0\",\n" +
" \"topRow\": 0,\n" +
" \"bottomRow\": 1254,\n" +
" \"containerStyle\": \"none\",\n" +
" \"snapRows\": 33,\n" +
" \"parentRowSpace\": 1,\n" +
" \"type\": \"CANVAS_WIDGET\",\n" +
" \"canExtend\": true,\n" +
" \"dynamicBindingPathList\": [],\n" +
" \"version\": 4,\n" +
" \"minHeight\": 1292,\n" +
" \"parentColumnSpace\": 1,\n" +
" \"leftColumn\": 0,\n" +
" \"children\": []\n" +
"}";

I think both client and server should have the latest DSL copy but since all DSL version updates originate because of client side changes, I think it is better that a client sends this when creating an app

@sharat87
Copy link
Member

Then may be we can remove the server side hard-coded DSL completely? My take is that either we keep it updated regularly, and use it for new applications, or remove it and let the client send a DSL for new applications. Keeping a copy on both places will add overhead of keeping them updated and in-sync, with no value-addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request UI Building Product Issues related to the UI Building experience UI Performance Issues related to UI performance
Projects
None yet
Development

No branches or pull requests

7 participants