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

[Feature Request] remember last position when opening a document #90

Open
BasilTomato opened this issue Sep 9, 2020 · 5 comments
Open
Labels
feature request New feature or request

Comments

@BasilTomato
Copy link

Is your feature request related to a problem? Please describe.
n/a

Describe the solution you'd like
When opening a document recommend to "scroll to last position" (or something similar) via popup message. If the user clicks/taps on this popup message the editor will automatically scroll to the position where the document was edited last time before the document is closed.
This is an extremely convenient feature present in Office Online ("Pick up where you left off") and maybe other editors / word processors also.

Additional context
n/a

@johnozbay
Copy link
Member

Hey there!

We're making steady progress towards making this happen. In v3 we've shipped some code that will very soon allow this.
Currently #58 and #72 are blocking this – once these two are out of the way, we'll start saving the last position in open documents! 🎉

Thanks a lot for your patience!

@johnozbay johnozbay added the feature request New feature or request label Feb 23, 2021
@BasilTomato
Copy link
Author

Thank you for the update!

@dhda
Copy link

dhda commented Feb 23, 2021

A related feature that would be really useful would be for Cryptee to remember the last document that was open and automatically reopen it on launch. It’s useful both for closing the app and then coming back later, and just for going to the Cryptee main page and then back to docs (which currently loads the “welcome to cryptee documents!” page every time).

I imagine that could be a more complex feature that it appears on the surface because of Cryptee’s encrypted nature and security posture. I’m thinking of the potential to leak information about ghosted documents, especially. If you were to store the last open document per-device, that information would have to be stored server-side, encrypted, so that when a document was ghosted on any device, it would get cleared out of the last-open list. If it were stored locally per-device, there wouldn’t be a way to clear out a document that was ghosted from a different device until the user went online again (though maybe this is already handled for offline documents?).

@ghost
Copy link

ghost commented Feb 23, 2021

A related feature that would be really useful would be for Cryptee to remember the last document that was open and automatically reopen it on launch.

Wasn’t that a feature before the update?🤔

I think this would be a nice addition but it also should be optional and a device specific setting.
Imagine you write down some sensitive/personal stuff, close Cryptee and forget about it. Next time you open up Cryptee this page automatically opens up. This could be very problematic depending where you are right now😶

@johnozbay
Copy link
Member

@SteffB44 is on the money here!

@dhda We actually had this feature in V2, and removed it exactly for the reason @SteffB44 mentioned.

At first, it was a complicated feature. We used to store a last opened document ID per device, and if the document was ghosted, it would be removed from the list for all devices that had it (in realtime via sockets if the device was live, or as soon as the device comes back online before boot time)

Then we realized all this was causing a 800 - 1200ms delay in start time, because we had to check for a bunch of things like last opened document IDs, whether if they got ghosted or not, whether if their title is up-to-date or needs sync’ing, whether if they’re in the same folder or moved out, what if there’s an offline copy with unsync’ed changes but parent folder is ghosted, so we need to remove it from the device, but if we do remove the changes would be lost etc. etc.

So we thought okay, let’s skip that altogether, and make it so that the last-open-document is the same for all devices, similar to what Apple does with continuity. After all Cryptee is for you to use only, so if you were editing one doc on your laptop and launch Cryptee on your phone, the same doc would be right where you left off etc. And i can’t remember when exactly, but about 1,5 - 2 years ish ago, we switched to this, and definitely had more success and appraisal from users than the previous version did. (plus it came with a 500ms start up time performance boost in comparison)

But just like @SteffB44 correctly predicted, 2 - 3 people who are in higher-than-usual-risk jobs wrote to us to say it’s causing them more problems than it’s solving for them, and it almost caused nightmare scenarios for some. So we looked at whether if there’s a good solution to this problem or not, one that doesn’t hit the startup performance and one that is still compatible with things like ghost folders / archived folders / deniability & on-device encryption in general.

Needless to say, both from a privacy and performance perspective the best approach was to store it per-device, on-device, but that would cause a lot of conflicts with things like ghost folders. Especially now with v3, because you can now ghost parent folders with tons of folders in them. Which means your last-opened-document could be nested 50 folders deep, and on startup we would have to check your entire library to see if any one of the parents in the folder tree of this doc was ghosted and remove the doc from your device accordingly. + add to that the complexity of what happens if the doc has an unsync’ed offline copy on the same device, which if removed before sync’ing would be purged and changes would be lost.

So one morning I found myself sitting in front of a white board full of arrows and bubbles and boxes and diagrams and thought ... fuck it. Better to be safe than sorry, and leave it out of v3 for now, and think about a better, safer & more performance solution after the launch.

The best solution we have so far is to have a list of your last 2 - 3 recents documents on that device in place of that “welcome tips” box when Docs starts up. It’ll be like “welcome back here are the last 3 documents you’ve worked on : a , b , c ” and you can dive in with a single tap. This provides the best of both worlds, since we already have to get a list of your most recent documents and keep it in sync. So the only sweet addition here would be to save the user a single swipe to open the list of recents. And from a threat modeling perspective, it doesn’t change anything, and we don’t need to store anything extra this way.

How does that sound to you all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants