Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Luc-Mcgrady
Copy link
Contributor

image

I think this comes with the caveat of making the background of the help modal everywhere else 75% opaque (as there will be 2 layers), but its quite un-noticeable.

@iamllama
Copy link
Contributor

iamllama commented Jul 6, 2025

Possible alternative to avoid setting z-index, but the backdrop gets left behind

diff --git a/ts/lib/components/TitledContainer.svelte b/ts/lib/components/TitledContainer.svelte
index 70e4a078c..a2f116427 100644
--- a/ts/lib/components/TitledContainer.svelte
+++ b/ts/lib/components/TitledContainer.svelte
@@ -41,11 +41,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
                 {title}
             </h1>
         {/if}
-        <div class="help-badge position-absolute" class:rtl>
-            <slot name="tooltip" />
-        </div>
     </div>
     <slot />
+    <div class="help-badge position-absolute" class:rtl>
+        <slot name="tooltip" />
+    </div>
 </div>
 
 <style lang="scss">

@iamllama
Copy link
Contributor

iamllama commented Jul 6, 2025

The opened modal doesn't correspond to the simulator options, e.g. clicking on any simulator option opens up the modal at the last-opened section, so perhaps that should be changed here as well if its to be visible

@Luc-Mcgrady
Copy link
Contributor Author

Luc-Mcgrady commented Jul 6, 2025

The opened modal doesn't correspond to the simulator options, e.g. clicking on any simulator option opens up the modal at the last-opened section, so perhaps that should be changed here as well if its to be visible

It seems like to get this to work properly we'd need to do some crazy stuff with the "settings" because the settings here are all it has access to.

const settings = {
fsrs: {
title: "FSRS",
help: tr.deckConfigFsrsTooltip(),
url: HelpPage.DeckOptions.fsrs,
global: true,
},
desiredRetention: {
title: tr.deckConfigDesiredRetention(),
help:
tr.deckConfigDesiredRetentionTooltip() +
"\n\n" +
tr.deckConfigDesiredRetentionTooltip2(),
sched: HelpItemScheduler.FSRS,
},
modelParams: {
title: tr.deckConfigWeights(),
help:
tr.deckConfigWeightsTooltip2() +
"\n\n" +
tr.deckConfigComputeOptimalWeightsTooltip2(),
sched: HelpItemScheduler.FSRS,
},
rescheduleCardsOnChange: {
title: tr.deckConfigRescheduleCardsOnChange(),
help: tr.deckConfigRescheduleCardsOnChangeTooltip(),
sched: HelpItemScheduler.FSRS,
global: true,
},
computeOptimalRetention: {
title: tr.deckConfigComputeOptimalRetention(),
help: tr.deckConfigComputeOptimalRetentionTooltip4(),
sched: HelpItemScheduler.FSRS,
},
healthCheck: {
title: tr.deckConfigHealthCheck(),
help:
tr.deckConfigAffectsEntireCollection() +
"\n\n" +
tr.deckConfigHealthCheckTooltip1() +
"\n\n" +
tr.deckConfigHealthCheckTooltip2(),
sched: HelpItemScheduler.FSRS,
global: true,
},
};

so I'll just leave it as is for now. Maybe it would just be best to give up on the help modal for the simulator modal entirely?

@Luc-Mcgrady
Copy link
Contributor Author

Luc-Mcgrady commented Jul 6, 2025

An alternative could be creating a help modal solely for the simulator menu that copies the entries from the respective already existing modals?

@dae
Copy link
Member

dae commented Jul 7, 2025

While this is still being discussed, I'll merge in what we currently have, as it's still an improvement over what we had previously.

@dae dae merged commit 8a3b72e into ankitects:main Jul 7, 2025
1 check passed
@Luc-Mcgrady Luc-Mcgrady deleted the simulator-help-modal branch July 7, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants