Roam-Research / issues

Roam Research - A note-taking tool for networked thought.
https://roamresearch.com/
303 stars 7 forks source link

Roam on iPad intermittently creating new pages prematurely when adding a page reference #492

Closed galligan closed 4 years ago

galligan commented 4 years ago

Sometimes (not all) when opening a bracket for a page reference, and typing a phrase, a new page will be created prematurely (before completing the block or clicking a page). Even if that whole block is deleted before Enter is hit, or it is completed, the page will still be present.

I initially noticed this because I often write my son's name quickly with open brackets, then the lowercase start of his name. Today Roam began to insert it as a page, ahead of the Title case version…which I then noticed that it actually made the new page unexpectedly.

I have confirmed this does not happen on my Mac or elsewhere other than my iPad.

Video is here: https://youtu.be/EP_7cCA-TCM

To Reproduce

Steps to reproduce the behavior:

  1. Type something after [[ that doesn't exist in the database
  2. Observe that new word being available as a page

Unfortunately, I'm noticing that this problem has been intermittent

System Information:

Additional context

Add any other context about the problem here.

kylestratis commented 4 years ago

This appears to be typical behavior - I've been working around it since I started using Roam on MacOS in both Firefox and Chromium-based browsers. New pages will be created even before closing the double brackets.

galligan commented 4 years ago

@kylestratis This is not typical for me. I've used the same steps to reproduce on my mac and have not encountered this issue. If you get a chance, try to reproduce and perhaps record your screen.

kylestratis commented 4 years ago

@mg0716 I tested this again and it appears that you are correct. This is apparently now fixed - at least for desktop browsers. Which is nice because it was a huge pain. I'll see if I can confirm it on Firefox for iPad to figure out if it's a Safari issue (common) or mobile issue.

kylestratis commented 4 years ago

Following up, could not reproduce on Firefox on iPad.

filipesilva commented 4 years ago

First of all, thank you so much for a super detailed issue!

I think this is intended behaviour actually, because:

You can confirm this because you should see a yellow flash on the sync dot. IIRC these pages then get cleaned up later.

Which I guess now turns the question into "what's different between iPad and desktop". I think iPad is updating the autocomplete checkbox whereas desktop isn't. Not sure why. Might be the cause of reduced performance in some cases even.

galligan commented 4 years ago

Thanks @filipesilva! Appreciate you having a look at this.

So I’ll call out that while that might be intended behavior, it’s actually quite problematic. I ran into it again today as I opened brackets typed in covid. My goal was to use the brackets to search for the page to get my [[COVID-19]] reference.

Therein lies the issue → I’ve always used open brackets as a way of searching. However, now with the behavior this way it’s going to create a lot of unlinked orphans pages.

The logic I would have expected is:

matiassingers commented 4 years ago

I just noticed a change in behavior today as well after my browser was restarted, it seems like the delay for the suggested page references takes too long to show up which leads to a new page being created before having the ability to select the reference.

It's also apparent when typing /, I used to be able to press Enter immediately to generate {{[[TODO]]}}but there's a significant delay now that interprets the Enter as a new sibling block.

roam-page-reference-behavior

It also seems somewhat inconsistent (as per gif above), note that I had just done the test using [[roam]] first which created a new page that I then deleted — that could be why it didn't show up when I started recording.

Separately, might not be related at all: all my queries are suddenly broken and not returning any results (see #494). I checked my console and noticed this: Customer cus_[redacted] does not have an active subscription

Details:

matiassingers commented 4 years ago

I'm not experiencing the issue any longer after updating to 0.7.3-e272efd5, thanks guys!

galligan commented 4 years ago

FYI I’m still experiencing issues on my iPad, and Roam says that it’s up to date with the latest.

filipesilva commented 4 years ago

@mg0716 iirc the change to the slash command was reverted yesterday. The change to references is still there and will need to be addressed separately. I can confirm that the extraneous new pages will be removed on startup though.

filipesilva commented 4 years ago

@mg0716 I can't repro on iPad (iPadOS 14 beta 5) either, are you still seeing it?

galligan commented 4 years ago

Yes, I can still see it. Was experiencing it today. Happy to dig in deeper and do a screenshare if need be.

Update: I just checked and I was out of date on the updates. However, even after the update the problem persists.

panterarocks49 commented 4 years ago

I can't reliably reproduce this, but I think I have a fix for it. Could you guys try Roam on this url and let me know if it's fixed there? https://relemma-git-fix-492.roamresearch.now.sh/

galligan commented 4 years ago

Could you guys try Roam on this url and let me know if it's fixed there?

I can confirm that with a little bit of testing, it appears as though the problem was solved with this build. I didn't get super extensive with it, but in comparing the old vs. new I saw consistently how the new code did not reproduce the same effect as the old.

panterarocks49 commented 4 years ago

Awesome, deploying the fix to production now.