This commit is contained in:
Mayel de Borniol 2022-10-17 14:02:31 +13:00
parent 3dbbf6bd17
commit 3dcd9259c4
6 changed files with 26 additions and 14 deletions

View file

@ -26,8 +26,8 @@ function phxClick(event) {
if (name.charAt(0) == "[") {
name = JSON.parse(name)[0][1]["event"]
}
window.location = "/LiveHandler/" + name + "?" + new URLSearchParams(getPhxValues(this)).toString()
}
window.location = "/LiveHandler/" + name.replace(":", "/") + "?" + new URLSearchParams(getPhxValues(this)).toString()
}
// attempt graceful degradation for LiveView events without LiveView
(function () {

View file

@ -1,11 +1,15 @@
# NOTE: make sure you populate your local with seeds first, and then copy paste this in iex
Logger.configure(level: :warn)
Benchee.run(
%{
"feed with boundaries & minimal join/preloads" => fn -> Bonfire.Social.FeedActivities.feed(:local, preloads: :with_object) end,
"feed without boundaries & minimal join/preloads" => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true, preloads: :with_object) end,
"feed with boundaries & cached preloads" => fn -> Bonfire.Social.FeedActivities.feed(:local) |> Bonfire.Social.Feeds.LiveHandler.preloads() end,
"feed without boundaries & cached preloads" => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true) |> Bonfire.Social.Feeds.LiveHandler.preloads() end,
"feed with boundaries & full join/preloads" => fn -> Bonfire.Social.FeedActivities.feed(:local, preloads: :feed) end,
"feed without boundaries & with full join/preloads " => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true, preloads: :feed) end,
"minimal join/preloads, with boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local, preloads: :with_object) end,
"minimal join/preloads, without boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true, preloads: :with_object) end,
"caching preloads, with boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local) |> Bonfire.Social.Feeds.LiveHandler.preloads(with_cache: true) end,
"caching preloads, without boundaries applied " => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true) |> Bonfire.Social.Feeds.LiveHandler.preloads(with_cache: true) end,
"full join/preloads, with boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local, preloads: :feed) end,
"full join/preloads, without boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true, preloads: :feed) end,
# "AP:shared_outbox" => fn -> ActivityPubWeb.ObjectView.render("outbox.json", %{outbox: :shared_outbox}) end
},
parallel: 10,
@ -19,3 +23,4 @@ Benchee.run(
Benchee.Formatters.Console
]
)
Logger.configure(level: :debug)

View file

@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
## [Unreleased (2022-10-15)]
## [Unreleased (2022-10-17)]
### Added
- Enable/disable extensions [#448](https://github.com/bonfire-networks/bonfire-app/issues/448)
- Coordination MVP [#445](https://github.com/bonfire-networks/bonfire-app/issues/445) by mayel & ivanminutillo

View file

@ -27,7 +27,7 @@ config :phoenix_live_reload,
patterns = [
~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg|webp)$",
# ~r"^priv/gettext/.*(po)$",
~r"_live\.ex$",
~r"(_live|_live_handler|live_handlers|routes)\.ex$",
~r{(views|templates|pages|components)/.*(ex)$},
~r".*(heex|leex|sface)$",
~r"priv/catalogue/.*(ex)$"

View file

@ -1,4 +1,5 @@
import Bonfire.Me.Fake
import Bonfire.Social.Fake
System.put_env("INVITE_ONLY", "false")
System.put_env("SEARCH_INDEXING_DISABLED", "true")
@ -12,7 +13,7 @@ fake_user!(
)
# create some users
users = for _ <- 1..2, do: fake_user!()
users = for _ <- 1..5, do: fake_user!()
random_user = fn -> Faker.Util.pick(users) end
# start some communities
@ -43,6 +44,12 @@ random_user = fn -> Faker.Util.pick(users) end
# comment = fake_comment!(user, thread)
# end
for _ <- 1..10 do
thread = fake_post!(random_user.())
comment = fake_comment!(random_user.(), thread)
comment = fake_comment!(random_user.(), comment)
end
# post some links/resources
# for _ <- 1..2, do: fake_resource!(random_user.(), maybe_random_community.())
# for _ <- 1..2, do: fake_resource!(random_user.(), maybe_random_collection.())

View file

@ -35,16 +35,16 @@
"bonfire_geolocate": {:git, "https://github.com/bonfire-networks/bonfire_geolocate", "286b7f55324addebe2af70be8d9d34a3d790b099", [branch: "main"]},
"bonfire_invite_links": {:git, "https://github.com/bonfire-networks/bonfire_invite_links", "2b69fe92b431f5f9ffdebe229cd18faa4ecfbcef", [branch: "main"]},
"bonfire_mailer": {:git, "https://github.com/bonfire-networks/bonfire_mailer", "d8a3f4bef0cbe4b8c9db1ee107366ecf083b7824", [branch: "main"]},
"bonfire_me": {:git, "https://github.com/bonfire-networks/bonfire_me", "9000b078ac0216c08871873ca9487b3d5807c2d8", [branch: "main"]},
"bonfire_me": {:git, "https://github.com/bonfire-networks/bonfire_me", "fc1cee55883e3690bf2634e22146e801125352bb", [branch: "main"]},
"bonfire_pages": {:git, "https://github.com/bonfire-networks/bonfire_pages", "c68feac2b63ef66c2b7394dce752544242639351", [branch: "main"]},
"bonfire_quantify": {:git, "https://github.com/bonfire-networks/bonfire_quantify", "b9a4f9e83a64da928b2eb865649c576ed1acf74b", [branch: "main"]},
"bonfire_search": {:git, "https://github.com/bonfire-networks/bonfire_search", "620ce33c0fb5895956fc32ad271d5166818a9a38", [branch: "main"]},
"bonfire_social": {:git, "https://github.com/bonfire-networks/bonfire_social", "d02c661685214df0ba75c27aff0ca3b289425041", [branch: "main"]},
"bonfire_tag": {:git, "https://github.com/bonfire-networks/bonfire_tag", "1ab8c0682e5e0d71cda61fd1067b166541eaf04a", [branch: "main"]},
"bonfire_ui_common": {:git, "https://github.com/bonfire-networks/bonfire_ui_common", "b8c12a894080425f6b848c86b91726b32f4afbf3", [branch: "main"]},
"bonfire_ui_common": {:git, "https://github.com/bonfire-networks/bonfire_ui_common", "dc08de4d2dbbc6d508a1cd745b3aa4c10bba5905", [branch: "main"]},
"bonfire_ui_coordination": {:git, "https://github.com/bonfire-networks/bonfire_ui_coordination", "9bed1954aa075f9db978839d0c913d517629dc88", [branch: "main"]},
"bonfire_ui_kanban": {:git, "https://github.com/bonfire-networks/bonfire_ui_kanban", "8f84a75f9fc3115d0c8731c95c53efc5146f4743", [branch: "main"]},
"bonfire_ui_me": {:git, "https://github.com/bonfire-networks/bonfire_ui_me", "8502a23351bbaa8450092b56a5ae5e8b34f413eb", [branch: "main"]},
"bonfire_ui_me": {:git, "https://github.com/bonfire-networks/bonfire_ui_me", "9245d07519701bd0dfd418a5ed4c88205e60a3bc", [branch: "main"]},
"bonfire_ui_social": {:git, "https://github.com/bonfire-networks/bonfire_ui_social", "afe0db5e16244eb90488b67df1b0125681111936", [branch: "main"]},
"bonfire_ui_valueflows": {:git, "https://github.com/bonfire-networks/bonfire_ui_valueflows", "4ac65759ff9f86032d24b8740088daedf0129521", [branch: "main"]},
"bonfire_valueflows": {:git, "https://github.com/bonfire-networks/bonfire_valueflows", "4ec237ffd3a85f1b90daeede7df481931dabc3d2", [branch: "main"]},