marcusolsson/obsidian-projects

Reuse Rules of [ Filter, Color, Sort ] for all Views inside a Project

Opened this issue · 1 comments

What would you like to be added?

Glossary:

I'm referring as Rules all list of instructions to Color, Filter or Sort a view:
image
image
image

Problem

Each view has its own set of rules, but it's cumbersome and laborious to replicate rules across different views within a project.

Possible Solutions

1. Automatic / Suggestion

To prioritize stability over change, I propose a simple way to apply rules from one view to another:

1.1. On new rule creation:

Automatically create the same rule for all other views but flag it as inactive.
This serves as a "suggestion" and doesn't impact the current experience.
Users can activate the new rule in one click.

Challenge: I noticed the rule is created with a standard value and then edited.
So we must track the new rule until the configuration is set, before triggering the replication.
An alternative is using a button as a trigger (3.2).

1.2. On rule deletion or edition:

I suggest ignoring changes to prevent unintended consequences.

1.3. On new view creation:

Apply all existing rules from other views (excluding duplicates) to the new view.

2. Drastic Change on Data Structure

Make all rules a property of a project, allowing each view to toggle rules on or off.
Problems: Potential for bugs, migration challenges, and lack of backward compatibility.
Not worthy

3. Interface

Instead of automation, introduce an interface for enabling rule replication:

3.1. Copy paste

Allow users to copy a rule from one view and paste it into another.

3.2. Button Reuse / replicate

Introduce a button that replicates a rule to other views upon clicking.

Why is this needed?

  • Most rules created are applicable to all views in the same project.
  • Rule replication is currently cumbersome, laborious, and unnecessary.
  • Automation or an interface for rule application would streamline project setup.

Upvoted by #755