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 issues #97

Merged
merged 4 commits into from
Apr 9, 2024
Merged

Fix UI issues #97

merged 4 commits into from
Apr 9, 2024

Conversation

cp-sneha-s
Copy link
Collaborator

@cp-sneha-s cp-sneha-s commented Apr 9, 2024

Purpose

  • Fix UI Issues

Summary by CodeRabbit

  • New Features

    • Enhanced app navigation and user experience by updating the UI in several screens, including sign-in and profile setup.
    • Improved the visual design and accessibility of the app by adjusting colors, text styles, and widget properties across various components.
  • Refactor

    • Updated widget parameters and structures for better performance and readability, ensuring a more intuitive user interface.
  • Style

    • Applied consistent color schemes and adjusted layout styles across the app for a more cohesive look and feel.
  • Chores

    • Removed outdated features and streamlined the user experience by focusing on essential functionalities.

Copy link

coderabbitai bot commented Apr 9, 2024

Walkthrough

The recent updates focus on improving user interactions and visual aesthetics across the application. Changes include enforcing non-nullable parameters, refining color schemes for better readability, and enhancing various UI elements like forms and buttons. Layout adjustments in different screens aim to create a more seamless navigation experience, contributing to a cohesive and user-friendly interface.

Changes

Files Summary
lib/style/app_page.dart Enforced non-nullable body parameter in AppPage class and adjusted AppBar color.
lib/ui/shared/profile/edit_profile/widget/profile_form.dart Removed gender selection and updated border radius in DateOfBirthButton.
lib/ui/shared/who_is_out_card/widget/absence_employee_view.dart Changed text color style in WhoIsOutAbsenceEmptyView.
lib/ui/sign_in/setup_profile/setup_profile_screen.dart, lib/ui/widget/employee_details_textfield.dart Enhanced layout, navigation, and input handling in sign-in and profile setup screens.
lib/ui/space/create_space/.../create_workspace_screen.dart, lib/ui/space/create_space/widget/tab_1.dart Replaced Material with SafeArea, adjusted widget structures, and changed layout in workspace creation screens.
lib/ui/space/join_space/widget/spaces.dart Added style properties to handle empty space scenarios in Spaces class.

Poem

Amongst the code where changes bloom,
A rabbit crafts a brighter room.
🌟 Widgets shift, and colors play,
Guiding users along their way.
With each click, a tale unfolds,
Of apps refined in digital holds.
🐇 Let's hop through this tech ballet,
Where each update brings a brighter day!


Recent Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 03353bc and 5a0cfe0.
Files selected for processing (6)
  • lib/style/app_page.dart (3 hunks)
  • lib/ui/sign_in/setup_profile/setup_profile_screen.dart (2 hunks)
  • lib/ui/space/create_space/create_workspace_screen.dart (2 hunks)
  • lib/ui/space/create_space/widget/tab_1.dart (1 hunks)
  • lib/ui/space/join_space/widget/spaces.dart (1 hunks)
  • lib/ui/widget/employee_details_textfield.dart (3 hunks)
Files skipped from review as they are similar to previous changes (6)
  • lib/style/app_page.dart
  • lib/ui/sign_in/setup_profile/setup_profile_screen.dart
  • lib/ui/space/create_space/create_workspace_screen.dart
  • lib/ui/space/create_space/widget/tab_1.dart
  • lib/ui/space/join_space/widget/spaces.dart
  • lib/ui/widget/employee_details_textfield.dart

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Comment on lines 78 to 80
onTapOutside: (pointerDownEvent){
FocusScope.of(context).unfocus();
},
Copy link

Choose a reason for hiding this comment

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

The onTapOutside callback is a useful addition for improving UX by allowing users to unfocus the text field. However, this functionality seems to be incorrectly implemented as TextField does not have an onTapOutside property.

- onTapOutside: (pointerDownEvent){
-   FocusScope.of(context).unfocus();
- },
+ // Implement onTapOutside functionality using GestureDetector wrapping the TextField

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
onTapOutside: (pointerDownEvent){
FocusScope.of(context).unfocus();
},
// Implement onTapOutside functionality using GestureDetector wrapping the TextField

return Column(
crossAxisAlignment: CrossAxisAlignment.start,
return ListView(
// crossAxisAlignment: CrossAxisAlignment.start,
Copy link

Choose a reason for hiding this comment

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

The commented-out crossAxisAlignment property is not applicable to ListView. If alignment is needed, consider wrapping items in Align or using other widgets.

- // crossAxisAlignment: CrossAxisAlignment.start,
+ // Use Align widget or other methods for alignment if necessary.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
// crossAxisAlignment: CrossAxisAlignment.start,
// Use Align widget or other methods for alignment if necessary.

Comment on lines 122 to 151
// floatingActionButton: Padding(
// padding: const EdgeInsets.symmetric(horizontal: 16.0),
// child: BlocBuilder<CreateSpaceBLoc, CreateSpaceState>(
// buildWhen: (previous, current) =>
// previous.buttonState != current.buttonState ||
// previous.page != current.page ||
// previous.createSpaceStatus != current.createSpaceStatus,
// builder: (context, state) {
// return AppButton(
// backgroundColor: state.buttonState == ButtonState.enable
// ? context.colorScheme.primary
// : context.colorScheme.primary.withOpacity(0.5),
// loading: state.createSpaceStatus == Status.loading,
// tag: state.page == 2
// ? locale.create_space_tag
// : locale.next_tag,
// onTap: state.buttonState == ButtonState.enable
// ? () {
// if (state.page < 2) {
// _tabController.animateTo(state.page + 1);
// bloc.add(PageChangeEvent(page: state.page + 1));
// }
// if (state.page == 2) {
// bloc.add(CreateSpaceButtonTapEvent());
// }
// }
// : null,
// );
// }),
// ));
Copy link

Choose a reason for hiding this comment

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

Commenting out the floatingActionButton may impact navigation or functionality. If this is intentional for a temporary reason, consider adding a TODO comment for future reference.

+ // TODO: Re-evaluate the necessity of the floatingActionButton for future iterations.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
// floatingActionButton: Padding(
// padding: const EdgeInsets.symmetric(horizontal: 16.0),
// child: BlocBuilder<CreateSpaceBLoc, CreateSpaceState>(
// buildWhen: (previous, current) =>
// previous.buttonState != current.buttonState ||
// previous.page != current.page ||
// previous.createSpaceStatus != current.createSpaceStatus,
// builder: (context, state) {
// return AppButton(
// backgroundColor: state.buttonState == ButtonState.enable
// ? context.colorScheme.primary
// : context.colorScheme.primary.withOpacity(0.5),
// loading: state.createSpaceStatus == Status.loading,
// tag: state.page == 2
// ? locale.create_space_tag
// : locale.next_tag,
// onTap: state.buttonState == ButtonState.enable
// ? () {
// if (state.page < 2) {
// _tabController.animateTo(state.page + 1);
// bloc.add(PageChangeEvent(page: state.page + 1));
// }
// if (state.page == 2) {
// bloc.add(CreateSpaceButtonTapEvent());
// }
// }
// : null,
// );
// }),
// ));
// TODO: Re-evaluate the necessity of the floatingActionButton for future iterations.
// floatingActionButton: Padding(
// padding: const EdgeInsets.symmetric(horizontal: 16.0),
// child: BlocBuilder<CreateSpaceBLoc, CreateSpaceState>(
// buildWhen: (previous, current) =>
// previous.buttonState != current.buttonState ||
// previous.page != current.page ||
// previous.createSpaceStatus != current.createSpaceStatus,
// builder: (context, state) {
// return AppButton(
// backgroundColor: state.buttonState == ButtonState.enable
// ? context.colorScheme.primary
// : context.colorScheme.primary.withOpacity(0.5),
// loading: state.createSpaceStatus == Status.loading,
// tag: state.page == 2
// ? locale.create_space_tag
// : locale.next_tag,
// onTap: state.buttonState == ButtonState.enable
// ? () {
// if (state.page < 2) {
// _tabController.animateTo(state.page + 1);
// bloc.add(PageChangeEvent(page: state.page + 1));
// }
// if (state.page == 2) {
// bloc.add(CreateSpaceButtonTapEvent());
// }
// }
// : null,
// );
// }),
// ));

@cp-sneha-s cp-sneha-s merged commit 1658e67 into main Apr 9, 2024
1 check passed
@cp-sneha-s cp-sneha-s deleted the fix-ui-issues branch April 20, 2024 05:33
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.

1 participant