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

chore: updated UI #1148

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Conversation

Jhalakupadhyay
Copy link
Contributor

@Jhalakupadhyay Jhalakupadhyay commented Jan 6, 2025

#1132
#1130

Summary by Sourcery

New Features:

  • Implement a dynamic navigation drawer with improved styling and interactive elements.

Copy link
Contributor

sourcery-ai bot commented Jan 6, 2025

Reviewer's Guide by Sourcery

This PR updates the UI of the app, primarily focusing on the navigation drawer and the home screen. The changes include visual enhancements, improved navigation, and a more consistent color scheme.

Class diagram for BMDrawer widget changes

classDiagram
    class BMDrawer {
        +int selectedIndex
        +createState() State
    }
    class _BMDrawerState {
        -int currentIndex
        +initState()
        -updateSelectedIndex(int)
        +build(BuildContext)
        -_buildListTile(int, IconData?, String?, String, String, String?, String?)
    }
    BMDrawer <|-- StatefulWidget
    _BMDrawerState <|-- State
    BMDrawer ..> _BMDrawerState : creates
    note for BMDrawer "Changed from StatelessWidget to StatefulWidget"
    note for _BMDrawerState "New state class to manage drawer selection"
Loading

State diagram for navigation drawer selection

stateDiagram-v2
    [*] --> Initial: Initialize with selectedIndex
    Initial --> Selected: User taps menu item
    Selected --> NavigateInternal: Internal route
    Selected --> NavigateExternal: External link
    Selected --> ShareContent: Share option
    NavigateInternal --> UpdateUI: Update currentIndex
    NavigateExternal --> OpenURL: Open external link
    ShareContent --> ShowShareDialog: Show share dialog
    UpdateUI --> Selected: Ready for next selection
Loading

File-Level Changes

Change Details Files
Redesigned the navigation drawer
  • Converted the navigation drawer to a StatefulWidget to manage the selected item state.
  • Added a header image to the drawer.
  • Updated the drawer background color.
  • Refactored the drawer items into a reusable _buildListTile widget.
  • Implemented dynamic highlighting of the selected drawer item.
  • Added icons to the list tiles.
  • Added dividers between sections.
  • Updated the drawer header title style.
  • Updated the drawer header background color.
  • Updated the scaffold background color to match the primary color.
  • Updated the app bar title on the home screen.
  • Updated the color of the text field on the home screen.
  • Updated the color of the grid container on the home screen.
  • Updated the tab bar indicator and label colors.
  • Updated the tab bar view height.
  • Updated the color of the save and transfer buttons.
  • Updated the height of the animation container.
  • Updated the image fitting in the animation container.
  • Added several color constants to the constants.dart file.
  • Updated the speed dial colors.
  • Updated the speed dial painter colors.
  • Updated the radial dial painter colors.
  • Updated the inner pointer painter colors.
  • Updated the animation container height.
  • Updated the animation container image fitting.
  • Updated the common scaffold background color.
  • Updated the app bar title in the common scaffold widget.
  • Updated the color of the text field on the home screen.
  • Updated the color of the grid container on the home screen.
  • Updated the tab bar indicator and label colors.
  • Updated the tab bar view height.
  • Updated the color of the save and transfer buttons.
  • Updated the height of the animation container.
  • Updated the image fitting in the animation container.
  • Added several color constants to the constants.dart file.
  • Updated the speed dial colors.
  • Updated the speed dial painter colors.
  • Updated the radial dial painter colors.
  • Updated the inner pointer painter colors.
  • Updated the animation container height.
  • Updated the animation container image fitting.
  • Updated the common scaffold background color.
  • Updated the app bar title in the common scaffold widget.
  • Updated the color of the text field on the home screen.
  • Updated the color of the grid container on the home screen.
  • Updated the tab bar indicator and label colors.
  • Updated the tab bar view height.
  • Updated the color of the save and transfer buttons.
  • Updated the height of the animation container.
  • Updated the image fitting in the animation container.
  • Added several color constants to the constants.dart file.
  • Updated the speed dial colors.
  • Updated the speed dial painter colors.
  • Updated the radial dial painter colors.
  • Updated the inner pointer painter colors.
  • Updated the animation container height.
  • Updated the animation container image fitting.
  • Updated the common scaffold background color.
  • Updated the app bar title in the common scaffold widget.
  • Updated the color of the text field on the home screen.
  • Updated the color of the grid container on the home screen.
  • Updated the tab bar indicator and label colors.
  • Updated the tab bar view height.
  • Updated the color of the save and transfer buttons.
  • Updated the height of the animation container.
  • Updated the image fitting in the animation container.
  • Added several color constants to the constants.dart file.
  • Updated the speed dial colors.
  • Updated the speed dial painter colors.
  • Updated the radial dial painter colors.
  • Updated the inner pointer painter colors.
  • Updated the animation container height.
  • Updated the animation container image fitting.
  • Updated the common scaffold background color.
  • Updated the app bar title in the common scaffold widget.
  • Updated the color of the text field on the home screen.
  • Updated the color of the grid container on the home screen.
  • Updated the tab bar indicator and label colors.
  • Updated the tab bar view height.
  • Updated the color of the save and transfer buttons.
  • Updated the height of the animation container.
  • Updated the image fitting in the animation container.
  • Added several color constants to the constants.dart file.
  • Updated the speed dial colors.
  • Updated the speed dial painter colors.
  • Updated the radial dial painter colors.
  • Updated the inner pointer painter colors.
  • Updated the animation container height.
  • Updated the animation container image fitting.
  • Updated the common scaffold background color.
  • Updated the app bar title in the common scaffold widget.
lib/view/widgets/navigation_drawer.dart
lib/view/homescreen.dart
lib/view/widgets/common_scaffold_widget.dart
Updated the home screen
  • Updated the app bar title.
  • Changed the background color of the text field.
  • Changed the background color of the grid container.
  • Updated the tab bar indicator and label colors.
  • Increased the height of the tab bar view.
  • Changed the color of the save and transfer buttons.
lib/view/homescreen.dart
Added color constants
  • Added several color constants for primary colors, knob colors, and additional colors used in the UI.
lib/constants.dart
Updated speed dial and animation container
  • Updated the colors used in the speed dial.
  • Updated the colors used in the speed dial painter.
  • Updated the colors used in the radial dial painter.
  • Updated the colors used in the inner pointer painter.
  • Increased the height of the animation container.
  • Updated the image fitting in the animation container.
lib/view/widgets/speedial.dart
lib/view/widgets/animation_container.dart
Updated common scaffold widget
  • Updated the background color of the app bar.
lib/view/widgets/common_scaffold_widget.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Jhalakupadhyay - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Please provide a more descriptive PR description explaining what changed and why, rather than just issue numbers. This helps reviewers understand the context and purpose of the changes.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@adityastic adityastic merged commit 87913a3 into fossasia:flutter_app Jan 6, 2025
5 checks 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