smustgrave β credited rrrob β .
You have been added @smustgrave. Thanks for helping out!
This works perfectly. π
If the underlying request here is to improve this for JSONAPI, then it seems like we should also provide metadata containing the URL to the SVG file, so that a decoupled frontend consumer can have the choice to render the SVG inline or via an IMG tag, or is that somehow already available?
The path to the SVG file is not removed, so it can still be used as an image like you mentioned. This patch just adds the raw svg code inline.
There is one issue though. I do see the following in the Drupal log:
Deprecated function: Creation of dynamic property Drupal\svg_image_field\SvgRawComputed::$value is deprecated in Drupal\Core\TypedData\TypedData->setValue() (line 102 of /var/www/html/web/core/lib/Drupal/Core/TypedData/TypedData.php)
If I add an empty setValue
function in the SvgRawComputed
class, the deprecation error goes away:
/**
* {@inheritdoc}
*/
public function setValue($value, $notify = TRUE) {
// Do nothing, as we don't need to set the value directly
}
This is working great. But needs a change to the link text.
+++ b/js/collapsible_dnd.js
@@ -124,7 +153,23 @@
+ divTableDrag.empty().append(Drupal.t("Menu link") + ' (' + '<button class="js--toggle-expand-collapse link">' + Drupal.t("expand all") + '</button>' + ')');
This module works on more than just menus.
I added him just now as a co-maintainer. AstonVictor β thanks for helping out on this project.
I'm not sure what the patch in #13 actually fixes, but it does not fix the issue that is described in #10.
- Use color boxes
- Toggle on "record opacity"
- Toggle on "set default value"
- Leave color as none/transparent
- Set an opacity value (ex 0.85)
- Click save settings
- Open the field settings again and notice "set default value" is no longer toggled on
The getView()
method just piggybacks on top of the functionality provided by the
jsonapi_views β
module. They should be able to give you the information you need.