NotePlan / NotePlan/plugins

Tidy: Use params instead of JSON

Abierto
#647 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@jgclark ya está trabajando en esto.

Desde el 21/6/2025.

enhancement
Lenguaje dominante
JavaScript
Estrellas
204
Forks
82
Merge medio
22 h 27 min
PR fusionados (30 d)
3

Descripción

I find the JSON in many of the Tidy commands (esp "Remove Section...") mess things up and either don't work or cause the command to fail. I think having links, quote marks and emojis inside the JSON often keep it from working.

I would like to ask you to think about keeping JSON as the first param for backwards compat but also add individual parameters for each to use if you prefer. This will make xcallbacks and template commands more easy to understand and more reliable.

So for example:

export async function removeSectionFromRecentNotes(params: string = ''): Promise<void> {

would become:

export async function removeSectionFromRecentNotes(
  params: string = '',
  numDaysParam?: number,
  runSilentlyParam?: boolean,
  matchTypeParam?: MatchType,
  sectionHeadingParam?: string,
): Promise<void> {

I would suggest having Cursor create a generic helper similar to your overrideSettingsWithEncodedTypedArgs() but that allows for either JSON or an array of parameters so that you can use it in any of the commands that use JSON params.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.