Skip to content

FEATURE REQUEST: match multiple complementary rules #395

@dimateos

Description

@dimateos

I have a set of rules to modify titles and works great!

I wanted to change the icon for a subset of those tabs...
Currently only the first rule is matched, so I would have to:

  1. duplicate all the rules
  2. add filters for the subsets URL fragments
  3. do the exact same title modification + add icon

Example:

  • modify a bunch or github URLs
  • now the same but add a custom icon for my personal repos
    ...

There might be a simpler solution?

  • I know that if this is changed carelessly then other use cases that exploit the current behavior would break tho.
  • In my example I need to be able to ADD extra customization to the tab (icon) not OVERRIDE currently set by prior rules (title)
    • But maybe some users explicitly want their general rule with default stuff to persist. Which IMO seems like a less common case?

Anyway, proposed solutions:

  • Add another toggle to the rule to make it "always-checked" meaning that it is always checked even if a prior rule has being matched and in that case apply its modifications, only non-default fields (not fields already modified by other rule)
    • Could be placed inside Advanced submenu
    • EXTRA: There could also be a toggle for "force" or "override" which allows even overriding fields: this has the same effect as moving the rule to the very top but this seems more intuitive e.g. important rules or very specific rules like the manually named tabs
  • Alternatively it could be a toggle to mark a rule "non-exclusive" meaning that other posterior rules may still modify the tab, but again, only non-default fields can be later modified
  • Make rules fields have a explicit NOT-SET value different from DEFAULT e.g. title already has it {title}. Then all rules could be "non-exclusive":
    • Posterior matched rules can edit any NOT-SET field.
    • This seems to overcome the potential change in current behavior: simply set the rule to DEFAULT and no other rule can edit it (the user would have to manually change it to NOT-SET)
    • But here the toggles would also require a NOT-SET state to comply, which seems weird. IMO here makes more sense to let posterior rules SET them (but not UN-SET) them e.g. making a tab "Pinned" is more suited for more specific rules like my use case only adding a custom icon.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions