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

perf(neon): do not use the spread operator for building lists #1094

Closed
wants to merge 5 commits into from

Conversation

Leptopoda
Copy link
Member

Fixes: #696

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
@provokateurin
Copy link
Member

Draft is on purpose?

@Leptopoda
Copy link
Member Author

This time yes.
I made the NeonProgressIndicator conditional and wanted to remove the visible property in a followup but noticed that this would cause flickering when it gets removed.
I already reverted most of them locally and we'll need to wait for #800 to properly change this.

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
… lists

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
@Leptopoda Leptopoda force-pushed the performance/neon/change_spread_operator branch from 42d074c to 22ac4ed Compare November 3, 2023 15:42
@Leptopoda
Copy link
Member Author

Oh totally forgot to mark it as ready for review 🤦‍♀️

@Leptopoda Leptopoda marked this pull request as ready for review November 3, 2023 22:30
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Oops I forgot about this PR

Comment on lines +70 to +75
if (branding.showLoginWithNextcloud)
Padding(
padding: const EdgeInsets.only(top: 10),
child: Text(NeonLocalizations.of(context).loginWorksWith),
),
Text(NeonLocalizations.of(context).loginWorksWith),
const SizedBox(
height: 10,
),
Semantics(
label: NeonLocalizations.of(context).nextcloud,
child: const NextcloudLogo(),
if (branding.showLoginWithNextcloud)
Copy link
Member

Choose a reason for hiding this comment

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

Duplicate condition, better use a generator function for the whole thing

Copy link
Member

Choose a reason for hiding this comment

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

Duplicate condition -> generator function

Copy link
Member

Choose a reason for hiding this comment

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

Duplicate condition -> generator function

Copy link
Member

Choose a reason for hiding this comment

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

Duplicate condition -> generator function

Copy link
Member

Choose a reason for hiding this comment

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

Duplicate condition -> generator function

@Leptopoda
Copy link
Member Author

Thanks for the feedback.
I'll touch this PR up after all the dynamite work I'm currently working on.

@provokateurin
Copy link
Member

Btw please check everything again after rebasing. We mostly touched the dynamite and nextcloud packages in the last few weeks, but maybe there are some new occurrences.
I wonder if it would be possible to implement a linter rule (either custom or upstream) that discourages using the spread operator on lists that are instantiated in the same line (idk how to properly call it).

@Leptopoda
Copy link
Member Author

Closing this one.
There is no point in rebasing it.

@Leptopoda Leptopoda closed this Dec 28, 2023
@provokateurin provokateurin deleted the performance/neon/change_spread_operator branch December 28, 2023 12:19
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.

Stop using ...[] pattern (spread list)
2 participants