feat: Add toggle for 3rd row message previews - #312
Conversation
|
Yes, I got excited and did not follow all the guidelines in the CONTRIBUTING.md. If you approve the idea of the issue, I will fix up my commit to use conventional commit style. I can also rename my branch if necessary. |
|
Thanks for this, two things currently fail the frontend test job (I ran
With those two,
Appreciate you picking this up. Once those are in I'll re-review and get it merged. |
6816be2 to
303517e
Compare
Dropped.
I am not a speaker of these languages. Rather than using a plain "google translate", I used an AI with some context of what I was doing and asked it to provide translations. Hopefully this is accurate. If not, let me know how I might get better translations.
Good catch! I did not know this feature did that as I do not use it. :D Should be fixed.
Added. |
|
Thanks! One thing before I can merge: the showMessagePreviews pref is read in auth.js but never written to the DB (it's missing from the UPDATE query and its params), so it won't persist or sync across devices. Can you wire it into the preferences UPDATE like the other prefs? Or if it's meant to be local-only, just drop the auth.js change. Thanks! |
303517e to
09b77a6
Compare
|
@maathimself Take another look and thanks for your patience! I think I have the I also had a messy merge conflict because a) I had added |
09b77a6 to
967bfe4
Compare
|
Just a quick rebase - let me know if there's anything you'd like me to address! |
|
Thanks, the save side looks wired up right now. One last thing and then I'll merge: it saves but never loads back. loadPreferences in store/index.js hydrates each pref from the server explicitly, one key at a time, and there's no block for showMessagePreviews. So on a second device (or after clearing localStorage) it falls back to the local default and the toggle doesn't actually sync. The GET returns the value fine, it's just never read into the store. Mirror the showMobileAvatars block that's already in there: if (typeof prefs.showMessagePreviews === 'boolean') { Drop that in next to the other avatar/favicon hydration blocks and it'll sync. Then it's good to merge. |
Summary
Per Issue #311 , add settings ability to disable message previews
Changes
Adds toggle to Settings | Appearance | Layout | Message List to disable message previews.
Testing
Included index.test.js (not sure if you do test files this way) to test local storage; live compile, re-deploy, re-run, manual testing of toggle on and off, displaying in different layout styles.
Contributor License Agreement
By submitting this pull request I confirm that:
third-party material and confirmed it is compatible with the CLA).