From fef434882bba56c49cb98e58c32587df173b90ee Mon Sep 17 00:00:00 2001 From: Mayel de Borniol Date: Mon, 6 Jan 2025 15:39:56 +0000 Subject: [PATCH] https://github.com/bonfire-networks/bonfire-app/issues/900 --- lib/modularity/declare_helpers.ex | 4 +++- lib/modularity/extension_diff.ex | 2 +- lib/utils.ex | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/modularity/declare_helpers.ex b/lib/modularity/declare_helpers.ex index a24a9c3..6916ef6 100644 --- a/lib/modularity/declare_helpers.ex +++ b/lib/modularity/declare_helpers.ex @@ -58,7 +58,9 @@ defmodule Bonfire.Common.Modularity.DeclareHelpers do module: module, app: app(module), href: opts[:href] || Bonfire.Common.URIs.path(module), - type: :link + type: :link, + sub_widgets: + Enum.map(opts[:sub_links] || [], fn {name, opts} -> generate_link(name, module, opts) end) }) end diff --git a/lib/modularity/extension_diff.ex b/lib/modularity/extension_diff.ex index e1148c6..88364b2 100644 --- a/lib/modularity/extension_diff.ex +++ b/lib/modularity/extension_diff.ex @@ -243,7 +243,7 @@ defmodule Bonfire.Common.Extensions.Diff do # end def tmp_path(prefix) do - Path.join([System.tmp_dir!(), prefix <> Text.unique_string()]) + Path.join([System.tmp_dir!(), "bonfire_repos", prefix <> Text.unique_string()]) end def root, do: Bonfire.Common.Config.get(:root_path) diff --git a/lib/utils.ex b/lib/utils.ex index 796281a..a2fa514 100644 --- a/lib/utils.ex +++ b/lib/utils.ex @@ -3,6 +3,7 @@ defmodule Bonfire.Common.Utils do Various very commonly used utility functions for the Bonfire application. This module should contain only a few generic and/or heavily-used functions, and any other functions should be in more specific modules (or in other extensions altogether) for e.g.: + - `Bonfire.Common.Enums` for functions around maps, structs, keyword lists, and the like - `Bonfire.Common.Types` for object types - `Bonfire.Common.URIs` and `Linkify` for URI handling @@ -22,6 +23,7 @@ defmodule Bonfire.Common.Utils do - `Bonfire.Common.PubSub` for pub/sub We may also want to consider reusing functions from existing utils libraries when possible and contributing missing ones there, for example: + - https://hexdocs.pm/moar/readme.html - https://hexdocs.pm/bunch/api-reference.html - https://hexdocs.pm/swiss/api-reference.html