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

Disable newlines in ListingContent #3877

Merged
merged 1 commit into from
Sep 3, 2024
Merged

Conversation

neonfuz
Copy link
Contributor

@neonfuz neonfuz commented Sep 2, 2024

Fixes bug where lists are too spaced out because there's an extra line break added to the end of every item.

The data retrieved from the backend includes line breaks at the end of every item in a list. Rendering this line break as a
makes the items in a list too spaced out, because

  • elements already have their own vertical spacing.

    This PR filters line breaks at the end of list items on the front end, instead of changing the back end code. I'm not sure if this is the preferred solution, so merge at your discretion.

    Before:
    Screenshot 2024-09-02 at 3 12 25 PM

    After:
    Screenshot 2024-09-02 at 3 07 40 PM

    The state with said line breaks:
    Screenshot 2024-09-02 at 2 52 00 PM

    Tested locally with fakeship

    PR Checklist

    • Includes changes to desk files
    • Describes how you tested the PR locally (test ship vs livenet)
    • If a new feature, includes automated tests
    • Comments added anywhere logic may be confusing without context
  • Fixes bug where lists had double the line height they should have
    Copy link
    Member

    @latter-bolden latter-bolden left a comment

    Choose a reason for hiding this comment

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

    Looks good to me! Confirmed the line breaks get removed.

    @latter-bolden latter-bolden merged commit c0ba05a into tloncorp:develop Sep 3, 2024
    1 check passed
    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