Skip to content

Commit

Permalink
Move 'ignore reviews before' to advanced (#3381)
Browse files Browse the repository at this point in the history
* moved ignore setting to advanced

* Update CONTRIBUTORS

* Match width of other text inputs (dae)

The width was inconsistent before as well, but moving it next to
text inputs made it more obvious.
  • Loading branch information
bpnguyen107 committed Aug 29, 2024
1 parent 7a0e51a commit 3661333
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ Dillon Baldwin <https://github.com/DillBal>
Voczi <https://github.com/voczi>
Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
Themis Demetriades <themis100@outlook.com>

********************

The text of the 3 clause BSD license follows:
Expand Down
19 changes: 19 additions & 0 deletions ts/routes/deck-options/AdvancedOptions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type { DeckOptionsState } from "./lib";
import SpinBoxFloatRow from "./SpinBoxFloatRow.svelte";
import SpinBoxRow from "./SpinBoxRow.svelte";
import DateInput from "./DateInput.svelte";
export let state: DeckOptionsState;
export let api: Record<string, never>;
Expand All @@ -39,6 +40,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
help: tr.deckConfigHistoricalRetentionTooltip(),
sched: HelpItemScheduler.FSRS,
},
ignoreRevlogsBeforeMs: {
title: tr.deckConfigIgnoreBefore(),
help: tr.deckConfigIgnoreBeforeTooltip2(),
sched: HelpItemScheduler.FSRS,
},
startingEase: {
title: tr.schedulingStartingEase(),
help: tr.deckConfigStartingEaseTooltip(),
Expand Down Expand Up @@ -216,6 +222,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{tr.deckConfigHistoricalRetention()}
</SettingTitle>
</SpinBoxFloatRow>

<Item>
<DateInput bind:date={$config.ignoreRevlogsBeforeDate}>
<SettingTitle
on:click={() =>
openHelpModal(
Object.keys(settings).indexOf("ignoreRevlogsBeforeMs"),
)}
>
{tr.deckConfigIgnoreBefore()}
</SettingTitle>
</DateInput>
</Item>
{/if}

<Item>
Expand Down
6 changes: 3 additions & 3 deletions ts/routes/deck-options/DateInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html

<div>
<ConfigInput>
<Row --cols={2}>
<Col>
<Row --cols={13}>
<Col --col-size={7} breakpoint="xs">
<slot />
</Col>
<Col>
<Col --col-size={6} breakpoint="xs">
<input bind:value={date} type="date" />
</Col>
</Row>
Expand Down
6 changes: 0 additions & 6 deletions ts/routes/deck-options/FsrsOptions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import SettingTitle from "$lib/components/SettingTitle.svelte";
import SwitchRow from "$lib/components/SwitchRow.svelte";
import DateInput from "./DateInput.svelte";
import GlobalLabel from "./GlobalLabel.svelte";
import type { DeckOptionsState } from "./lib";
import SpinBoxFloatRow from "./SpinBoxFloatRow.svelte";
Expand Down Expand Up @@ -374,11 +373,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
placeholder={defaultWeightSearch}
/>

<DateInput bind:date={$config.ignoreRevlogsBeforeDate}>
<SettingTitle on:click={() => openHelpModal("ignoreBefore")}>
{tr.deckConfigIgnoreBefore()}
</SettingTitle>
</DateInput>
<button
class="btn {computingWeights ? 'btn-warning' : 'btn-primary'}"
disabled={!computingWeights && computing}
Expand Down
5 changes: 0 additions & 5 deletions ts/routes/deck-options/FsrsOptionsOuter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
tr.deckConfigComputeOptimalWeightsTooltip2(),
sched: HelpItemScheduler.FSRS,
},
ignoreRevlogsBeforeMs: {
title: tr.deckConfigIgnoreBefore(),
help: tr.deckConfigIgnoreBeforeTooltip2(),
sched: HelpItemScheduler.FSRS,
},
rescheduleCardsOnChange: {
title: tr.deckConfigRescheduleCardsOnChange(),
help: tr.deckConfigRescheduleCardsOnChangeTooltip(),
Expand Down

0 comments on commit 3661333

Please sign in to comment.