Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query modes #17

Open
kirillt opened this issue Aug 16, 2021 · 2 comments
Open

Query modes #17

kirillt opened this issue Aug 16, 2021 · 2 comments

Comments

@kirillt
Copy link
Member

kirillt commented Aug 16, 2021

The app uses "tags selector" to specify tags, i.e. it outputs some set of tags.
But there are multiple ways to interpret a selection into subset of resources.
Of the following 1, 2 and 5 seem to be most natural and modes 3, 4 might be useful sometimes.

  1. Normal mode (intersection)

    Every resource which is marked with all of specified tags is displayed.
    I.e. resources which contain extra tags are also displayed.

  2. Focus mode

    This mode is stricter: only those resources which are marked with all
    of specified tags and none of non-specified tags
    are displayed.
    I.e. resources which contain extra tags are filtered-out.

  3. Extra mode

    This mode is derived from 1 and 2: we apply Normal mode
    and filter-out all resources from Focus mode.
    I.e. resources which are marked with all of specified tags
    and at least one of non-specified tags
    are displayed.
    We can also, on the opposite, define Focus mode via Extra mode.

  4. Inversion mode

    This mode is inverted Normal mode: we take the whole
    collection and filter resources which are marked with all of specified tags out.
    I.e. we display only those resources which are not marked with any of specified tags.

  5. Union mode

    We display all resources marked with at least one of specified tags.

To illustrate these modes, let's take some collection of resources:

  • Resource 1 is marked with tag a
  • Resource 2 is marked with tag b
  • Resource 3 is marked with tag c
  • Resource 4 is marked with tags a, b
  • Resource 5 is marked with tags b, c
  • Resource 6 is marked with tags a, c
  • Resource 7 is marked with tags a, b, c
  • Resource 8 isn't marked with any tag

Examples of queries on this collection:

  1. Empty query (beginning of user's interaction)

    Normal mode outputs 1, 2, 3, 4, 5, 6, 7, 8
    Focus mode outputs 8
    Extra mode outputs 1, 2, 3, 4, 5, 6, 7
    Inversion mode outputs nothing
    Union mode outputs nothing

  2. Single tag query, e.g. {a}

    Normal mode outputs 1, 4, 6, 7
    Focus mode outputs 1
    Extra mode outputs 4, 6, 7
    Inversion mode outputs 2, 3, 5, 8
    Union mode outputs 1, 4, 6, 7

  3. Two tags query, e.g. {a, b}

    Normal mode outputs 4, 7
    Focus mode outputs 4
    Extra mode outputs 7
    Inversion mode outputs 1, 2, 3, 5, 6, 8
    Union mode outputs 1, 2, 4, 5, 6, 7

  4. Three tags query, e.g. {a, b, c}

    Normal mode outputs 7
    Focus mode outputs 7
    Extra mode outputs nothing
    Inversion mode outputs 1, 2, 3, 4, 5, 6, 8
    Union mode outputs 1, 2, 3, 4, 5, 6, 7

@kirillt
Copy link
Member Author

kirillt commented Aug 16, 2021

Right now, Normal mode is implemented and used for non-empty queries.
For empty query, actually, Focus/Extra modes are used (switching by "tags on/off" button).

It's better to replace "tags on/off" button with "switch modes" button which would cycle available query modes.

@kirillt
Copy link
Member Author

kirillt commented Aug 16, 2021

It is necessary to think through how query modes should handle inverted tags as well.

@kirillt kirillt transferred this issue from ARK-Builders/ARK-Navigator Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant