[Qgis-psc] Grant progress report: Update older annotation items to new framework

Nyall Dawson nyall.dawson at gmail.com
Mon Aug 19 18:19:00 PDT 2024


PSC,

I'm writing to provide an update on the grant for QEP 269 -- Update older
annotation items to new framework

This work is now complete (with one final PR pending review, see
https://github.com/qgis/QGIS/pull/58405). As part of this grant, the follow
changes have been made to QGIS:

- New annotation item types for "picture" and "text inside rectangle" have
been added. See https://github.com/qgis/QGIS/pull/58126,
https://github.com/qgis/QGIS/pull/58147. These new types have a range of
placement modes available, including a "relative to map frame" option which
mimics the behaviour of the older annotation types.
- Support was implemented for adding (optional) callouts to some annotation
item types. This option is available for the text at point, rectangular
text, and picture annotation items. Users can interactively set the map
position for the callout origin and style the callout using the full range
of callout options which are already present for map labels. (
https://github.com/qgis/QGIS/pull/58295)
- Support was added for an optional marker symbol to be drawn as part of
the "balloon" callout style. This option is present for both callouts
attached to annotations, and callouts drawn as part of traditional map
labels. (https://github.com/qgis/QGIS/pull/58311)
- Annotation layers can now have an associated "visibility layer", which
means that the annotation layer will be hidden if the associated layer is
hidden. (https://github.com/qgis/QGIS/pull/58287)
- A new rich text editor widget was created for interactive creation of
html content for the text at point and rectangular text annotation items (
https://github.com/qgis/QGIS/pull/58310)
- Several "papercut" bugs encountered while interacting with annotation
items have been fixed, eg
https://github.com/qgis/QGIS/pull/58327 and
https://github.com/qgis/QGIS/issues/58427

Now, when users load projects containing the old SVG or Text annotation
objects, these will be silently and automatically upgraded to the newer
annotation items. I've cleaned up the UI as a result, removing the
confusing actions for creating the older annotation types.

While this concludes the work in the current grant, there are some
additional changes which would be good to implement in a future release:

- The old "HTML" annotation needs to be handled by creating an annotation
item class for HTML content, just like what was done here for the SVG and
text annotations
- We need to do something with the older "Form" annotation. I would suggest
we could deprecate this annotation and just remove it in a future release,
without offering an alternative to users. I suspect that this annotation is
not in widespread use and developments in QGIS since the form annotation
was introduced have made it redundant (eg expression based labels). I will
file a QEP suggesting that we remove this form annotation shortly, so that
we can gather user feedback prior to doing this.
- There's still a number of paper cuts and opportunities to streamline the
UX of creating and interacting with annotation items. Whether trivial I'll
be directly addressing these or fixing as part of the regular bug fixing
program, but potentially there's scope for a future grant to streamline
these interactions too.

Thanks again for the opportunity to work on this!
Nyall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-psc/attachments/20240820/5f5d15d7/attachment.htm>


More information about the QGIS-PSC mailing list