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

Optimize Tagline Form page #972

Merged
merged 3 commits into from
Mar 30, 2023

Conversation

makotech222
Copy link
Contributor

This work moves the tagline editing from the main Site Settings form into its own tab, like emojis. It also is optimized for larger lists, allowing hundreds of taglines without slowing down the page.

I wrote this up pretty quick, didn't want to refactor too much, just needed to get past a blocker for hexbear. Its still worthy of upstreaming it, though, as current implementation falls apart if you have lots of taglines.

image

@makotech222 makotech222 requested a review from dessalines as a code owner March 30, 2023 02:51
siteRes: GetSiteResponse;
siteForm: EditSite;
loading: boolean;
editingRow: number | null;
Copy link
Member

Choose a reason for hiding this comment

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

Use undefined:

editingRow?: number

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed

<table id="taglines_table" className="table table-sm table-hover">
<thead className="pointer">
<th></th>
<th style="width:121px"></th>
Copy link
Member

Choose a reason for hiding this comment

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

Don't hard code widths like this. Use responsive bootstrap tables.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is pulled from emoji table, used for same reason, just to give a min width to the column to have two buttons on the same row.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, but I highly suggest you read over how bootstrap does responsive forms: https://getbootstrap.com/docs/5.0/forms/overview

@dessalines dessalines merged commit 16cb506 into LemmyNet:main Mar 30, 2023
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