cybersemics / em

A beautiful, minimalistic note-taking app for personal sensemaking.
Other
278 stars 102 forks source link

Toolbar button drag and drop not working on desktop #2223

Open umairasim-se opened 1 month ago

umairasim-se commented 1 month ago

Hi, this is my first time raising an issue with an open source project. The issue seems to be with the toolbar button drag/drop feature. it does not work on desktop but seems to be working fine with mobile.

Screencast from 08-05-2024 12:42:16 PM.webm

raineorshine commented 1 month ago

Hi! Thanks for reporting.

What browser are you in? Any errors in the Javascript console? It's working fine for me in Safari and Chrome.

umairasim-se commented 1 month ago

I am using chrome on ubuntu, I am receiving the error in the image on console. I have also tried firefox and brave browsers, it works fine on them. Screenshot from 2024-08-05 17-36-24

raineorshine commented 1 month ago

Thanks, that's helpful. I don't think it's platform-specific. It looks like the __EM__ thought where settings are stored got corrupted somehow. I have to think about how to reproduce this.

Could you run em.store.getState().thoughts in the console and post the result? Make sure to strip any private information, since it will include any thoughts you have created.

umairasim-se commented 1 month ago

Should I just post a screenshot? its a long object a screenshot might not cover it.

raineorshine commented 1 month ago

It would be better to right-click, choose "Copy Object", and paste the result in a code block here.

umairasim-se commented 1 month ago

Here you go.

{
    "thoughtIndex": {
        "__ROOT__": {
            "childrenMap": {
                "WibgMBwIy-0Xt": "WibgMBwIy-0Xt",
                "0jnTIq4L6I2wP": "0jnTIq4L6I2wP"
            },
            "created": 1722500712375,
            "id": "__ROOT__",
            "lastUpdated": 1722861054348,
            "parentId": "__ROOT_PARENT_ID__",
            "rank": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "__ROOT__"
        },
        "__ABSOLUTE__": {
            "id": "__ABSOLUTE__",
            "value": "__ABSOLUTE__",
            "parentId": "__ROOT_PARENT_ID__",
            "childrenMap": {},
            "created": 1722862177718,
            "pending": true,
            "lastUpdated": 0,
            "rank": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "__EM__": {
            "id": "__EM__",
            "value": "__EM__",
            "parentId": "__ROOT_PARENT_ID__",
            "childrenMap": {},
            "created": 1722862177718,
            "pending": true,
            "lastUpdated": 0,
            "rank": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "0jnTIq4L6I2wP": {
            "childrenMap": {
                "=favorite": "eRloodFE24aTE",
                "Nn8VAyveYlzaH": "Nn8VAyveYlzaH"
            },
            "created": 1722523097507,
            "id": "0jnTIq4L6I2wP",
            "lastUpdated": 1722861035425,
            "parentId": "__ROOT__",
            "rank": 12.595060992962651,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "a"
        },
        "eRloodFE24aTE": {
            "childrenMap": {
                "1X5QgUojv8dmz": "1X5QgUojv8dmz"
            },
            "created": 1722523116234,
            "id": "eRloodFE24aTE",
            "lastUpdated": 1722523116237,
            "parentId": "0jnTIq4L6I2wP",
            "rank": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "=favorite"
        },
        "Nn8VAyveYlzaH": {
            "childrenMap": {
                "=favorite": "0d4ImZGXz0T-k"
            },
            "created": 1722501004073,
            "id": "Nn8VAyveYlzaH",
            "lastUpdated": 1722861035425,
            "parentId": "0jnTIq4L6I2wP",
            "rank": 1,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "b"
        },
        "WibgMBwIy-0Xt": {
            "childrenMap": {
                "=archive": "5SgBdZFq212hj"
            },
            "created": 1722514935083,
            "id": "WibgMBwIy-0Xt",
            "lastUpdated": 1722861064041,
            "parentId": "__ROOT__",
            "rank": 13.595060992962651,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "c"
        },
        "1X5QgUojv8dmz": {
            "childrenMap": {},
            "created": 1722523116237,
            "id": "1X5QgUojv8dmz",
            "lastUpdated": 1722523116237,
            "parentId": "eRloodFE24aTE",
            "rank": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "true"
        },
        "0d4ImZGXz0T-k": {
            "childrenMap": {
                "_NK4mVS0Zzp9g": "_NK4mVS0Zzp9g"
            },
            "created": 1722606318519,
            "id": "0d4ImZGXz0T-k",
            "lastUpdated": 1722606318520,
            "parentId": "Nn8VAyveYlzaH",
            "rank": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "=favorite"
        },
        "5SgBdZFq212hj": {
            "childrenMap": {
                "=favorite": "K8FV8eB6aCla6"
            },
            "created": 1722859486325,
            "id": "5SgBdZFq212hj",
            "lastUpdated": 0,
            "parentId": "WibgMBwIy-0Xt",
            "rank": 1,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "=archive",
            "pending": true
        },
        "_NK4mVS0Zzp9g": {
            "childrenMap": {},
            "created": 1722606318520,
            "id": "_NK4mVS0Zzp9g",
            "lastUpdated": 1722606318520,
            "parentId": "0d4ImZGXz0T-k",
            "rank": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "true"
        },
        "K8FV8eB6aCla6": {
            "childrenMap": {},
            "created": 1722514939561,
            "id": "K8FV8eB6aCla6",
            "lastUpdated": 1722861051821,
            "parentId": "5SgBdZFq212hj",
            "rank": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw=",
            "value": "=favorite",
            "archived": 1722859486328
        }
    },
    "lexemeIndex": {
        "16cd485dcc9c17a9abe362425d4c48b4": {
            "contexts": [],
            "created": 1722862177718,
            "lastUpdated": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "d6c1048709303f33dd11c2ca0a930af7": {
            "contexts": [],
            "created": 1722862177718,
            "lastUpdated": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "bffe1bdaa567b4dab63d4fe9e5bf291b": {
            "contexts": [],
            "created": 1722862177718,
            "lastUpdated": 0,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "85555565f6597889e6b53a48510e895a": {
            "contexts": [
                "0jnTIq4L6I2wP"
            ],
            "created": 1722859494189,
            "lastUpdated": 1722859494189,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "159a1efe432f1f6c7fd26049c4139ab6": {
            "contexts": [
                "K8FV8eB6aCla6",
                "eRloodFE24aTE",
                "0d4ImZGXz0T-k"
            ],
            "created": 1722508572615,
            "lastUpdated": 1722861042927,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "7a98a957b1d3d1eefa2e131e544e94e9": {
            "contexts": [
                "Nn8VAyveYlzaH"
            ],
            "created": 1722859495354,
            "lastUpdated": 1722859495354,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "8e38df6c4a1f74d7210d0f9a74577574": {
            "contexts": [
                "WibgMBwIy-0Xt"
            ],
            "created": 1722859496691,
            "lastUpdated": 1722861062068,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "f85e1fcc6e2db35dc243338a26e6eb16": {
            "contexts": [
                "1X5QgUojv8dmz",
                "_NK4mVS0Zzp9g"
            ],
            "created": 1722508572622,
            "lastUpdated": 1722861064040,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        },
        "9c5a2c87437ec136e541986736834c43": {
            "contexts": [
                "5SgBdZFq212hj"
            ],
            "created": 1722859486324,
            "lastUpdated": 1722859486324,
            "updatedBy": "lqmAwdBTgmFHKlpfTccYi1pn6iTB3SoZXh1rB9zXdRw="
        }
    }
}
raineorshine commented 1 month ago

Thanks, I will look into it!

raineorshine commented 1 month ago

I still don't have exact steps to reproduce, but I've put some code in place to try to catch this if it happens again. You may have to Clear Site Data on Chrome to use the app again there.

umairasim-se commented 1 month ago

I have tested and it seems to be working now, no errors in the console as well. I cleared the localstorage first, not sure if that would have any affect to it but it seems to be working now.