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

Add setting to show or hide read posts #921

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

hjiangsu
Copy link
Member

@hjiangsu hjiangsu commented Nov 27, 2023

Pull Request Description

This PR introduces a setting to toggle on and off read posts which syncs up with the currently active Lemmy account. I've added the general logic to allow fetching and updating the current user's account settings. This will allow us to more easily add in options in the future on a per-account basis.

Since this setting is synced with the Lemmy account, there's no additional logic required to check if the given post being fetched has been read or not.

An idea for a future improvement would be a account selector within this page to allow us to switch between the different logged-in accounts.

Issue Being Fixed

Issue Number: #913

Screenshots / Recordings

0.18.x 0.19.x
simulator_screenshot_1F989691-6976-4D76-BF42-95C51D50D8F5 simulator_screenshot_ACF0A276-89B1-4B04-809F-AB6FD06E127C

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@micahmo
Copy link
Member

micahmo commented Nov 27, 2023

Looks great!

Would it make sense to shrink some of the space here so that elements are relatively evenly spaced?

image

Also for identifying the current user, would it make sense to show the whole user widget like we do in the Create Post page?

@hjiangsu
Copy link
Member Author

Would it make sense to shrink some of the space here so that elements are relatively evenly spaced?

I noticed that too - I can see if I can shrink it down a bit more!

Also for identifying the current user, would it make sense to show the whole user widget like we do in the Create Post page?

Good idea, I'll see if I can add that in quickly

@hjiangsu
Copy link
Member Author

Thoughts?

simulator_screenshot_5B169313-6DD3-436D-BD08-578AD9A99F44 simulator_screenshot_5B0C624F-153F-49A5-A2AE-B0B2ADC84247

@micahmo
Copy link
Member

micahmo commented Nov 27, 2023

Looks great!

I wonder if we even need the "you are current viewing..." or if it would be sufficient to have the user widget at the top (maybe above the first paragraph). But I'll leave that up to you. It's good as is!

@hjiangsu
Copy link
Member Author

Done, removed current user text and moved the user indicator to the top of the page!
simulator_screenshot_EFC01939-3D20-4CDB-AAEA-692F0F670759

@micahmo
Copy link
Member

micahmo commented Nov 27, 2023

Yeah that looks really nice!!

P.S. It looks like there's an error on this page in 0.19. Not sure if it's new, so it can probably be addressed separately.

@hjiangsu
Copy link
Member Author

P.S. It looks like there's an error on this page in 0.19. Not sure if it's new, so it can probably be addressed separately.

Hmm, what's the error? I can't reproduce it on my end

@micahmo
Copy link
Member

micahmo commented Nov 28, 2023

Hmm, what's the error? I can't reproduce it on my end

Voyager seems to be having some issues at the moment, so I can't log in, but I will try again when I can!

@micahmo
Copy link
Member

micahmo commented Nov 28, 2023

Here you go, let me know if this helps!

Code_nFHhcnupP3.mp4

@hjiangsu
Copy link
Member Author

Just curious, but are you able to login to voyager.lemmy.ml (on the web UI)? I think the server was reset a while back so all existing accounts there were deleted.

I had to create a new account to log in because I had issues using my old credentials.

@micahmo
Copy link
Member

micahmo commented Nov 28, 2023

Yes I also had to recreate my account a while back, and yes I can still log into the web UI. However, I tried logging out in Thunder and back in, and that seemed to fix the issue. So I'll just blame it on some Voyager weirdness. 😊 Thanks!

@hjiangsu
Copy link
Member Author

Ahh, maybe it was keeping the old JWT token around still which caused it to not work? Either way, I think it should be good since you were able to resolve it!

@hjiangsu hjiangsu merged commit 7b458eb into develop Nov 28, 2023
1 check passed
@hjiangsu hjiangsu deleted the feature/hide-show-read-posts branch November 28, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants