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

Use new user/community styles #1227

Merged
merged 2 commits into from
Mar 23, 2024
Merged

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Mar 22, 2024

Pull Request Description

This PR is the next step of #1201. It adds the following:

  • Option to show user instance in post listings
  • Option to show user instance in post body
  • Option to show community instance in post body
    • Please let me know if you can think of any places I've missed the ability to see the full name of an entity.
  • Usage of the new common user/community styling in most of the places where we show the full name, including the following:
    • Create post page
    • Community page
    • Search results
    • Post listing
    • Inbox items
    • Modlog page
    • Post body
    • Community sidebar
    • User sidebar
    • User settings
      • There were a few places that I didn't apply the styling because that area of the UI imposed some other styling which I thought should take precedence.
      • I also couldn't update usages within TextScroll and AutoSizeText since they just take a String. Need to re-evaluate those.

Finally, to avoid inconsistencies and help new users out of the box, I disabled all styling by default. I had previously only enabled bold usernames to preserve the current look of the comments, but the user night not want this throughout the app, and it can looks strange when compared to communities that are unstyled, so I figured it should be an intentional choice.

Next up: I think a next good task would be to extract the "display name" setting from posts and make it part of the styling for both user and community names.

Issue Being Fixed

Issue Number: #1198

Screenshots / Recordings

qemu-system-x86_64_DZCGQrBsJ8.mp4

Checklist

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

Copy link
Member

@hjiangsu hjiangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, now that I'm looking at this, do you think it might be better to convert generateCommunityFullNameWidget and generateUserFullNameWidget into StatelessWidgets/StatefulWidgets rather than functions that return a widget?

This would allow us to keep Flutter's conventions of using StatelessWidget/StatefulWidget classes, and this might just be more efficient in the long run since Flutter can perform optimizations on them.

Thoughts?

@micahmo
Copy link
Member Author

micahmo commented Mar 23, 2024

Good call! Let me know what you think of it now.

Copy link
Member

@hjiangsu hjiangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks better! Thanks for changing it up 😄

@hjiangsu hjiangsu merged commit dfbb7f8 into thunder-app:develop Mar 23, 2024
1 check passed
@micahmo micahmo deleted the feature/use-styles branch March 23, 2024 19:29
@micahmo micahmo mentioned this pull request Apr 1, 2024
3 tasks
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.

2 participants