Managing Layout choices for custom asset types

15 views
Skip to first unread message

Rob Atkinson

unread,
Jan 15, 2020, 8:49:48 PM1/15/20
to TopBraid Suite Users
Love the new 6.3 editor :-)  

I've tried looking into code but not getting terribly far trying to work out what are the possible values teamwork:defaultLayout

The only value i've found that works so far is "TabularEditor"

When i make this default, the "available layouts" gives me a bunch of options who all claim have "default" = false.

I see there is teamwork:defaultForProjectType i could attach to a Layout... 

I dont see a property equivalent to the deprecated projectEditorClassOption

so a few obvious questions:

1) what are the range of values available for defaultLayout ?
2) how does one add to the list of available layouts (including where should one put the declarations if they are not properties of the projectType)
3) If one saves a layout, how can it be exported so i can package it with a custom asset collection as the default layout?

 ( noticed a few tab option layout glitches - is there a patch release planned soon?)

Cheers
Rob

Holger Knublauch

unread,
Jan 18, 2020, 1:23:38 PM1/18/20
to topbrai...@googlegroups.com
Hi Rob,


On 15/01/2020 17:49, Rob Atkinson wrote:
Love the new 6.3 editor :-)  

I've tried looking into code but not getting terribly far trying to work out what are the possible values teamwork:defaultLayout

The only value i've found that works so far is "TabularEditor"

When i make this default, the "available layouts" gives me a bunch of options who all claim have "default" = false.

I see there is teamwork:defaultForProjectType i could attach to a Layout... 

I dont see a property equivalent to the deprecated projectEditorClassOption

so a few obvious questions:

1) what are the range of values available for defaultLayout ?
2) how does one add to the list of available layouts (including where should one put the declarations if they are not properties of the projectType)
3) If one saves a layout, how can it be exported so i can package it with a custom asset collection as the default layout?

The values of teamwork:defaultLayout map to fields of the JS object called Layouts. For example, there is

export const TabularEditor = {
    config: {
        content: [
            {
                type: 'row',
                content: [
                    {
                        type: 'column',
                        width: 50,
                        title: 'Search',

                        content: [
                            {
                                component: 'Search',
                                type: 'react-component',
                                height: 100,
                            },
                        ],
                    },
                    {
                        type: 'column',
                        width: 50,
                        content: [
                            {
                                component: 'Form',
                                height: 100,
                            },
                        ],
                    },
                ],
            },
        ],
    },
};

The idea is that 3rd party code can add their own constants through Layouts.MyLayout = ... and then reference it via teamwork:defaultLayout "MyLayout". You can produce the values (nested arrays) either by hand or by looking at the saved layouts (which are stored as instances of teamwork:Layout in Repositories/urn_x-evn-user-data.xdb).

We are still in the process of rolling out the documentation and starter pack for customers to inject their own JavaScript code for 6.3 onwards . Did you get informed about that already?




 ( noticed a few tab option layout glitches - is there a patch release planned soon?)

If you have specific glitches to report, we'd love to hear them to make sure we address them in 6.3.1

Holger



Cheers
Rob
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/2e81f6d2-3bfe-45f2-81fb-5ffeaf7734af%40googlegroups.com.

Rob Atkinson

unread,
Jan 22, 2020, 10:11:19 PM1/22/20
to TopBraid Suite Users
Thanks Holger

I havent seen notice about the doc pack - look forward to it, or an alpha release if you want me to test it :-)

the main layout glitch is that the project tabs (import/export/manage) etc do not show completely or size properly (i.e. showing More...) until you select a different tab or resize the window,

cheers
Rob

To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages