thunder-app / thunder

Thunder - An open-source cross-platform Lemmy client for iOS and Android built with Flutter
https://thunderapp.dev
GNU Affero General Public License v3.0
732 stars 62 forks source link

Create comment page refactor #1165

Closed hjiangsu closed 1 month ago

hjiangsu commented 2 months ago

Pull Request Description

This PR refactors the existing create comment page and attempts to solve the following issues:

Most of the logic is now in place, and should be more or less functional! Some standing issues to be fixed:

Additional notes:

Issue Being Fixed

Issue Number: #1012, #738

Screenshots / Recordings

Before After
simulator_screenshot_11035348-06C9-4B12-BE0B-BEEFBE4E4E40 simulator_screenshot_44F7F5FD-9615-4620-9B43-32BCE9C7407B
simulator_screenshot_04CEDB6F-B77B-47A1-9AF5-457395972889 simulator_screenshot_71311E3F-11F5-447E-94F5-F703E6837840
simulator_screenshot_82411B07-723F-4D80-8BC1-618C4382C51E simulator_screenshot_A097A0DD-4BA7-4068-AE4D-9B1E1E455953
simulator_screenshot_B5B4150B-7D1D-460C-BF91-E161712B17AA simulator_screenshot_7112944A-DF17-48AF-94B4-29F382A1F2FD

Checklist

micahmo commented 1 month ago

Just an FYI, I want to work on a "comment as other user" feature as some point. Let me know if you think I should wait for this PR or go ahead now.

hjiangsu commented 1 month ago

I think it might be good to hold off on that until this is complete! I'll probably get back on this soon

micahmo commented 1 month ago

Sounds good!

hjiangsu commented 1 month ago

@micahmo this should be more or less ready now (with the exception of the standing issues). I've updated the description to provide some more information/context. This is a relatively large change, so up to you if you want to do a code review on this!

@machinaeZER0 since I've updated the overall UI/UX, please let me know your thoughts on this!

machinaeZER0 commented 1 month ago

Hello! This is looking really nice :) Just a few thoughts/clarifications from me:

Let me know if I missed anything else you specifically wanted reviewed, but hope this was helpful!

micahmo commented 1 month ago

Hey all, I'm still reviewing this PR, but I wanted to respond to @machinaeZER0's comments real quick.

  • are we able to default the language in a given community/instance to something acceptable

Given that the Lemmy UI does not, we probably wouldn't either.

image
  • what are your thoughts on making the language selector a dropdown icon next to your personal info

As long as it's obviously a language selector, I'm totally up for UI suggestions. Just keep in mind that this currently matches the Create Post page, so we'd have to change both. Also keep in mind that this page will also eventually have the "comment as other user..." feature, so there will be a chevron to the right of the username (where you circled) indicating you can pick a different user.

  • I still wish the send/post button was closer to the bottom

I also agree with this! A while back I did back I tried a mockup where the send button integrated with the preview button. I'll have to dig that up. Again, that would be a common change between this and the Create Post page, so probably a different PR as you mentioned.

machinaeZER0 commented 1 month ago

That all makes sense to me - if we're matching the "normal" Lemmy experience, thoughts on matching the language and styling of the dropdown here? A single dropdown (maybe pilled) that says "Select Language," rather than the current "Language: Select Language," I mean image

I think it being shorter and contained within a pill would be positive changes, but also wouldn't be opposed to just doing the latter and keeping the longer copy of the former :)

machinaeZER0 commented 1 month ago

Made issue #1309 as a place to discuss the send/post button idea, also :)

hjiangsu commented 1 month ago

Thanks for the feedback @machinaeZER0!

are we able to default the language in a given community/instance to something acceptable, or no?

As @micahmo mentioned, we're mostly following what Lemmy UI does. I do believe we can make slight improvements to the language selector in future PRs (such as limiting the language options based on what is enabled on the instance/community).

Selecting a default language would be difficult because instances/communities can have more than one language. However, if the instance/community only has one language enabled, I can see making that the default!

And what are your thoughts on making the language selector a dropdown icon next to your personal info, rather than a text dropdown between your info and the composition section?

As @micahmo mentioned, the only issue here is that we'll be implementing ways to choose a different user to post the comment as (in the future). This would likely follow similar UI patterns to how the create post page looks like (with the chevron icon)

is it possible to add a few pixels of padding to the bottom?

I can try to adjust that a bit more - it could be because of the spacing of the title text which causes an optical illusion

hjiangsu commented 1 month ago

Does this also need to be done for inbox replies and mentions

It doesn't apply to the inbox/mentions. The reasoning here is that if you get a reply or a mention, you might already have the general context of what the original discussion was about, unlike the user feed page or the search page. Additionally, sometimes you might want to just quickly reply to a reply/mention to acknowledge that you've seen it!

I'm not sure that I've tested all the edge cases everywhere, but I'm hoping that most of it gets caught during testing/nightlies.

hjiangsu commented 1 month ago

I'll go ahead and merge this in as is, and we'll address any outstanding issues with future PRs!

hjiangsu commented 1 month ago
Before After
image image

@machinaeZER0 does this seem to be a bit better?

machinaeZER0 commented 1 month ago

Before After image image

@machinaeZER0 does this seem to be a bit better?

If it's possible to split the difference I might do that, but if that's literally one pixel's worth of difference then the original spacing is probably fine to keep as-is - probably better to not overly pad, anyway :) thank you for mocking it up, either way!