chore: allow user to view memos in different modes
This PR addresses the issue around memos that have a lot of content/length.
Inspired by this issue
The PR offers a way for users to set a mode for their memos in preference settings.
The two options available to users are FULL and COMPACT.
Full - Displays all of memo and its content. Compact - Displays a fraction of memo and hides the rest.
In Compact mode, users are given option in dropdown menu to expand/shrink current memo.
See video for reference.
https://github.com/usememos/memos/assets/34424878/5adb8f09-7383-4716-b5ef-c5db3053c5c7
@MehadND is attempting to deploy a commit to the memos Team on Vercel.
A member of the Team first needs to authorize it.
this is great .
What algorithm did you use to view in different modes?
Is this related to the core of the program ?
Basically I created a string variable in user settings. Most of the implementation was similar to the visibility setting.
Hopefully that answers your questions.
Hey @boojack can you review this PR? and can you please let me know if it can be merged with the current code or would I have to pass the teats?
p.s. i tried fixing the lint errors but couldn't
Hey @boojack can you review this PR? and can you please let me know if it can be merged with the current code or would I have to pass the teats?
p.s. i tried fixing the lint errors but couldn't
You're almost there.
You must run buf generate inside ./proto, or pnpm pnpm postinstall from ./web and commit the generated files.
Here's a git patch after running buf generate in this PR.
proto-2863.patch
After that, golangci-lint run will still show some warnings about unchecked-type-assertion, but they are not related to your code and it's safe to ignore.
Hey @boojack can you review this PR? and can you please let me know if it can be merged with the current code or would I have to pass the teats?
p.s. i tried fixing the lint errors but couldn't
You're almost there.
You must run
buf generateinside./proto, orpnpm pnpm postinstallfrom./weband commit the generated files.
Here's a git patch after running
buf generatein this PR.After that,
golangci-lint runwill still show some warnings aboutunchecked-type-assertion, but they are not related to your code and it's safe to ignore.
Ah ok that really helps a lot, I thought generally I should ignore pushing .pb.go files. My bad should have researched and understood the whole codebase.
Thank you for helping.