experimental new settings API#663
Draft
mProjectsCode wants to merge 1 commit into
Draft
Conversation
liamcain
reviewed
May 19, 2026
| if (value < MIN_SYNC_INTERVAL || value > MAX_SYNC_INTERVAL) { | ||
| return `Sync interval must be between ${MIN_SYNC_INTERVAL} and ${MAX_SYNC_INTERVAL}.`; | ||
| } | ||
| return undefined; |
There was a problem hiding this comment.
since the function signature has | void, you can omit this final return (I know it feels weird)
| import type { MetaBindSettingKey } from 'meta-bind-obsidian/src/settings/SettingsTypes'; | ||
| import type { App, Setting, SettingDefinitionItem, SettingGroupItem } from 'obsidian'; | ||
|
|
||
| export class ExcludedFolderSettings { |
There was a problem hiding this comment.
I don't think you need a class for this. I'd recommend inlining this into the getSettingDefinitions. If you want some separation, just put it in a function on the setting tab instead of using a class. I think the class abstraction is awkward since you don't actually want to instantiate anything.
There was a problem hiding this comment.
oh I see, you have a bunch of pages. I that case, maybe just make these top-level functions instead of classes. I'm just worried that you're going to be capturing stale state in the class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.