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

fix: UI fixed for the Contributors box and made scrollable #1282

Closed
wants to merge 4 commits into from

Conversation

abhay1821
Copy link
Contributor

What

  • This PR includes the fixes for the UI rendering in the contributor's box which breaks on devices with smaller dimensions

Screenshot

Small IphoneSE

Fixes bug(s)

Part of

@abhay1821 abhay1821 requested a review from a team as a code owner March 21, 2022 07:04
@abhay1821
Copy link
Contributor Author

@teolemon or @M123-dev could you approve the workflow

@teolemon teolemon changed the title Bug:UI fixed for the Contributors box and made scrollable fix: UI fixed for the Contributors box and made scrollable Mar 21, 2022
@@ -14,72 +13,46 @@ class UserContributionView extends StatelessWidget {
Widget build(BuildContext context) {
return Material(
child: SizedBox(
height: MediaQuery.of(context).size.height * 0.9,
child: Stack(
height: MediaQuery.of(context).size.height * 0.8,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you change the ratio here? @abhay1821

height: MediaQuery.of(context).size.height * 0.9,
child: Stack(
height: MediaQuery.of(context).size.height * 0.8,
child: ListView(
Copy link
Collaborator

Choose a reason for hiding this comment

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

A ListView.builder would be better here in terms of performance

padding: const EdgeInsets.symmetric(horizontal: 20.0),
margin: const EdgeInsets.only(top: 20.0, bottom: 24.0),
child: Text(
AppLocalizations.of(context)!.contribute,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of evoking multiple times AppLocalizations.of(context)! and Theme.of(context), you should use a single variable

),
SmoothListTile(
text: AppLocalizations.of(context)!.contribute_improve_header,
onPressed: () => _contribute(context)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add a comma here(to format well your code)

),
),
);
}).toList(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add toList(growable: false)

child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
_buildTitle(context),
Copy link
Member

Choose a reason for hiding this comment

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

This would also make the cross as well as the title scrollable, I don't know about you but this doesn't seem right to me.

I'd recommend to leave it as Column and put the ListView/SingleChildScroll only for Dialogs where we need it or if that's not possible just putting the body inside a scrollable widget

@M123-dev M123-dev linked an issue Mar 28, 2022 that may be closed by this pull request
@teolemon teolemon added this to the V 1 milestone Mar 31, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1282 (757e0cc) into develop (53fb69c) will increase coverage by 0.01%.
The diff coverage is 29.41%.

@@            Coverage Diff             @@
##           develop   #1282      +/-   ##
==========================================
+ Coverage     9.13%   9.14%   +0.01%     
==========================================
  Files          158     158              
  Lines         6372    6372              
==========================================
+ Hits           582     583       +1     
+ Misses        5790    5789       -1     
Impacted Files Coverage Δ
...ews/bottom_sheet_views/user_contribution_view.dart 0.00% <0.00%> (ø)
...p/lib/generic_lib/dialogs/smooth_alert_dialog.dart 30.00% <100.00%> (+1.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53fb69c...757e0cc. Read the comment docs.

@abhay1821
Copy link
Contributor Author

abhay1821 commented Apr 3, 2022

Hi @M123-dev @g123k ,
So Sorry delay in this PR changes. So I found a solution to all the changes and render box issues and is flexible with small as well as the large device height. So if don't mind may Submit a New PR for it as the previous one has lots of conflicts. Here is the video below You can take a look at it, please. I have taken care of the Suggestion You suggested.

pr.mov

@M123-dev
Copy link
Member

M123-dev commented Apr 3, 2022

Heyy yeah sure @abhay1821 create a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

bug: Render issue in Contribute AlertBox with list of Contributors
5 participants