planetfederal / qgis-webappbuilder-plugin

GNU General Public License v3.0
18 stars 20 forks source link

wrong buttons alignment in compiled webapps #293

Closed gioman closed 7 years ago

gioman commented 7 years ago

screenshot_20170330_110048

screenshot_20170330_110054

bartvde commented 7 years ago

@volaya we should probably add ToolbarSeparator in between in the app_writer I need to export those in the full build as well and we would need to import them

volaya commented 7 years ago

Can you copy here the import line to add?

On Thu, Mar 30, 2017 at 12:32 PM, Bart van den Eijnden < notifications@github.com> wrote:

@volaya https://github.com/volaya we should probably add ToolbarSeparator in between in the app_writer I need to export those in the full build as well and we would need to import them

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boundlessgeo/qgis-webappbuilder-plugin/issues/293#issuecomment-290370878, or mute the thread https://github.com/notifications/unsubscribe-auth/ACARk7brxjFFcRHOz2IgwKLBWtS9SHJYks5rq4SlgaJpZM4MuIjJ .

-- Victor Olaya Software Engineer | Boundless http://boundlessgeo.com/ volaya@boundlessgeo.com @boundlessgeo http://twitter.com/boundlessgeo/

bartvde commented 7 years ago

Sure:

import {ToolbarGroup, ToolbarSeparator} from 'material-ui/Toolbar';

instead of:

import {ToolbarGroup} from 'material-ui/Toolbar';
bartvde commented 7 years ago

and then we need a structure like:

<ToolbarGroup<Button /></ToolbarGroup>
<ToolbarSeparator/>
<ToolbarGroup><Button /></ToolbarGroup>

etc. but then with React.createElement

bartvde commented 7 years ago

No you also need to change the appwriter to actually insert the separators

volaya commented 7 years ago

ah, ok...too fast :-)

just let me know how that should be done and i will take care of it

bartvde commented 7 years ago

where you have:

tools = ["React.createElement(ToolbarGroup, undefined, %s)" % t for t in app.tools]

something like

tools = ["React.createElement(ToolbarGroup, undefined, %s), "React.createElement(ToolbarSeparator)" % t for t in app.tools]

?

[untested]

volaya commented 7 years ago

ok, let me try

volaya commented 7 years ago

should be done now

bartvde commented 7 years ago

looks like they might need to get wrapped in a ToolbarGroup as well

selection_188

bartvde commented 7 years ago

yes so @volaya can you change React.createElement(ToolbarSeparator),

to become:

React.createElement(ToolbarGroup, undefined, React.createElement(ToolbarSeparator)),

TIA

gioman commented 7 years ago

@volaya @bartvde just updated the plugin, now adding any widget that adds a button in the header will return a blank preview, while the compiled webapp is ok.

bartvde commented 7 years ago

@gioman did you update from master?

bartvde commented 7 years ago

i.e. SDK master

bartvde commented 7 years ago

I changed the first button manually by wrapping the ToolbarSeparator in a ToolbarGroup and it looks good then:

selection_189

bartvde commented 7 years ago

@volaya see my PR here: https://github.com/boundlessgeo/qgis-webappbuilder-plugin/pull/298

gioman commented 7 years ago

@gioman did you update from master?

disregard my comment, wrong paver command.

gioman commented 7 years ago

can we close this?

bartvde commented 7 years ago

yes