elk icon indicating copy to clipboard operation
elk copied to clipboard

Add functionality for profile notes

Open forestsystem opened this issue 1 year ago • 1 comments

Clear and concise description of the problem

I like to use Mastodon's feature for writing private notes on someone's profile. This helps me remember why I muted or blocked someone, for example. Elk does not seem to support this.

Suggested solution

Add a spot on people's profiles to click to write a note, like on regular Mastodon.

Alternative

Add an option in the pop-up menu (alongside "open in original site", "mute", etc.) to add a note.

Additional context

Here is what it looks like on regular Mastodon:

image image

forestsystem avatar Jan 13 '23 14:01 forestsystem

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

stackblitz[bot] avatar Jan 13 '23 14:01 stackblitz[bot]

Echoing this request! Even a hot key/link that allowed me to open the user profile/post in my vanilla account would be better than nothing; as is, at least once a week I find myself trudging through the flow of: 1) copy link to original profile 2) open up vanilla Mastodon 3) paste into search bar 4) click to user profile 5) enter note 6) go back to Elk.

shaunagm avatar Mar 27 '23 17:03 shaunagm

It seems like an "Add personal note to [user]" option has been added to profile menus. However, even if I input a note, it does not truly save. I can navigate away and back and the note will still be there, but if I refresh the page then it disappears (which doesn't happen on native Mastodon).

After typing in a note, I've tried:

  • To find a manual "save" option somewhere. There is none; only a "Remove personal note" option.
  • Navigating to various pages and timelines in Elk, then back to the profile with the note. The note is still there in this case.
  • Closing and re-opening the tab. The not disappears in this case, since the page reloads.
  • Loading the same page in a new tab while the original tab is still open. The note disappears here too, even if it's still loaded in the first tab.
  • Refreshing the profile page. This deletes the note.
  • Navigating to a different page in Elk, refreshing, then navigating back to the profile with the note. This deletes the note.

Basically, any time Elk reloads/refreshes, the notes go poof.

Menu option: image Before refresh, after clicking outside the note box to finish the note. image After refresh, the note has disappeared: image

I thought it might be some sort of cookie issue at first, but I don't have anything on my browser set in a way that deletes cookies on a simple page refresh. I'm not code savvy myself, so I have no clue how this has been implemented. Regardless, I'd rather this feature be hidden until we're sure the notes will stick, since it's misleading if the feature is available and seems to work, only to delete all your notes if you refresh or exit Elk.

VagrantVulpine avatar May 12 '23 05:05 VagrantVulpine

I just reproduced this bug. This is a huge bummer - I have been assuming the personal notes would stick so I've probably lost a dozen or so notes this way.

@VagrantVulpine thanks for catching this

shaunagm avatar May 14 '23 22:05 shaunagm

Hey I was just looking into this to see if it truly wasn't being saved. I think it IS being saved, but for whatever reason it's just not displaying in Elk.

Even for notes I added in other apps it's not showing those, either. So - hopefully you didn't actually lose all those notes, @shaunagm - try looking for them in another app, like the official Mastodon app and see if they are still there. Gonna dig a bit more and see what's going on.

I think there needs to be a visual indicator when the note gets saved as well.

jeffsikes avatar May 15 '23 01:05 jeffsikes

You're right, @jeffsikes! That's great news - glad to know those notes weren't lost, and that for now I can double check the notes field on vanilla mastodon

shaunagm avatar May 15 '23 01:05 shaunagm

Well, I spent some time looking at this and didn't get very far. Here's what I saw, hopefully it can assist someone figuring this out.

Test: Action: Note added to account either through Elk.zone or Mastodon.social; or find account with existing note on Mastodon.social Action: Check profile in Elk or find account in timeline and click on account Behavior: 1/2 the time, profile does NOT show note, but sometimes it does. Even for the same account, if I come at it through different routes: Search (Search for @[email protected]), looking through my follows, or just clicking on the account in my timeline - even the same profile can sometimes show it and sometimes not!

Seem to be able to consistently cause the note to not appear by doing a hard refresh (Shift + Browser Refresh) on an account page that has a note. Also, by doing a search for the account and viewing it by clicking on a result. I can see that the relationship API endpoint is called and the value is returned, but it's not showing.

When it doesn't show, I was able to find a consistent pattern to get it to appear again: Have an account page open that should have a Personal Note - you should see the Personal Note section, but it appears blank.

Action: Open Compose Note dialog in Elk, really just any click on the UI to move to another page. Action: Close Compose Note dialog in Elk (do not have to create a note), or click the "Go Back" arrow from any other area Behavior: Elk displays the note after closing the Compose Note dialog 🤷🏼‍♂️

jeffsikes avatar May 15 '23 04:05 jeffsikes

This should be fixed in https://main.elk.zone (wait for the update prompt)

patak-dev avatar May 15 '23 07:05 patak-dev

Yes! Confirmed as working after updating. And, #TIL about watch and using $$ as an escape hint in Vue. Thanks. 😄

jeffsikes avatar May 15 '23 19:05 jeffsikes

The $$ is being faded out from Vue though. It is part of the ref sugar experimental feature that was dropped a few months ago: https://github.com/vuejs/rfcs/discussions/369#discussioncomment-5059028. We should probably go back to using ref and .value instead of $ref at one point.

patak-dev avatar May 15 '23 19:05 patak-dev

I think the original intent of this feature request has been met and the issue can be closed. Profile notes now appear appropriately when entered. Notes are initially added through the action menu, then visible and editable on a profile at load if it exists.

jeffsikes avatar Oct 06 '23 09:10 jeffsikes