obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.52k stars 231 forks source link

Set task status context menu overlaps with callout context menu on Linux, Windows and Android #2739

Open LoveSponge opened 8 months ago

LoveSponge commented 8 months ago

Please check that this issue hasn't been reported before.

Expected Behavior

User should be able to right-click on a task status marker (circle or tick etc) to change it's status when the list is inside a callout, without the built-in obsidian callout context menu overlapping.

Current behaviour

User is shown 2 overlapping context menu's, one for Tasks, and one for callout edit. image

[info] It is worth mentioning that on Android, the Task status context menu is completely hidden

Steps to reproduce

  1. Create a callout, with a Tasks query inside it. (See bottom for example)
  2. Right click on any todo item inside the callout

See overlapping context menu

> [!warning]+ In Progress
> ```tasks
> status.type is IN_PROGRESS
> short mode
> ```

Which Operating Systems are you using?

Obsidian Version

1.5.11-1

Tasks Plugin Version

6.2.0

Checks

Possible solution

The way i see it, there are 2 or 3 possible soltions (in order of preference, 1 being most preferable):

  1. Tasks detect that the query is within a context menu, add task edit items to the existing callout edit context menu, allowing you to see options from both menu's inside the same popup.
  2. Forcably hide / disable the built-in callout edit popup in favor of the Task status edit menu, allow the user to right-click anywhere inside the callout (not on a task) to see the edit callout menu.
  3. Allow the user to define a preference for which context menu they prefer to see.
LoveSponge commented 8 months ago

Related to: #2476, #2706

tarexo commented 8 months ago

This is, in my experience, only true in editing mode with live preview. In reading mode it behaves correctly.

claremacrae commented 8 months ago

@LoveSponge Is that in Reading mode or Live Preview?

claremacrae commented 8 months ago

Actually, I cannot reproduce it in either Reading Mode or Live Preview.

Reading Mode:

image

Live Preview:

image

With this setup:

SYSTEM INFO:
    Obsidian version: v1.5.11
    Installer version: v1.5.8
    Operating system: Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 23.2.0
    Login status: logged in
    Catalyst license: vip
    Insider build toggle: on
    Live preview: off
    Base theme: light
    Community theme: none
    Snippets enabled: 1
    Restricted mode: off
    Plugins installed: 12
    Plugins enabled: 1
        1: Tasks v6.2.0
claremacrae commented 8 months ago

This does sound similar to https://github.com/obsidian-tasks-group/obsidian-tasks/issues/2512 - but it's curious we haven't had more reports of it...

claremacrae commented 8 months ago

So we need to figure out what is happening differently - or being done differently - to get the different behaviour for different people.

claremacrae commented 8 months ago

Related to: #2476, #2706

Just to note that it is unrelated to 2706 which is about canvases.

LoveSponge commented 8 months ago

Oh that's very interesting... Let me spend a little more time investigating and I'll supply my setup information when I'm back at my desk.

Worth mentioning I assumed this was a desktop issue but my specific OS is Linux and i haven't tested on macOS or Windows, so I'll uncheck them from the original ticket description.

LoveSponge commented 8 months ago

Could the code really be that different between OS'?

I wonder if it might be somehow theme related? Or i see you have a snippet enabled?

claremacrae commented 8 months ago

Worth mentioning I assumed this was a desktop issue but my specific OS is Linux and i haven't tested on macOS or Windows, so I'll uncheck them from the original ticket description.

Oh dear - thanks for correcting the description, but just to note that I spent a lot more time trying to reproduce it on my Mac because you had checked the Mac box.

claremacrae commented 8 months ago

Could the code really be that different between OS'?

Yes.

I wonder if it might be somehow theme related? Or i see you have a snippet enabled?

Indeed - if you can come up with the minimal setup for reproducing it, and the precise minimal steps, that would be helpful.

claremacrae commented 8 months ago

I am using this setup to test:

- [ ] Ffff ➕ 2024-03-31

> [!warning]+ In Progress
> ```tasks
> short mode
> path includes {{query.file.path}}
> ```

Tasks plugin sample vault - cannot reproduce

I cannot reproduce this in a test vault with the following setup:

image

Debug info:

SYSTEM INFO:
    Obsidian version: v1.5.11
    Installer version: v1.5.8
    Operating system: Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 23.2.0
    Login status: logged in
    Catalyst license: vip
    Insider build toggle: on
    Live preview: off
    Base theme: light
    Community theme: none
    Snippets enabled: 1
    Restricted mode: off
    Plugins installed: 11
    Plugins enabled: 11
        1: Dataview v0.5.64
        2: Style Settings v1.0.8
        3: Commander v0.5.1
        4: Vault name in status bar v1.1.1
        5: Templater v2.2.3
        6: HelpMate v1.0.6
        7: QuickAdd v1.8.1
        8: BRAT v0.8.4
        9: Hot Reload v0.1.11
        10: Theme Design Utilities v0.22.1
        11: Tasks v6.2.0
claremacrae commented 8 months ago

My personal vault - can reproduce

image

SYSTEM INFO:
    Obsidian version: v1.5.11
    Installer version: v1.5.8
    Operating system: Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 23.2.0
    Login status: logged in
    Catalyst license: vip
    Insider build toggle: on
    Live preview: off
    Base theme: light
    Community theme: Minimal v7.5.2
    Snippets enabled: 27
    Restricted mode: off
    Plugins installed: 79
    Plugins enabled: 48
        1: Dataview v0.5.64
        2: Hotkey Helper v0.3.18
        3: Macros v0.1.0
        4: Auto Link Title v1.5.3
        5: Code Editor Shortcuts v1.14.0
        6: Reveal Active File Button v2.0.3
        7: Style Settings v1.0.8
        8: QuickAdd v1.8.1
        9: Advanced Tables v0.21.0
        10: Templater v2.2.3
        11: Natural Language Dates v0.6.2
        12: Filename Heading Sync v1.9.0
        13: Calendar v1.5.10
        14: CustomJS v1.0.19
        15: Advanced Cursors v0.5.1
        16: Customizable Page Header and Title Bar v4.7.2
        17: Charts v3.9.0
        18: Another Quick Switcher v8.14.0
        19: Quick Explorer v0.2.8
        20: Codeblock Completer v0.0.13
        21: Number Headings v1.16.0
        22: Editor Syntax Highlight v0.1.3
        23: Commander v0.5.1
        24: Admonition v10.2.0
        25: Minimal Theme Settings v7.3.1
        26: Linter v1.23.2
        27: Hotkeys++ v0.2.7
        28: Kanban v1.5.3
        29: Sortable v0.3.1
        30: Tag Wrangler v0.6.1
        31: Image Context Menus v1.6.0
        32: Leaflet v6.0.2
        33: Paste image rename v1.6.1
        34: HelpMate v1.0.6
        35: Dynamic Highlights v0.3.1
        36: Excalidraw v2.0.24
        37: Highlightr v1.2.2
        38: Better Word Count v0.10.1
        39: File Color v1.1.0
        40: CardBoard v0.7.9
        41: BRAT v0.8.4
        42: Broken Links v1.2.2
        43: Better Export PDF v1.5.7
        44: Waypoint v1.4.0
        45: Pomodoro Widget v1.0.1
        46: Projects v1.17.1
        47: Theme Design Utilities v0.22.1
        48: Tasks v6.2.0
claremacrae commented 8 months ago

This suggests strongly to me that it is not solely a Tasks plugin problem.

@LoveSponge you checked the "I have tried it with all other plugins disabled and the error still occurs" box - but how thoroughly did you do that?

After you had turned off all the other plugins, did you restart Obsidian?

What happens if you open a new vault, and just install Tasks - can you reproduce the problem there?

claremacrae commented 8 months ago

This suggests strongly to me that it is not solely a Tasks plugin problem.

I changed my main vault to have Tasks as the only plugin. At first I thought that this had fixed it. But after some more edits the problem returned.

Then I switched to the Default theme. Briefly it seemed that the problem went away. Then it came back again.

So I am stumped as to how to reliably reproduce it.

Which in turn makes it had to work on a fix, as I won't be able to tell whether or not the fix has reliable removed the problem.

claremacrae commented 8 months ago

I do think that this is likely real and needs to be fixed.

But without a precise reproduction, there isn't anything useful that we can do on this.

So I'll leave it open for another day or two, in the hope that we can make it actionable... If not, I'll close it, so that we can focus on things that are reproducible.

claremacrae commented 8 months ago

It can always be re-opened later when/if a repro can be found...

LoveSponge commented 8 months ago

i've just reproduced it in a fresh directory on linux Obsidian v1.5.12 with no theme or other plugins at all.

important: Live preview must be enabled.

image

Steps:

  1. Create a new directory anywhere on system
  2. Create a new vault with any name - pointing to the directory you created
  3. Enable community plugins, install and enable 'tasks'
  4. Create a new note with below (TEST DATA) inside it
  5. Right click on the task checkbox inside the callout

TEST DATA

note: You can copy using the 'copy' button as is

- [ ] some task

> [!todo]
> 
> ```tasks
> 
> ```
claremacrae commented 8 months ago

Brilliant. Thank you.

I will try it out when I have time.

claremacrae commented 8 months ago

i've just reproduced it in a fresh directory on linux Obsidian v1.5.12 with no theme or other plugins at all.

Is there a step missing in the instructions to install Tasks?

claremacrae commented 8 months ago

With the instructions above, and the extra step of installing Tasks, I have been able to reproduce it in:

claremacrae commented 8 months ago

I note that it is possible to select any of the statuses in the menu, so whilst it is definitely a bug and annoyance, the Edit Statuses menu does at least function.

LoveSponge commented 8 months ago

Yes i did forget to add that step, ive amended for posterity.

claremacrae commented 8 months ago

I've updated the title of this ticket to ensure it's clear that this is specifically about Linux.

LoveSponge commented 6 months ago

The issue is also present on Windows & Mobile (Android).

claremacrae commented 6 months ago

The issue is also present on Windows & Mobile (Android).

Have updated the description again to reflect that.

claremacrae commented 3 months ago

@LoveSponge - do you have an Obsidian Insider licence by any chance?

The Obsidian team has made some improvements in this area:

https://obsidian.md/changelog/2024-08-08-desktop-v1.7.0/ https://obsidian.md/changelog/2024-08-08-mobile-v1.7.0/

Could you test it out? I've found a similar issue on iPhone has now just gone away, so I'm hoping this has too...

claremacrae commented 3 months ago

@LoveSponge - do you have an Obsidian Insider licence by any chance?

The Obsidian team has made some improvements in this area:

https://obsidian.md/changelog/2024-08-08-desktop-v1.7.0/ https://obsidian.md/changelog/2024-08-08-mobile-v1.7.0/

Could you test it out? I've found a similar issue on iPhone has now just gone away, so I'm hoping this has too...

Hi @LoveSponge, I'll leave this open for another day or two, in the hope of hearing from you.

claremacrae commented 2 months ago

@LoveSponge - do you have an Obsidian Insider licence by any chance? The Obsidian team has made some improvements in this area: https://obsidian.md/changelog/2024-08-08-desktop-v1.7.0/ https://obsidian.md/changelog/2024-08-08-mobile-v1.7.0/ Could you test it out? I've found a similar issue on iPhone has now just gone away, so I'm hoping this has too...

Hi @LoveSponge, I'll leave this open for another day or two, in the hope of hearing from you.

Shruteek commented 1 month ago

I am actually able to reproduce this as well. I am on Windows 10. On a vault with only the latest version of Tasks enabled, the Context Menus overlap in Live Preview mode, but not in Reading mode. Note that the SYSTEM INFO: below shows I have the "Things" theme, but I also tried with the Default theme and the issue persisted. I got used to it months ago, but I didn't realize there was a bug thread. See here. image

SYSTEM INFO: Obsidian version: v1.7.4 Installer version: v1.4.13 Operating system: Windows 10 Home 10.0.19045 Login status: logged in Language: en Catalyst license: none Insider build toggle: off Live preview: on Base theme: adapt to system Community theme: Things v2.1.20 Snippets enabled: 0 Restricted mode: off Plugins installed: 9 Plugins enabled: 1 1: Tasks v7.12.2

claremacrae commented 1 month ago

@Shruteek That looks to be a very old installer version, from memory.

Shruteek commented 1 month ago

Oh, I didn't realize we had to periodically update the installer as well! I installed the newest installer (now SYSTEM INFO lists Installer version: v1.7.4), but the issue persists.

claremacrae commented 1 month ago

Thank you. I’ll reopen the issue then.