Skip to content

# ui: Changes the design of Bottom Action sheet. #585

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

Closed
wants to merge 0 commits into from

Conversation

Sahilpervez
Copy link

@Sahilpervez Sahilpervez commented Mar 24, 2024

  • This PR consists the modification of design of action sheet that pops up when any message is long pressed.
  • Closes Bottom sheet redesign #90
  • In action_sheet.dart file there are 3 major changes :
    • Changed the showMessageActionSheet method to create a list of widgets for the widgets to rendered in the action sheet instead of directly passing it as the children of Column. This also reduced the explicit specification of the rounded border of the first and the last element.
    • Changed the abstract class MessageActionSheetMenuItemButton to have the colors and the variables to specify that an element is first or last element in the Column.
    • Changed the design of the bottom sheet according to the given figma design.
    • Added a widget MessageActionSheetCancelButton for the cancel button.
first_pr_vid.mp4

@abelaba
Copy link
Contributor

abelaba commented Mar 24, 2024

I think it would be great if you would include screen recordings for your UI changes. It will make it easier for code reviewers to see your changes and get your PR reviewed faster.

@abelaba
Copy link
Contributor

abelaba commented Mar 24, 2024

You must also add tests for the changes you have added and make sure that the existing tests are passing.
https://github.com/zulip/zulip-flutter?tab=readme-ov-file#writing-tests

@Sahilpervez
Copy link
Author

I think it would be great if you would include screen recordings for your UI changes. It will make it easier for code reviewers to see your changes and get your PR reviewed faster.

Ok Sure I'll add a screen recording for PR.

@Sahilpervez
Copy link
Author

@gnprice Can you please review this PR?

Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

Before we can review this PR in detail, it will need tests as mentioned above. See the README at "Submitting a pull request":
https://github.com/zulip/zulip-flutter#submitting-a-pull-request

See also the Zulip project's Git style guide (linked from that same README section). Instead of one commit that causes the test suite to fail, and a second commit fixing the error, the fix should be squashed in so that the tests pass after each individual commit.

For those reasons I've been assuming you're still working on this PR as a draft, which is why I haven't reviewed it.

I took a quick look just now, though. Here's one piece of high-level feedback on the overall approach.

Comment on lines 86 to 91
late final bool _isFirst;
late final bool _isLast;

void setIsFirst(){
_isFirst = true;
}
Copy link
Member

Choose a reason for hiding this comment

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

This mutation of a widget object is awfully unidiomatic for Flutter. We'll want to find a solution which doesn't involve mutating any widgets after constructing them.

It's possible that a good solution here will involve making more widgets, or different widgets — the MessageActionSheetMenuItemButton class as a subclass of StatelessWidget is something we made up, and we're free to change it if that helps us structure things well. If you're trying ideas for this and you have questions about whether a particular refactor seems like a good direction, #mobile-team on chat.zulip.org will be a good place to ask.

Copy link
Author

Choose a reason for hiding this comment

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

Ok Sure, I will try to find some way around to avoid that behaviour. Let's discuss more about that on #mobile-team on chat.zulip.org

@Sahilpervez
Copy link
Author

Before we can review this PR in detail, it will need tests as mentioned above. See the README at "Submitting a pull request": https://github.com/zulip/zulip-flutter#submitting-a-pull-request

See also the Zulip project's Git style guide (linked from that same README section). Instead of one commit that causes the test suite to fail, and a second commit fixing the error, the fix should be squashed in so that the tests pass after each individual commit.

For those reasons I've been assuming you're still working on this PR as a draft, which is why I haven't reviewed it.

I took a quick look just now, though. Here's one piece of high-level feedback on the overall approach.

Thanks for your review here.
Also I am sorry for misunderstanding. I will squash both commits and try to resolve the issue that you have mentioned in the above review.

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.

Bottom sheet redesign
3 participants