From 562cef1f2258eee0fdf9b9c51ebf61435929ba39 Mon Sep 17 00:00:00 2001 From: Luc Mcgrady Date: Tue, 19 Aug 2025 16:19:25 +0100 Subject: [PATCH 01/28] Fix #4253 (#4259) * Reapply "Fix/Retention help button bounds (#4253)" (#4258) This reverts commit fb2e2bd37adbcfab2d4e2e6f7103c6835c80a7f3. * move div up slots instead of using condition * Avoid tabbing --------- Co-authored-by: Abdo Co-authored-by: Damien Elmes --- ts/lib/components/TitledContainer.svelte | 20 +++------------- ts/routes/graphs/Graph.svelte | 5 ++-- ts/routes/graphs/TrueRetention.svelte | 29 +++++++++++++++--------- 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/ts/lib/components/TitledContainer.svelte b/ts/lib/components/TitledContainer.svelte index 70e4a078c..3ea932ba3 100644 --- a/ts/lib/components/TitledContainer.svelte +++ b/ts/lib/components/TitledContainer.svelte @@ -12,7 +12,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html export { className as class }; export let title: string; - export let onTitleClick: ((_e: MouseEvent | KeyboardEvent) => void) | null = null;
- {#if onTitleClick} - -

- {title} -

-
- {:else} -

- {title} -

- {/if} +

+ {title} +

diff --git a/ts/routes/graphs/Graph.svelte b/ts/routes/graphs/Graph.svelte index 2c509639e..c8da588c5 100644 --- a/ts/routes/graphs/Graph.svelte +++ b/ts/routes/graphs/Graph.svelte @@ -8,7 +8,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html // When title is null (default), the graph is inlined, not having TitledContainer wrapper. export let title: string | null = null; export let subtitle: string | null = null; - export let onTitleClick: ((_e: MouseEvent | KeyboardEvent) => void) | null = null; {#if title == null} @@ -19,8 +18,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{:else} - - + +
{#if subtitle}
{subtitle}
diff --git a/ts/routes/graphs/TrueRetention.svelte b/ts/routes/graphs/TrueRetention.svelte index 6b89ab9b8..4a9738831 100644 --- a/ts/routes/graphs/TrueRetention.svelte +++ b/ts/routes/graphs/TrueRetention.svelte @@ -57,22 +57,29 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html const title = tr.statisticsTrueRetentionTitle(); const subtitle = tr.statisticsTrueRetentionSubtitle(); - const onTitleClick = () => { + const onHelpClick = () => { openHelpModal(Object.keys(retentionHelp).indexOf("trueRetention")); }; - - +
{ - modal = e.detail.modal; - carousel = e.detail.carousel; - }} - /> + onclick={onHelpClick} + onkeydown={onHelpClick} + role="button" + tabindex="-1" + > + { + modal = e.detail.modal; + carousel = e.detail.carousel; + }} + /> +