QWAT icon indicating copy to clipboard operation
QWAT copied to clipboard

improve QGIS to handle different layer definition sections (QML export)

Open haubourg opened this issue 7 years ago • 20 comments

Currently all layer properties sections are mixed into one style, with many styles possible for a layer.

This is prone to useability caveats, like switching styles and not having the same form or layer actions, and makes it harder to maintain, if one need to have the same forms but allow differents style switches. Proposal would be to have one default section for forms, actions etc.. and independant style (symbology + labels+ display field) switching. Being able to store several actions - forms should be preserved but triggered with explicity buttons.

https://issues.qgis.org/issues/15733 #238

haubourg avatar Jul 12 '17 12:07 haubourg

Discussed in PSC 2017 11 23:

  • QLR is a whole layer definition extract with all "styles"
  • QML exports only the currently displayed "style" which is composed of labels + forms + styles etc..

What is expected:

  • add subentries in the "style" to save only forms / labels / styles / metadata etc..

  • display the style title outside of the style widget, so that users know permanently what style is being used. see #238
    uploads/6fb767c5-548b-4fa3-be84-8decf5155abc/image.png

  • store a name in exported QML and give feeback when loading a new style (a qgs messagebar for instance) + rules for ensuring unique style naming

haubourg avatar Nov 24 '17 08:11 haubourg

This feature is meant to adress easier local customization of projects and easier resync with master project

haubourg avatar Nov 24 '17 08:11 haubourg

If you are ok with this proposal, let me know and I'll open a PR upstream

m-kuhn avatar Nov 24 '17 13:11 m-kuhn

@m-kuhn we first need an estimate for that work. Could you do that?

haubourg avatar Dec 01 '17 12:12 haubourg

2 hours?

m-kuhn avatar Dec 01 '17 12:12 m-kuhn

with doc, tests and bugfix included? Better count one day ?

haubourg avatar Dec 01 '17 13:12 haubourg

If you agree, GO!

haubourg avatar Dec 01 '17 13:12 haubourg

Sounds good to be on the safe side.

I'll check if tests make sense.

m-kuhn avatar Dec 01 '17 13:12 m-kuhn

Sorry @haubourg the proposal here was only for the screenshot above, not for the full control over what to save. I have mixed this up with #238 .

The full proposal will require 2 - 3 days, sorry for not realizing that these are two different tickets earlier.

m-kuhn avatar Dec 18 '17 13:12 m-kuhn

Oh, OK, 2 hours sounded fast yes !

haubourg avatar Dec 18 '17 14:12 haubourg

https://github.com/qgis/QGIS/pull/5900

m-kuhn avatar Dec 18 '17 14:12 m-kuhn

@ponceta @dsavary Given this is a not something users will discuss, but usefull to GIS administrators, what is the priority of this task for 2018? My opinion is that it is very much needed and as a very high mutualization value for the whole QGIS community. I would then plead to launch that as soon as 3.0 is out.
Opinions?

haubourg avatar Feb 16 '18 14:02 haubourg

@haubourg It is a priority need for us . (Gis admin) To plan as soon as possible ( 2018 )

dsavary avatar Mar 06 '18 15:03 dsavary

Highly appreciated also from a qgis community perspective.

m-kuhn avatar Mar 06 '18 16:03 m-kuhn

Agreed with the priority here. @ponceta do you give us a GO or do you need QWAT's team approval?

haubourg avatar Mar 06 '18 16:03 haubourg

Is this issue also to fix the bug with QLR export (Layer Definition File) in QGIS 2.18 ? The settings of the form are lost (only for the current style) I create a new issue for this ?

Tested in QGIS 3.0 : the export QLR seems to be working well.

Bug demo gif : export_qlr_lost_form

dsavary avatar Apr 11 '18 14:04 dsavary

Nope, separate issue. The qlr issue is already identified here https://issues.qgis.org/issues/16655

haubourg avatar Apr 12 '18 07:04 haubourg

I just launched a QEP for advanced proposal of export / import of QML parts here https://github.com/qgis/QGIS-Enhancement-Proposals/issues/125

Any comments welcome

haubourg avatar May 14 '18 16:05 haubourg

@ponceta @dsavary @kandre are you happy with the current state of the QEP?

haubourg avatar May 31 '18 08:05 haubourg

@haubourg very good job. I don't understand all the details about the discussion with Mathias Kuhn... Perhaps, it may be necessary to specify, if the export of sections (symbole, form, ...) is done by default on the current style or the user can choose (before) in the menu one of the styles that he wants to export.

dsavary avatar May 31 '18 12:05 dsavary